Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66613 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17624 invoked from network); 14 Mar 2013 14:32:10 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2013 14:32:10 -0000 Authentication-Results: pb1.pair.com header.from=rene7705@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rene7705@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.51 as permitted sender) X-PHP-List-Original-Sender: rene7705@gmail.com X-Host-Fingerprint: 74.125.83.51 mail-ee0-f51.google.com Received: from [74.125.83.51] ([74.125.83.51:60696] helo=mail-ee0-f51.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/41-07586-96FD1415 for ; Thu, 14 Mar 2013 09:32:10 -0500 Received: by mail-ee0-f51.google.com with SMTP id d17so1058481eek.24 for ; Thu, 14 Mar 2013 07:32:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=mC6QFjzXZeFEZzQXZs+/mcqn5kNGSZZXsCd/UBkNU4Y=; b=M9Ulbh8ZhyUHaE2mOhtHsVbSL7oQl4eyEKT5ijAzXcYo0Mxzuu8qkd4jWWHKhl0RvL hMF8fGWxXXpbIJlicPzMLs1c6crWofGtHULhQ32VtNRx2hvsAO6ij2ly/cOAeoLgowyD 3zvuKrDQFdg2MQvglWA5ex5fNvUaqGjzRWTkrFAkg/FIp5TABVtNSFrXKI23juMEXRfx VOS/OBVYtuQ6qJz9Dc12GleIjg2eRvolL/btYOg/pL7vhHo05KUe6TfWTnjZR7DT6pSl OVubtHr7xUp0QZvp+MBu4fUAo/7TU5UtiiHOiC9lv/E5WTKKDCiKsVYK+5XnKiqq7o4x oHDA== X-Received: by 10.14.0.73 with SMTP id 49mr7456004eea.21.1363271526951; Thu, 14 Mar 2013 07:32:06 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.41.13 with HTTP; Thu, 14 Mar 2013 07:31:36 -0700 (PDT) In-Reply-To: References: Date: Thu, 14 Mar 2013 15:31:36 +0100 Message-ID: To: Nikita Nefedov Cc: internals Content-Type: multipart/alternative; boundary=047d7b60525e18d25e04d7e36333 Subject: Re: [PHP-DEV] feature request : easy shared memory From: rene7705@gmail.com (rene7705) --047d7b60525e18d25e04d7e36333 Content-Type: text/plain; charset=ISO-8859-1 great! :) this will do nicely. is there much overhead for storing and fetching these variables? (ideally I would like to get a pointer) On Thu, Mar 14, 2013 at 12:45 PM, Nikita Nefedov wrote: > 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. > --047d7b60525e18d25e04d7e36333--