From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E09F3BB81 for ; Tue, 27 Dec 2005 09:34:29 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jBR8YT0T030320 for ; Tue, 27 Dec 2005 09:34:29 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA21857 for ; Tue, 27 Dec 2005 09:34:29 +0100 (MET) Received: from smtp9.wanadoo.fr (smtp9.wanadoo.fr [193.252.22.22]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jBR8YSge023357 for ; Tue, 27 Dec 2005 09:34:28 +0100 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf0901.wanadoo.fr (SMTP Server) with ESMTP id 8E70420013F5 for ; Tue, 27 Dec 2005 09:34:28 +0100 (CET) Received: from morgana (ARennes-257-1-52-144.w81-53.abo.wanadoo.fr [81.53.131.144]) by mwinf0901.wanadoo.fr (SMTP Server) with ESMTP id 558D720013F4 for ; Tue, 27 Dec 2005 09:34:28 +0100 (CET) X-ME-UUID: 20051227083428350.558D720013F4@mwinf0901.wanadoo.fr Received: from david by morgana with local (Exim 4.50) id 1ErAIM-0001Jy-Mq for caml-list@inria.fr; Tue, 27 Dec 2005 09:34:58 +0100 To: caml-list@inria.fr Subject: Persistent storage and stability of Marshal? From: David MENTRE Organization: none Date: Tue, 27 Dec 2005 09:34:58 +0100 Message-ID: <87wthruedp.fsf@linux-france.org> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 43B0FC95.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43B0FC94.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 integers:01 marshalling:01 ocaml:01 marshaling:01 tar:01 contrib:01 100,000:98 marshal:01 marshal:01 dependency:01 cristal:01 eecs:01 strings:01 data:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Hello, I need to implement some kind of persistent storage in my application (demexp web proxy part and demexp server part), so I'm looking at the different possible alternatives. Roughly, I've found: - Dbm standard module of OCaml: file storage, no external dependency, safe? - Berkeley DB 4.x interface[1]: file storage, seems safe; - SQL database[2]: real database, complicated to setup, safe. Right now, I don't have big needs: few tables of moderate size (below 100,000 records) so I'm in favor of simple solutions: Dbm or Berkeley DB (no need to setup an external SQL server). I need to lookup values through known keys. The key and stored data are simple records of strings and integers. In the future, I might need to lookup rows according to certain field value. Looking at code using Berkeley DB, I noticed that stored key and data is made using the Marshal module. However, Marshal doc says that marshalling is "compatible across all machines for a given version of Objective Caml", so there might be issues when changing OCaml version. So my questions: 1. Is the Marshal module that much unstable? I have the feeling that marhsaled values are compatible between OCaml releases. True or false? 2. Any advice on implementing persistent storage? I know about Persil library[3] but I don't see much advantage of using it (does it implement its own marshaling, more stable than Marshal?). Best wishes, d. Footnotes: [1] http://www.eecs.harvard.edu/~stein/ocamlbdb-4.3.21.tar.gz [2] OCamlDBI: http://caml.inria.fr/cgi-bin/hump.fr.cgi?contrib=381 [3] http://cristal.inria.fr/~starynke/persil/ -- pub 1024D/A3AD7A2A 2004-10-03 David MENTRE 5996 CC46 4612 9CA4 3562 D7AC 6C67 9E96 A3AD 7A2A