Return-Path: Delivered-To: apmail-perl-embperl-archive@www.apache.org Received: (qmail 82290 invoked from network); 13 Jul 2004 19:47:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Jul 2004 19:47:48 -0000 Received: (qmail 38762 invoked by uid 500); 13 Jul 2004 19:47:48 -0000 Delivered-To: apmail-perl-embperl-archive@perl.apache.org Received: (qmail 38537 invoked by uid 500); 13 Jul 2004 19:47:47 -0000 Mailing-List: contact embperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list embperl@perl.apache.org Received: (qmail 38524 invoked by uid 99); 13 Jul 2004 19:47:47 -0000 X-ASF-Spam-Status: No, hits=0.3 required=10.0 tests=FORGED_RCVD_HELO,INFO_TLD X-Spam-Check-By: apache.org Received: from [194.95.226.10] (HELO saturn.ecos.de) (194.95.226.10) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 13 Jul 2004 12:47:44 -0700 Received: from lnx1.i.ecos.de (unknown [194.95.226.11]) by saturn.ecos.de (Postfix) with ESMTP id D96B1D88B4; Tue, 13 Jul 2004 21:47:01 +0200 (MET DST) Received: from wingr2 (unknown [10.11.12.250]) by lnx1.i.ecos.de (Postfix) with SMTP id B64E3188208; Tue, 13 Jul 2004 21:47:37 +0200 (MEST) Message-ID: <03e901c46912$3473d230$fa0c0b0a@wingr2> From: "Gerald Richter" To: "RobertCZ" , References: <40F2517E.60403@pcv.cz> <013e01c468b9$49580440$fa0c0b0a@wingr2> <40F3B9D2.3010802@robert.cz> Subject: Re: mdat/postgres - major perfomance problem? Date: Tue, 13 Jul 2004 21:47:18 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >> >> Sorry for binary attachement - screenshot shows postgres indeed does >> wait for first select for update to finnish - however only if it's in >> explicit transaction so one has to call BEGIN before and be in the >> AutoCommit => 0 mode >> >> The docs for Apache::Session::Postgres say you have to manually >> specify Commit => X argument to the tie %hash, >> 'Apache::Session::Postgres', $id, ... call to make clear what the >> commit policy is, but right now I can't figure out how Embperl 2 >> does it >> You can pass parameters via Embperl_Session_Args see Config.pod >> If called with Commit => 1 (which means AutoCommit => 1 I hope), >> postgres DOES NOT wait for first SELECT FOR UPDATE but then I don't >> see >> how consistency is to be maintened >> That will be the problem.... >> I'd love to use %mdat for all kind of neat trick namely for >> inter-user >> sql query caching, inter-user application locking (so 2 users don't >> edit the same record on the same web form etc), maybe track currectly >> connected users etcetcetc but this locking thing has to be fixed >> As far as I see not much people using %mdat. It seem like we need a different locking strategie... >> Or maybe some other backend is better? I can't believe file or dbm >> will >> be any better and mysql is probably the same thing >> I recently discovered Cache::FastMMap, this might be an alterntive, also it lacks synchronisation, which might be a problem for some applications. >> I guess only real way to fix this problem is patch Apache::Session >> and Embperl to support read-only sessions, but that would be quit a >> lot of patching. Or maybe just passing from Embperl page Commit => X >> to Apache::Session would do the trick, I'm not sure - but that >> should be >> much easier to do, maybe just adding one method to the $req object? >> see above >> >> I don't understand... Apache::Session::Store::DBI has only >> $self->update which does the obvious SQL UPDATE, >> Apache::Session::Store::Postgres inherits it without change (it >> modifies only connect and materialize methods), so they both use >> plain Apache::Session method clear which is >> in turn one line $self->{data} = {}; >> >> My guess %mdat = () should just work... >> Yes, you are right. I can't say what wrong here at the moment Gerald >> - Robert >> >> >> >> > > > > > > > >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org >> For additional commands, e-mail: embperl-help@perl.apache.org --------------------------------------------------------------------------- Gerald Richter ecos electronic communication services gmbh IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: richter@ecos.de Voice: +49 6133 939-122 WWW: http://www.ecos.de/ Fax: +49 6133 939-333 --------------------------------------------------------------------------- ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info --------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org For additional commands, e-mail: embperl-help@perl.apache.org