Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66615 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29393 invoked from network); 14 Mar 2013 15:47:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 14 Mar 2013 15:47:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=linepogl@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=linepogl@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.173 as permitted sender) X-PHP-List-Original-Sender: linepogl@gmail.com X-Host-Fingerprint: 209.85.214.173 mail-ob0-f173.google.com Received: from [209.85.214.173] ([209.85.214.173:60243] helo=mail-ob0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 07/73-07586-601F1415 for ; Thu, 14 Mar 2013 10:47:18 -0500 Received: by mail-ob0-f173.google.com with SMTP id dn14so2326411obc.32 for ; Thu, 14 Mar 2013 08:47:16 -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=/NhVuX75xWqLJZ0ZG3Ep5pheU2Qq0n7x4toIPTIlKv8=; b=q2xlCztXA9h8bYOZLxb779R4HTeuEQLxPfarKjUA9R3NMsJkD2fnQFpqWJ8FWTlQVK uhDGaV06KWFP7uf4QzjKUV813rFbXcWPfCwhN1Uq9r3qmQSsr45vcVS68oZe3EX9WEyu BzcTjsbSuYRTK5Ib9gxCgw7Z/AKLHMzt4/UH5cQfBh5mXLbT+bT89h5UMa6tyXMGa4hW 5hDHPsXBCf+UsxHikfVZ3levbDoL2YNuu6z7kmO2A4pvYnQhQtpsTphFhOraHyoJp9ib SCNl2PloVlVj4gqrgd3Z4n+QF5l8kR08N2FRnQehHGZRZHksu1Lid7NQhUmKFacd3pwA Heow== X-Received: by 10.60.8.233 with SMTP id u9mr1374580oea.26.1363276036238; Thu, 14 Mar 2013 08:47:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.113.178 with HTTP; Thu, 14 Mar 2013 08:46:56 -0700 (PDT) In-Reply-To: References: Date: Thu, 14 Mar 2013 16:46:56 +0100 Message-ID: To: rene7705 Cc: Nikita Nefedov , internals Content-Type: multipart/alternative; boundary=e89a8fb20346def38504d7e46fd9 Subject: Re: [PHP-DEV] feature request : easy shared memory From: linepogl@gmail.com (Lazare Inepologlou) --e89a8fb20346def38504d7e46fd9 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello, 2013/3/14 rene7705 > great! :) > > this will do nicely. is there much overhead for storing and fetching thes= e > variables? (ideally I would like to get a pointer) > > Unfortunately there is. Every object stored in APC has to be serialised first and then unserialised on retrieval. You can improve performance by using a binary serialiser (such as igBinary) instead of the default php one= . > > 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 contro= ls > >> 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, a= nd > >> 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' ever= y > > change of the fetched variable. > > > Lazare INEPOLOGLOU Ing=C3=A9nieur Logiciel --e89a8fb20346def38504d7e46fd9--