[elephant-devel] (no subject)

Robert L. Read read at robertlread.net
Thu Dec 15 20:50:28 UTC 2005


On Thu, 2005-12-15 at 14:32 -0500, Waldo Rubinstein wrote:

> Hi,
> 
> I'm fairly new to Lisp and very new to Elephant. I'm thinking of  
> developing some apps using UCW and Elephant and was wondering a few  
> things:

Welcome.

> 
> 1) Is Elephant ready for production code even though it's still on  
> version 0.3.0?

I intend to use it for production; I wouldn't let an Astronaut's life
depend on it.
I think this is a very difficult question to answer.  I worked as a Java
programmer for 5 years
and as a Perl programmer before that; we were always doing things to be
more "enterprise ready"
and believe me, everything has problems.  I personally am much more
ready to say something
is "production ready" than others, so I might be the wrong person to
answer this.  As a fan
of the extreme programming methodology, I would recommend a "Spike
Solution" test ---
design a simple test that can be rapidly executed to get the information
you need.

> 2) How scalable is Elephant? I feel confident that Berkeley DB is  
> very robust even for large data repositories. But, does Elephant  
> scale well working with large repositories?

I think so.  I am the maintainer, not the author of the original code.
I wrote the SQL-based stuff;
it is slower and possibly has bugs the BerkeleyDB stuff doesn't.  It
runs my tiny website 
flawlessly, and comes with a suite of tests.

> 3) My application generates a lot of records. Some of these objects  
> (records) have complex structures (many levels of inheritance and  
> relations) and some are very flat. The ones that are very flat are  
> normally very large quantities (at least for me). I may be generating  
> about 10000 new simple objects on a daily basis. Does anyone have any  
> suggestion as to the proper storage of these? Would using something  
> like a btree be efficient enough for fast querying?

The BerkeleyDB system uses btrees.  Yes, the btrees offered by
BerkeleyDB (and extention by 
Elephant) are very fast, and there is nothing faster except in very
specialized circumstances.

> 4) Is there any support for "LIKE" type searches in Elephant? Some of  
> the queries I currently run against MySQL are along the lines of  
> WHERE last_name LIKE 'smit%'. I would assume I could create secondary  
> indices for last_name (as an attribute), but will it allow me to do  
> "LIKE" searches?

No, there isn't any support for that (that I'm aware of?).  You could
keep the field that has 'smit*' in
it in a separate table, and perform a pattern match by loading it all
into memory, or calling map-btree
over it, and then look up the rest of the objects based only on the
matches.

Personally, I use Elephant in an "Object Prevalence" style --- that is,
I keep all the objects in 
memory by default, and use the Elephant store to recover from bugs and
tripping over the 
power cord.  Some people object quite emotionally to that style, and
worry about running
out of memory.  If you keep things in memory, "like" is easily done in
lisp.
If your object space is very large and you need like, you would probably
want to just use CL-SQL directly;
it is very nice.  Elephant saves you from having to worry about SQL and
table structures.

> 
> Thanks for your support,
> Waldo
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/elephant-devel/attachments/20051215/07a930a5/attachment.html>


More information about the elephant-devel mailing list