Re: CLOS persistence



On Jan 4, 6:13 am, vtail <victor.kryu...@xxxxxxxxx> wrote:
Interesting. At that point elephant seems to be easier to use, because
it has some pretty good documentation and tutorial, and is asdf-
installable. I have nothing wrong with getting a package via darcs -
in fact, distributing your sources via some distributed SCM is
probably the best way to involve community in development - but I
spent several hours yesterday trying to install all the dependencies
(and it still doesn't run: (asdf:oos 'asdf:load-op 'cl-perec) reports
"The name CL-PEREC does not designate any package" while doing 14:
(COMPILE-FILE #P"/home/victor/.sbcl/site/cl-perec/
configuration.lisp")). On the other hand, I really don't like how it's
Hmm, I don't know what causes that, maybe you could send some more
details to the devel list?

misusing database backend for a hash. If cl-perec provides a better
map between objects and database, it's worth a serious
consideration!
Cl-perec basically maps each persistent class into a table (which is
created automagically) and some persistent associations (namely the
many-to-many ones) too. The class tables have one (in non default
modes two) extra column for the oid and one or multiple columns per
each primitive slot and the usal foreign key columns for associations.
If a persistent class is abstract and would not have a column at all
then it does not have a table to avoid unnecessary inserts. Persistent
instances are cached within the transaction and their (slot) data is
prefetched and cached upon first access or when querying. Within a
transaction it is guaranteed that two instances will be eq iff their
oid is the same independently of how you got the two instances (by
querying or navigating, etc.)

I understand that making (good) documentation takes a lot of effort
and reading cases / sources is usually enough, but having good quick
tutorial + API documentation simplify things big way. Have you
considered any tools that automatically extracts documentation strings
(like doc/manual/docstrings.lisp from the sbcl source tree or such)?
No, not yet, but patches are always welcomed! ;-)

control different threads for using different connections etc. - am I
right that cl-rdbms is thread-safe by default?
It is, we are using it in an application with more than 50 threads per
node and sometimes threads may even require nested transactions.

On the other hand, CLSQL supports sqlite, which is an important
backend IMHO - very easy to install and sometimes faster than
Postgresql due to lower overhead. How hard it is to add sqlite backend
to cl-rdbms?
I think it's quite straightforward but might take a couple of days to
do correctly. Basically you need to subclass the database and
transaction classes, write some generic functions to connect/
disconnect, do some reflection on tables, prepare and execute a
statement and specialize the SQL printer if needed.

If you look at the postgresql backend, it's only 370 LOC (based on
postmodern) which is not that much after all. The oracle backend is
nearly 2000 LOC not counting the generated CFFI interface.

levy
.



Relevant Pages

  • Re: The Problems of TeX
    ... it straightforward to install texlive 2007 on a Linux system. ... I had never done any non-trivial configuration of TeX distributions ... But you do fall into the category of `Unix expert', ... Emacs documentation is, on its own, ...
    (comp.text.tex)
  • Re: Installing AIX OS on SAN disks?
    ... You will need to install the driver for the Clariion: ... Plus install Navisphere and Power Path. ... Loading the OS on the SAN disk is pretty straight forward, ... I received some documentation from one of the IBM Global Services ...
    (AIX-L)
  • Re: The Problems of TeX
    ... the user already knows about TeX and friends. ... Documentation is poor, ... I don't see that many people are in a position to install a TeX ... But you do fall into the category of `Unix expert', ...
    (comp.text.tex)
  • Re: solaris
    ... In FreeBSD I can't see a lack. ... the lact of documentation is one of the ... you cannot install an MS operating system then perhaps ... 'time consuming for your techies'? ...
    (freebsd-questions)
  • Re: PVR, Freeview & DVD recorder question
    ... large harddisks installed (loaded with MythTV), ... the backend server. ... want another room to have access, just get a pc box install MythTV and ... harddisks will replace writable dvd's - harddisk caddies systems like ...
    (uk.tech.digital-tv)