From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id CCA08BBAF for ; Mon, 26 Jul 2010 19:10:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjsEAL9eTUxQW+UMgWdsb2JhbACDFJAFjEcVAQEWIiKyCJE9gSaDHXMEh1OBEQ X-IronPort-AV: E=Sophos;i="4.55,262,1278280800"; d="scan'208";a="66956298" Received: from lo.gmane.org ([80.91.229.12]) by mail4-smtp-sop.national.inria.fr with ESMTP; 26 Jul 2010 19:10:10 +0200 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OdRBp-0003RB-NW for caml-list@inria.fr; Mon, 26 Jul 2010 19:10:09 +0200 Received: from ks368928.kimsufi.com ([94.23.39.26]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jul 2010 19:10:09 +0200 Received: from sylvain by ks368928.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Jul 2010 19:10:09 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Subject: Re: scalable web apps Date: Mon, 26 Jul 2010 17:10:01 +0000 (UTC) Message-ID: References: <981136.2735.qm@web111515.mail.gq1.yahoo.com> <201007261850.30437.monnier.florent@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ks368928.kimsufi.com User-Agent: slrn/pre1.0.0-11 (Linux) X-Spam: no; 0.00; le-gall:01 scalable:01 46,:98 wrote:01 data:02 caml:02 dbm:03 dbm:03 apps:04 apps:04 concurrent:04 blocking:04 problem:05 lundi:05 blocks:07 On 26-07-2010, Florent Monnier wrote: > Le lundi 26 juillet 2010 13:20:46, Dario Teixeira a écrit : >> Hi, >> >> > > How does Ocsigen handle database operations? >> > >> > I thought it was using PG'OCaml, but maybe I'm wrong. >> >> Ocsigen itself does not use PG'OCaml. The two are frequently associated >> because the latest versions of PG'OCaml are Lwt-friendly and therefore >> a good choice for Ocsigen apps. (Note that internally, Ocsigen uses >> either Dbm or Sqlite to store session data). > > Both Dbm and Sqlite lock the entire files which blocks concurrent uses, > isn't it a problem? > For sqlite, at least, it uses Lwt_preemptive.detach and sqlite3 contains the required caml_enter/leave_blocking_section(s). So Lwt should work without problems with sqlite. I suppose it is the same for dbm. Regards, Sylvain Le Gall