From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q0TDgOwq017510 for ; Sun, 29 Jan 2012 14:42:24 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: An8BADBMJU9KN1ZKmWdsb2JhbABDhQupbgEBAQEBCAsLBxQlgXIBAQQBI1YFCwsaAhgOAgI9ChAGG4d0Awamc5BigS+HDQgDBgIUAQIDBDgGDIMNBhkJAXoCAQaCKTNjBJpdjQ8 X-IronPort-AV: E=Sophos;i="4.71,587,1320620400"; d="scan'208";a="129286971" Received: from mail6.webfaction.com (HELO smtp.webfaction.com) ([74.55.86.74]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Jan 2012 14:42:19 +0100 Received: from heyho.local (81-233.197-178.cust.bluewin.ch [178.197.233.81]) by smtp.webfaction.com (Postfix) with ESMTP id 87A7A2099DB7; Sun, 29 Jan 2012 07:42:16 -0600 (CST) Date: Sun, 29 Jan 2012 14:42:12 +0100 From: =?utf-8?Q?Daniel_B=C3=BCnzli?= To: Diego Olivier Fernandez Pons Cc: caml-list Message-ID: In-Reply-To: References: X-Mailer: sparrow 1.5 (build 1043.1) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q0TDgOwq017510 Subject: Re: [Caml-list] SQL engine in OCaml with client side cache Le dimanche, 29 janvier 2012 à 10:56, Diego Olivier Fernandez Pons a écrit : > Therefore I thought I could add a "cache" on the client side, meaning an in-memory SQL database that would receive a big block of data from the server and work on it till the client writes a query that needs some data that is not available locally in which case it would request it from the server, etc. > > I haven't found anything like that ready-to-use, so I was considering reengineering existing OCaml code (database + web) and maybe compile it to JavaScript. I have control on the client so I can afford installing an OCaml runtime if needed albeit impractical though. If you can afford to install recent browsers, on the javascript side. Webdatabase [1] would have made your day but the spec has been withdrawn. It seems work along these lines was pursued in IndexedDB [2] but it may be a little bit early to use it. If the dataset is not too huge and your queries are simple enough you may be able to hack a thin layer on top of webstorage [3]. But beware that this gives you no more than a persisent hashtable and I have no indication of the kind of performance you'd get. The advantage is that this is a candidate recommandation. Note, I have used neither of those. Just know their existence. Best, Daniel [1] http://www.w3.org/TR/webdatabase/ http://caniuse.com/#search=websql [2] http://www.w3.org/TR/IndexedDB/ http://caniuse.com/#search=indexed [3] http://www.w3.org/TR/webstorage/ (http://www.w3.org/TR/webstorage/#storage) http://caniuse.com/#search=webstorage