You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Armin Waibel <ar...@apache.org> on 2008/01/25 03:03:44 UTC

Re: Scaling

Hi JohnE,

johne wrote:
> We have been using OJB for a long time for http://www.jobbank.com, but we are
> working on a revised version of the job site for a new country.  The
> application needs to be able to scale in a potentially massive way.
> 
> I am looking at different distributed caching strategies and am looking for
> opinions on what might work best with OJB.   Terracotta is interesting
> because it seems scalable without the big distributed hits that other
> caching mechanisms seem to get, but I am still very much at the start of
> this all and can use any ideas possible on how best to scale a OJB solution.

OJB is shipped with a simple multi threaded performance test:
http://db.apache.org/ojb/docu/guides/performance.html#OJB+performance+in+multi-threaded+environments
If you write your own ObjectCache implementation this could help to 
check performance.

The OJB cache works in two ways:
1. If you do a "lookup by identity" or "query by identity"
http://db.apache.org/ojb/docu/tutorials/pb-tutorial.html#Find+object+by+primary+key
OJB can lookup the object in the cache without a database roundup.
2. A query will always lead to a DB roundup. OJB build the object 
identity from the result set and checks against the cache. If not in the 
cache OJB materialize the full object from the result set, otherwise the 
cached object is returned.

If the queries vary much (many different keyword/keyword combinations) 
OJB's cache doesn't help much. In this case a "fast" database server 
(and OJB with a session cache/ "per broker cache") will increase the 
performance of the whole application more then a distributed cache.

All in all OJB seems to scale very well in multi threaded environments. 
For the upcoming 1.0.5 version (I will provide the 1.0.5rc1 tomorrow) I 
run OJB's performance test against other popular persistence layer and 
OJB looks fine - but I have to admit that this test is too simply to 
allow a general rating.

regards,
Armin

> 
> Though I do not write often, I am always following the development boards
> and user boards here and thank you for your efforts Armin.
> 
> JohnE
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org