Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: Francis Hwang
RE: Thread safety [ reply ]  
2004-03-04 01:00
I should say first that I haven't had a chance to heavily test or use Lafcadio this way. Off the type of my head I can't think of any serious problems that might arise from this, above and beyond the concurrency problems you can sometimes get in MySQL in general, with or without Lafcadio.

One thing to keep in mind is that ObjectStore caches all the DomainObjects that are created from the first SELECT or INSERT. So if you have an instance of ObjectStore in a long-running process it will eventually try to replicate the entire DB in RAM, which can be a problem unless you have a tiny DB or massive amounts of RAM. There is some limited facility for releasing DomainObjects to be garbage-collected -- @@objectStore.flush( domain_object ) -- but nothing that full-featured yet.

Francis

By: Dima Sabanin
Thread safety [ reply ]  
2004-03-01 07:57
I'm using Lafcadio in my Muravey-Tools project, as you may remember, and I have a question about it thread safety. Is it ok to do this?
@@objstore = ObjectStore.getObjectStore
@@objstore will be accessed from multiple threads, with calls like commit, getObject and so on.