Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66606 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78065 invoked from network); 14 Mar 2013 07:45:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2013 07:45:26 -0000 Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.41 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.215.41 mail-la0-f41.google.com Received: from [209.85.215.41] ([209.85.215.41:52870] helo=mail-la0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/E8-27533-51081415 for ; Thu, 14 Mar 2013 02:45:26 -0500 Received: by mail-la0-f41.google.com with SMTP id fo12so2118343lab.0 for ; Thu, 14 Mar 2013 00:45:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=QtgAZNOvsEjgnf9wAWTr3vM+8i2W99N5Q2Obe23D5Z4=; b=XeYoayB4hP/T1BpalTvp0gJHOZ45NFaikwke0aMYFkYT1yrsKZ5LMoFQrZvPO2hTpG NZvtiVHsbeu/gV3alvHR3iCDhQQwCg9pM6H1vQAg9J+XsaXhTdFaLwF3HCYJShXq7eIs 4JjpgNhWMw02W5Cw8CiQb9u1yL0fhu21ooyENHnupQxwR+QucMehb9au34fJSLb+O5Ra FI/LtRjER7JWM/Yln4XG5jaafNktJwRVNXUeZXEzVsyTiRQG3DrAF5OJcDjDsI+ZeFwt RlV+Yj9V7CoL91/50nR/pnh6J+0ZkQiQ+V6vEuv9uJb99ONpJRVVor8/tEx2DXCXeR8s 8AjA== X-Received: by 10.152.110.74 with SMTP id hy10mr1174409lab.37.1363247122888; Thu, 14 Mar 2013 00:45:22 -0700 (PDT) Received: from nikita2206-debian (89-178-230-37.broadband.corbina.ru. [89.178.230.37]) by mx.google.com with ESMTPS id fl9sm512948lbb.9.2013.03.14.00.45.21 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 14 Mar 2013 00:45:22 -0700 (PDT) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net, rene7705 References: Date: Thu, 14 Mar 2013 11:45:14 -0000 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: User-Agent: Opera Mail/12.14 (Linux) Subject: Re: [PHP-DEV] feature request : easy shared memory From: inefedor@gmail.com ("Nikita Nefedov") On Thu, 14 Mar 2013 07:05:03 -0000, rene7705 wrote: > Hi. > > I'd like to build a replacement for SQL (yes, talk about an ambitious > project! ;), because the constant transferal of data in and out of SQL > from > Javascript (where everything might as well be object-oriented and > hierarchial) is a pain in the neck. > > But in order to do so, I'd very much like PHP (the server still controls > the data after all) to support shared memory efficiently. > > Something like > > sharedmem $bigNestedArray; // $bigNestedArray would be shared accross the > entire server and all CPUs on it. > > as you now have > > global $bigNestedArray; > > would be ideal. > > I bet this would be useful for a host of other applications as well, and > fairly easy to implement. > > I'm an application programmer by trade, or I would hack this in myself. > > I'd much rather see the PHP development team develop this in properly. I > don't think it would require much time, as OS-level shared memory has > been > easy to implement since the 1990s. > > Please put this on the agenda, and get back to us in this thread as to > when > this will be available. Hi, You can already do it using APC's apc_store() and apc_fetch() functions which let you use shared memory. But of course you should 'commit' every change of the fetched variable.