<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.3.2">
</HEAD>
<BODY>
Henrik and I have fixed some subtle bugs that occurred under certain data values (which <BR>
happened to occur in my "live" database for "konsenti.com", my for-profit business.<BR>
<BR>
I have now integrated these fixes into the main darcs elephant repository.<BR>
<BR>
If anybody pulls and tests the :ele-postmodern backend, please send us a note.<BR>
It works under SBCL, but has not been tested under our full matrix, AFAIK.<BR>
<BR>
<BR>
<BR>
By the way, one might be interested in how one migrated from an exsiting CL-SQL backend<BR>
to the Postmodern-based ele-postmodern backend.  Here is approximately the lisp code that <BR>
I used to move from "konsenti", a CL-SQL based backend, to "kosenti2", a postmodern-based<BR>
backend:<BR>
<BR>
<BR>
(defparameter *REPOSITORY-SPEC* (list :clsql (list :postgresql<BR>
                                  (coerce-to-base "localhost.localdomain" )<BR>
                                  (coerce-to-base "konsenti" )<BR>
                                  (coerce-to-base "postgres" )<BR>
                                  (coerce-to-base "mrmtzplx"))))<BR>
<BR>
(defparameter *UPGRADE-REPOSITORY-SPEC* (list :postmodern (list :postgresql<BR>
                                  (coerce-to-base "localhost.localdomain" )<BR>
                                  (coerce-to-base "konsenti2" )<BR>
                                  (coerce-to-base "postgres" )<BR>
                                  (coerce-to-base "mrmtzplx"))))<BR>
<BR>
(use-package :elephant)<BR>
(setq orig (open-store *REPOSITORY-SPEC*))<BR>
(setq pm (open-store *UPGRADE-REPOSITORY-SPEC*))<BR>
(migrate pm orig)<BR>
<BR>
<BR>
<BR>
<BR>
On Wed, 2007-07-04 at 17:49 -0500, Robert L. Read wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
    <FONT COLOR="#000000">I have just integrated Henrik Hjelte's postmodern-based backend into the official</FONT><BR>
    <FONT COLOR="#000000">darcs repository for elephant:</FONT><BR>
    <BR>
    <FONT COLOR="#000000"><A HREF="http://common-lisp.net/project/elephant/darcs/elephant/">http://common-lisp.net/project/elephant/darcs/elephant/</A></FONT><BR>
    <BR>
    <FONT COLOR="#000000">However, this is not an official release, but presumably will be part of the next official release.</FONT><BR>
    <FONT COLOR="#000000">It passes all of the tests.  The Postmodern backend is not quite twice as fast on our testsuite as</FONT><BR>
    <FONT COLOR="#000000">the CL-SQL backend.  The CL-SQL backend still has some value, however, for non-Postgres </FONT><BR>
    <FONT COLOR="#000000">databases.  If someone were to write another DB-specific backend, such as a MySQL backend</FONT><BR>
    <FONT COLOR="#000000">or an Oracle backend, I would assume they would benefit from both the CL-SQL version and </FONT><BR>
    <FONT COLOR="#000000">the Postmodern version.  However, I think the Postmodern version is better-written.  I thank</FONT><BR>
    <FONT COLOR="#000000">Henrik very much for preparing such a well-written, easy-to-integrate backend.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">I did, however, have to make three changes to get this to work for me under SBCL.</FONT><BR>
    <FONT COLOR="#000000">Postmodern defines "db-error" incompatibly with the BDB backend, so I renamed the BDB symbol</FONT><BR>
    <FONT COLOR="#000000">from db-error to bdb-db-error.  This was one issue on a "handler-case" that I assume was </FONT><BR>
    <FONT COLOR="#000000">acceptable under Henrik's LISP, but didn't work under SBCL, or seem to follow the CLHS.</FONT><BR>
    <FONT COLOR="#000000">Finally, in shared-initialize :after method that builds the cache-indices I had to explicitly </FONT><BR>
    <FONT COLOR="#000000">set the slot to the initform, to prevent a reading of an unbound-slot.  I still have no idea</FONT><BR>
    <FONT COLOR="#000000">why the slot was unbound at that point, in spite of all documentation saying that it should be.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">I slightly modified Henrik's test to harmonize more with the CL-SQL version, and added an</FONT><BR>
    <FONT COLOR="#000000">example of using postmodern into the RUNTEST.lisp file.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">Describing this in the manual remains to be done; I don't have any immediate plans to do so.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">Personally, I think each backend adds to the overall usability of Elephant, and should broaden</FONT><BR>
    <FONT COLOR="#000000">our user base.  Particularly since one can migrate data from one backend to another, it would</FONT><BR>
    <FONT COLOR="#000000">seem that we are offering a solid platform.</FONT><BR>
    <BR>
    <FONT COLOR="#000000">Once this is officially released, users can expect the postmodern backend to be supported </FONT><BR>
    <FONT COLOR="#000000">indefinitely.  If we ever drop a backend, we will provide a way to migrate data out of it.</FONT><BR>
    <BR>
    <BR>
    <BR>
    <BR>
    <BR>
    <BR>
    <FONT COLOR="#000000">On Sat, 2007-05-12 at 16:46 +0200, Henrik Hjelte wrote: </FONT>
    <BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">I have made some changes to the postmodern postgresql backend. The darcs</FONT>
<FONT COLOR="#000000">repo is now based on the official elephant darcs repo, so patches can be</FONT>
<FONT COLOR="#000000">moved between them easily. The postmodern backend passes all "official"</FONT>
<FONT COLOR="#000000">tests, but has not been extensively tested with real data yet.</FONT>

<FONT COLOR="#000000">The db-postmodern tree can be found here:</FONT>
<FONT COLOR="#000000"><A HREF="http://common-lisp.net/project/grand-prix/darcs/elephant">http://common-lisp.net/project/grand-prix/darcs/elephant</A></FONT>

<FONT COLOR="#000000">/Henrik Hjelte</FONT>

<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">elephant-devel site list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</A></FONT>
<FONT COLOR="#000000"><A HREF="http://common-lisp.net/mailman/listinfo/elephant-devel">http://common-lisp.net/mailman/listinfo/elephant-devel</A></FONT>
</PRE>
    </BLOCKQUOTE>
<PRE>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">elephant-devel site list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:elephant-devel@common-lisp.net">elephant-devel@common-lisp.net</A></FONT>
<FONT COLOR="#000000"><A HREF="http://common-lisp.net/mailman/listinfo/elephant-devel">http://common-lisp.net/mailman/listinfo/elephant-devel</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>