PERSISTENT LISP OBJECTS!
Version 2.11 of May 28, 2005
The system PLOB! (Persistent Lisp
OBjects!) implements orthogonal persistency for LISP and
CLOS objects. Besides offering pure persistency, on the one side it
contains important database features like transactions, locking and
associative search over persistent objects. On the other side,
PLOB! mimics the features of CLOS' Metaobject Protocol (MOP) as
far as possible, e.g. by its implemented self-describing persistent
objects and support for class changes promoted dynamically to
persistent objects (schema evolution).
||It's funny I thought I should do things differently for a database,
but Plob lets you do things in a Lisp way.
|-- M. A.
An important topic was to make the interface between LISP and
persistency as transparent to the user as possible, without
sacrificing efficiency. PLOB! solves both problems: By
employing the possibilites of CLOS' MOP, the user interface to
persistency is as simple as it can be. In fact, using only a few
statements of LISP code will make instances of CLOS classes
declares a class
CL-USER 3 > (defclass person ()
((name :initarg :name :index (btree :test equal)))
person with its instances being
persistent and an index for associative search on its slot
name (actually, the class metaobject which represents the
person itself will become persistent, too). Using
some other statements will make ordinary LISP and structure objects
persistent. It is also possible to make CLOS objects persistent which
are out of the user's control, for example, instances where the
defclass defining the class is not available and cannot
be modified as indicated in the example above. Besides that,
PLOB! has the notion of persistent packages and persistent
symbols for binding persistent objects:
will bind the persistent instance generated from the
CL-USER 4 > (setf #!*a-person*
(make-instance 'person :name "Kirschke"))
make-instance call to the persistent symbol
*a-person*. Similar to transient packages and symbols, an
object can be bound to a persistent symbol and thereby gets persistent
CL-USER 5 > (setf #!*a-string* "A persistent string.")
... some years and LISP processes later ...
CL-USER 99 > #!*a-string*
"A persistent string."
PLOB!'s architecture is a true client/server-approach,
communicating by UNIX' standard RPCs. The server administers a
persistent object space; one or more clients can access the persistent
objects contained in the persistent object space. The multi-user
access is completely serialized, since the implemented transactions
and locking algorithm results in an isolation level of 3 according to
the SQL-92 definition. The server is a UNIX process running on one of
the machines mentioned below; the clients are processes running one of
the LISP systems mentioned below (especially, clients with different
LISP systems can connect concurrently to one server). By using UNIX'
standard RPCs, heterogenous operation is supported too, i.e. the
server and client can run on different operating or LISP systems.
Access to the persistent object space can be allowed or denied on a
Efficiency is gained by the low-level layers implemented in C, coupled
with sophisticated data modelling and object handling. By implementing
most of LISP's base types directly as base types into PLOB!,
the requirement for time-consuming conversions between transient LISP
objects and the persistent objects stored within the persistent object
space is kept to a minimum. To reduce the data exchange between client
and server, the client code provides for object preallocation and
object caching. A reference from a referencing persistent object to a
referenced persistent object can be marked as being
dependent; when a client loads the referee, the referenced
object will be transmitted within the same data block to the client,
Persistency itself is only half of the business; besides that,
PLOB! has implemented many database features, namely
transactions, locks and indices. Each access to persistent objects is
embedded into well-formed transactions, either by an explicit
transaction block opened by the user's code:
or, if the user didn't specify a transaction block, PLOB! will
surround each access by a transaction internally. In the above
example, embedding the code into a transaction assures that either all
changes done to persistent objects in the block will be committed to
the persistent object space or, e.g. in the case of an error at
proceeding the statements in the block, none of the changes will be
promoted to the database. Serialization between concurrent
transactions is provided by the two-phase transaction model adopted
CL-USER 6 > (with-transaction ()
... lots of more code ...
(setf #!*a-string* "Next persistent string.")
(setf #!*b-string* "Second string."))
The precondition for a transaction to be well-formed is that each
object accessed within a transaction is reserved for the accessor;
this is accomplished by PLOB's hierarchical lock
protocol. Locks can be requested on one of the levels slot, object or
whole database with the modes read, write or read-only. Page locking
is not supported, since this makes no sense for the heterogenous
population found in an object-oriented database.
For indices, PLOB! has persistent btrees, which are used
internally for various tables and are made available for the user's
purpose too as shown already above in the person class
example. It is also possible to use btrees directly:
will set *my-btree* to a persistent btree. The operations
on persistent btrees are very similar to those of hash tables, with
the difference of the keys being sorted. (Of course, LISP's hash
tables are supported too; PLOB! infringes no mapping from hash
tables to btrees.)
CL-USER 7 > (setf *my-btree* (make-btree :test 'equal))
PLOB! is distributed as free software, see the User's Guide for details. PLOB! will
run on the following LISP and operating systems:
The server of PLOB! uses the POSTORE subsystem, created within
the scope of the persistent programming language
Napier88 at the University of St. Andrews. Since the copyright on
POSTORE is owned by the University of St. Andrews, a server
installation is possible on request to me for other operating
systems. A client-only installation should be possible for other
operating systems with the distribution provided here, but requires a
Solaris, IRIX, Linux or Windows/NT machine running the PLOB
server near the client.
- LISP systems
- Supported are Harlequin LispWorks Common LISP up to and
including version 4.2 and Franz Allegro Common LISP up to and including
- Operating systems
- Full supported are Solaris 2.x, Linux kernel version 2.x, Windows
NT 4.0, Windows 2000 and Windows XP. The current distribution contains
an old IRIX distribution; if you are interested in an up-to-date IRIX
distribution, contact the author. For client-only
installations on other operating systems, see the explanations given
- System Resources needed
- The complete installation will take around 50 MB disk space, plus
the space allocated by the persistent objects administered by
PLOB. The memory requirements for the client are around 32 MB,
the server should be able to run with less memory.
Please use the download possibility referenced by PLOB's SourceForge
Please consult the bug tracking feature referenced by PLOB's SourceForge project page.
Please read the release notes associated to the latest release
referenced by PLOB's SourceForge project page.
Here is the list of changes for older
If you have any LISP software using PLOB!, please contact me if you would like a link
to be added here.
- Many people use PLOB! as a subsystem for CL-HTTP
- Here's a short report about a
project using PLOB! in combination with CL-HTTP at the
University of Maastricht for organizing the writing assignments of
All publications are in german unless otherwise noted.
in objekt-orientierten Programmiersprachen.
Logos Verlag, Berlin. 1997.
Feel free to contact me on any questions, remarks and hints:
- Mailing list
- There is a mailing list email@example.com
To subscribe, use either the mailing list administration interface, or send an
email with `subscribe' in the email's body to firstname.lastname@example.org:
For unsubscribing, send an email with
`unsubscribe' in the email's body to email@example.com:
--text follows this line--
The end line is only necessary if there might be a
--text follows this line--
Post your messages to firstname.lastname@example.org,
is used only for subscribing and administration. Purpose of this
mailing list is to get support on installing and using PLOB,
for reporting bugs, for getting announcements on new versions and for
general topics on persistency, in this order. It is by intention a
low-traffic mailing list.
The opinions expressed on this page and in the written documentation
are completely that of my own.
- Here is a translation of an older version of this page into german done by AltaVista's babelfish.
Last modified: Wed May 25 11:04:50 2005