Update of /project/elephant/cvsroot/elephant In directory common-lisp.net:/tmp/cvs-serv30677
Modified Files: CREDITS INSTALL Makefile NEWS TODO elephant-tests.asd elephant.asd Added Files: ele-bdb.asd ele-clsql.asd ele-sqlite3.asd Log Message: This is the big merger from the SQL-BACK-END branch.
Date: Wed Nov 23 18:51:32 2005 Author: rread
Index: elephant/ele-bdb.asd diff -u /dev/null elephant/ele-bdb.asd:1.2 --- /dev/null Wed Nov 23 18:51:32 2005 +++ elephant/ele-bdb.asd Wed Nov 23 18:51:31 2005 @@ -0,0 +1,59 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;; +;;; ele-clsql.asd -- ASDF system definition for +;;; a CL-SQL based back-end for Elephant +;;; +;;; Initial version 10/12/2005 by Robert L. Read +;;; read@robertlread.net +;;; +;;; part of +;;; +;;; Elephant: an object-oriented database for Common Lisp +;;; +;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee +;;; ablumberg@common-lisp.net blee@common-lisp.net +;;; +;;; This program is released under the following license +;;; ("GPL"). For differenct licensing terms, contact the +;;; copyright holders. +;;; +;;; This program is free software; you can redistribute it +;;; and/or modify it under the terms of the GNU General +;;; Public License as published by the Free Software +;;; Foundation; either version 2 of the License, or (at +;;; your option) any later version. +;;; +;;; This program is distributed in the hope that it will be +;;; useful, but WITHOUT ANY WARRANTY; without even the +;;; implied warranty of MERCHANTABILITY or FITNESS FOR A +;;; PARTICULAR PURPOSE. See the GNU General Public License +;;; for more details. +;;; +;;; The GNU General Public License can be found in the file +;;; LICENSE which should have been distributed with this +;;; code. It can also be found at +;;; +;;; http://www.opensource.org/licenses/gpl-license.php +;;; +;;; You should have received a copy of the GNU General +;;; Public License along with this program; if not, write +;;; to the Free Software Foundation, Inc., 59 Temple Place, +;;; Suite 330, Boston, MA 02111-1307 USA +;;; + +(defsystem ele-bdb + :name "ele-bdb" + :author "Robert L. Read read@robertlread.net" + :version "0.1" + :maintainer "Robert L. Read read@robertlread.net" + :licence "GPL" + :description "Berkeley-DB based Object respository for Common Lisp" + :long-description "Including this loads the Berkeley-DB code; you may have to edit the pathname!" + + :components + ((:module :src + :components + ((:file "bdb-enable") + ) + :serial t)) + :depends-on (:elephant ))
Index: elephant/ele-clsql.asd diff -u /dev/null elephant/ele-clsql.asd:1.2 --- /dev/null Wed Nov 23 18:51:32 2005 +++ elephant/ele-clsql.asd Wed Nov 23 18:51:31 2005 @@ -0,0 +1,60 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;; +;;; ele-clsql.asd -- ASDF system definition for +;;; a CL-SQL based back-end for Elephant +;;; +;;; Initial version 10/12/2005 by Robert L. Read +;;; read@robertlread.net +;;; +;;; part of +;;; +;;; Elephant: an object-oriented database for Common Lisp +;;; +;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee +;;; ablumberg@common-lisp.net blee@common-lisp.net +;;; +;;; This program is released under the following license +;;; ("GPL"). For differenct licensing terms, contact the +;;; copyright holders. +;;; +;;; This program is free software; you can redistribute it +;;; and/or modify it under the terms of the GNU General +;;; Public License as published by the Free Software +;;; Foundation; either version 2 of the License, or (at +;;; your option) any later version. +;;; +;;; This program is distributed in the hope that it will be +;;; useful, but WITHOUT ANY WARRANTY; without even the +;;; implied warranty of MERCHANTABILITY or FITNESS FOR A +;;; PARTICULAR PURPOSE. See the GNU General Public License +;;; for more details. +;;; +;;; The GNU General Public License can be found in the file +;;; LICENSE which should have been distributed with this +;;; code. It can also be found at +;;; +;;; http://www.opensource.org/licenses/gpl-license.php +;;; +;;; You should have received a copy of the GNU General +;;; Public License along with this program; if not, write +;;; to the Free Software Foundation, Inc., 59 Temple Place, +;;; Suite 330, Boston, MA 02111-1307 USA +;;; + +(defsystem ele-clsql + :name "ele-clsql" + :author "Robert L. Read read@robertlread.net" + :version "0.1" + :maintainer "Robert L. Read read@robertlread.net" + :licence "GPL" + :description "SQL-based Object respository for Common Lisp" + :long-description "An experimental CL-SQL based implementation of Elephant" + + :components + ((:module :src + :components + ((:file "sql-controller") + (:file "sql-collections") + ) + :serial t)) + :depends-on (:elephant :clsql :cl-base64))
Index: elephant/ele-sqlite3.asd diff -u /dev/null elephant/ele-sqlite3.asd:1.2 --- /dev/null Wed Nov 23 18:51:32 2005 +++ elephant/ele-sqlite3.asd Wed Nov 23 18:51:31 2005 @@ -0,0 +1,59 @@ +;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;; +;;; ele-clsql.asd -- ASDF system definition for +;;; a CL-SQL based back-end for Elephant +;;; +;;; Initial version 10/12/2005 by Robert L. Read +;;; read@robertlread.net +;;; +;;; part of +;;; +;;; Elephant: an object-oriented database for Common Lisp +;;; +;;; Copyright (c) 2004 by Andrew Blumberg and Ben Lee +;;; ablumberg@common-lisp.net blee@common-lisp.net +;;; +;;; This program is released under the following license +;;; ("GPL"). For differenct licensing terms, contact the +;;; copyright holders. +;;; +;;; This program is free software; you can redistribute it +;;; and/or modify it under the terms of the GNU General +;;; Public License as published by the Free Software +;;; Foundation; either version 2 of the License, or (at +;;; your option) any later version. +;;; +;;; This program is distributed in the hope that it will be +;;; useful, but WITHOUT ANY WARRANTY; without even the +;;; implied warranty of MERCHANTABILITY or FITNESS FOR A +;;; PARTICULAR PURPOSE. See the GNU General Public License +;;; for more details. +;;; +;;; The GNU General Public License can be found in the file +;;; LICENSE which should have been distributed with this +;;; code. It can also be found at +;;; +;;; http://www.opensource.org/licenses/gpl-license.php +;;; +;;; You should have received a copy of the GNU General +;;; Public License along with this program; if not, write +;;; to the Free Software Foundation, Inc., 59 Temple Place, +;;; Suite 330, Boston, MA 02111-1307 USA +;;; + +(defsystem ele-sqlite3 + :name "ele-sqlite3" + :author "Robert L. Read read@robertlread.net" + :version "0.1" + :maintainer "Robert L. Read read@robertlread.net" + :licence "GPL" + :description "Berkeley-DB based Object respository for Common Lisp" + :long-description "Including this loads the Berkeley-DB code; you may have to edit the pathname!" + + :components + ((:module :src + :components + ( + ) + :serial t)) + :depends-on (:elephant :clsql :cl-base64 :clsql-sqlite3))
Index: elephant/CREDITS diff -u elephant/CREDITS:1.5 elephant/CREDITS:1.6 --- elephant/CREDITS:1.5 Tue Oct 18 20:58:37 2005 +++ elephant/CREDITS Wed Nov 23 18:51:31 2005 @@ -2,8 +2,14 @@ Authors: Andrew Blumberg and Ben Lee ablumberg@common-lisp.net and blee@common-lisp.net
+Current maintainer: Robert L. Read +read@robertlread.net + http://www.common-lisp.net/project/elephant
+ +The CL-SQL based backend was written by Robert L. Read. + Thanks to:
Sleepycat for Berkeley DB, especially Ron Cohen and Michael @@ -38,4 +44,5 @@ Various other people whom I'm forgetting who answered my many idiotic questions
-test +Dan Knapp fixed the fact that nil's were indistinguishable from +unbound slots, and proved the system works with SQLite3.
Index: elephant/INSTALL diff -u elephant/INSTALL:1.11 elephant/INSTALL:1.12 --- elephant/INSTALL:1.11 Fri Oct 8 04:32:36 2004 +++ elephant/INSTALL Wed Nov 23 18:51:31 2005 @@ -3,8 +3,9 @@ Requirements ------------
-CMUCL 19a, SBCL 0.8.14, OpemMCL 0.14.2, or Allegro CL 6.2. -I've tested under x86 FreeBSD, Linux and PPC Darwin. I +CMUCL 19a, SBCL 0.9.5, OpemMCL 0.14.2, or Allegro CL 6.2. +This version ahs been tested under Linux and SBCL 0.9.5, but +Dan Knapp has also run something very closed under Darwin. can't personally test Win32 but I've compiled under Visual Studio .NET and a user has gotten it to work with Visual Studio 6. A Lispworks version will come if requested. @@ -12,6 +13,7 @@ ASDF - http://www.cliki.net/asdf
UFFI 1.4.24+ - http://uffi.b9.com +(I have been testing with UFFI 1.5.4 and I recommend you use that.)
I've patched src/functions.lisp to support some kinds of :out arguments. it is backwards-compatible so shouldn't @@ -19,11 +21,7 @@ 1.4.25+, but just in case you have 1.4.24 I have included it.
-Sleepycat Berkeley DB 4.2 - http://www.sleepycat.com - -The version number is important -- the headers have changed -siginificantly. When 4.3 comes out, I'll have to reroll my -constants..... +Sleepycat Berkeley DB 4.3 - http://www.sleepycat.com
A C compiler, probably gcc or Visual Studio. Presumably you have this if you installed Sleepycat. @@ -36,7 +34,7 @@
0) Unpack Elephant. I put mine in the directory
-/usr/local/share/common-lisp/elephant-0.1/ +/usr/local/share/common-lisp/elephant-0.3/
1) Install UFFI. If you're using 1.4.24 replace
@@ -44,18 +42,24 @@
with the provided file.
-2) Install Berkeley DB 4.2. Under Un*x, you may actually +2) Install a backend: Either Berkeley DB 4.3, PostGresql, or SQLite 3. + +For relational database systems, refering the formal documentation +other the heading "SQL-BACK-END". + +For Berkeley 4.3: +Under Un*x, you may actually already have this installed, though it may be compiled with funny options, so if things don't work you may want to try to start from scratch. FreeBSD has a port for this, as I'm sure do other BSDs (including Darwin/Fink.) Take note of where libdb.so and db.h are installed (usually -/usr/local/BerekleyDB.4.2/lib/libdb.so and -/usr/local/BerekleyDB.4.2/include/db.h, or +/usr/local/BerekleyDB.4.3/lib/libdb.so and +/usr/local/BerekleyDB.4.3/include/db.h, or /usr/local/lib/db42/libdb.so and /usr/local/include/db42/db.h.)
-3) Compile and install the libsleepycat shared library. +Compile and install the libsleepycat shared library.
Under Un*x, edit Makefile and run (using GNU make, gmake on BSD) @@ -64,15 +68,26 @@
This compiles src/libsleepycat.c and installs it into
-/usr/local/share/common-lisp/elephant-0.2/ +/usr/local/share/common-lisp/elephant-0.3/ + +You probably have to make sure this directory exists before running +make install. + +If you need to change this path, you will change it in the Makefile +and also in controller.lisp on the line: + +(defvar *elephant-lib-path* "/usr/local/share/common-lisp/elephant-0.3/")
or where you specified. On Darwin / OS X you need to have -the developer tools installed. +the developer tools installed. In the Makefile and other places +there are commented-out lines showing settings that some users have used for +OS X; if you are using that I assume you will have to comment out the +appropriate lines and uncomment those examples.
For Win32 (directions courtesy of Bill Clementson):
Create an MSVC dll project and add src/libsleepycat.c, -src/libsleepycat.def and the Berkeley DB libdb42.lib files +src/libsleepycat.def and the Berkeley DB libdb43.lib files to the project (should be in the build_win32/release folder)
Add the Berkeley DB dbinc include files directory and the @@ -82,11 +97,11 @@
Build the Elephant DLL file
-Since you've statically included libdb42.lib inside +Since you've statically included libdb43.lib inside libsleepycat.c, it may or may not be necessary to load -libdb42.dll into Lisp (see below.) +libdb43.dll into Lisp (see below.)
-4) Compile and load Elephant: +3) Compile and load Elephant:
First, edit src/sleepycat.lisp so that it points to the correct libraries. If you're using Un*x and ASDF, this is @@ -110,6 +125,9 @@ ----------- Quick Start ----------- +(These instructions were correct for Elephant 0.2. They +are now somewhat obsolete in Elephant 0.3; better information +can be found in the formal documentation.)
For more complete documentation see TUTORIAL and NOTES. But a REPL session is worth a thousand words, so ...
Index: elephant/Makefile diff -u elephant/Makefile:1.6 elephant/Makefile:1.7 --- elephant/Makefile:1.6 Thu Feb 24 02:06:20 2005 +++ elephant/Makefile Wed Nov 23 18:51:31 2005 @@ -7,9 +7,16 @@ SHELL=/bin/sh UNAME:=$(shell uname -s)
-DB43DIR=/db/ben/lisp/db43 +# DB43DIR=/db/ben/lisp/db43 +# Dan Knapp contributed this line, which came form OS X? +#DB43DIR=/sw +# But I will assume that Linux is more common? +DB43DIR=/usr/local/BerkeleyDB.4.3/ + DBLIBDIR=$(DB43DIR)/lib/ DBINCDIR=$(DB43DIR)/include/ +# Dan Knapp contributed this line; for fink/OS X? +#DBINCDIR=$(DB43DIR)/include/db4/
# *BSD users will probably want #DBLIBDIR=/usr/local/lib/db43 @@ -21,6 +28,12 @@ SHARED=-shared endif
-libsleepycat.so: src/libsleepycat.c - gcc $(SHARED) -Wall -L$(DBLIBDIR) -I$(DBINCDIR) -fPIC -O3 -o $@ $< -ldb -lm +all: libsleepycat.so libmemutil.so + +libmemutil.so: src/libmemutil.c + gcc $(SHARED) -Wall -fPIC -O3 -o $@ $< -lm + +libsleepycat.so: src/libsleepycat.c + gcc $(SHARED) -Wall -L$(DBLIBDIR) -I$(DBINCDIR) -fPIC -O3 -o $@ $< -ldb -lm +
Index: elephant/NEWS diff -u elephant/NEWS:1.6 elephant/NEWS:1.7 --- elephant/NEWS:1.6 Fri Oct 8 02:53:04 2004 +++ elephant/NEWS Wed Nov 23 18:51:31 2005 @@ -1,3 +1,8 @@ +November 30, 2005 - Elephant 0.3.0 released by +the new maintainer, Robert L. Read, providing +support for relational database backends, repository +migration, and multi-repository operation. + October 7, 2004 -
Elephant 0.2.1 released. Thanks to Bill Clementson,
Index: elephant/TODO diff -u elephant/TODO:1.7 elephant/TODO:1.8 --- elephant/TODO:1.7 Tue Sep 21 21:34:37 2004 +++ elephant/TODO Wed Nov 23 18:51:31 2005 @@ -1,5 +1,20 @@ Merge in the todos from the source and the NOTES!
+October 19, 2005 + +The SQL back-end stuff has only been tested with +Postgress and SBCL. + +Using SQLite and mysql would really expand the +usage of the system, I assume. + +The database-stuff is fairly slow since it +does normal serialization and then Base64 encoding. +This is very safe and simple, but costs us a lot of bytes +to and from the database; a better serializer would +make things MUCH faster. + + new counters in 4.3 (october)
understand the profiler / timer, tweak performance of CLOS
Index: elephant/elephant-tests.asd diff -u elephant/elephant-tests.asd:1.3 elephant/elephant-tests.asd:1.4 --- elephant/elephant-tests.asd:1.3 Thu Feb 24 02:07:55 2005 +++ elephant/elephant-tests.asd Wed Nov 23 18:51:31 2005 @@ -58,6 +58,7 @@ (:file "mop-tests") (:file "testcollections") (:file "testsleepycat") + (:file "testmigration") ) :serial t))) - \ No newline at end of file +
Index: elephant/elephant.asd diff -u elephant/elephant.asd:1.7 elephant/elephant.asd:1.8 --- elephant/elephant.asd:1.7 Thu Feb 24 02:07:54 2005 +++ elephant/elephant.asd Wed Nov 23 18:51:31 2005 @@ -60,8 +60,8 @@ (:file "cmu-mop-patches") (:file "metaclasses") (:file "classes") - (:file "collections") (:file "controller") + (:file "collections") (:file "serializer")) :serial t)) :depends-on (:uffi))