[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing Ozone from a servlet

Hi Falko,

If I get it correctly, then you'd probably loose more by the lack of
concurrency than, you'd gain by avoiding the socket communication and
it's better to access ozone using a remote database in a servlet...

To come back on the serialization issue, does it means that there is a
trade-off to find between "small objects" which will mean a huge
serialization traffic but a good concurrency (as the locks are handle at
the object level and transactions per method call) and "fat objects"
with big methods which will mean less serialization (they can handle
more by themselves) but less concurrency ?



Falko Braeutigam wrote:
> On Mon, 17 Jan 2000, Eric van der Vlist wrote:
> > Hi,
> >
> > I am still wondering if the architecture I am currently using couldn't
> > be optimized :
> >
> > HTML browser
> >    | ^
> >    V |
> > Apache web server
> >    | ^
> >    V |
> > Jserv servlet
> >    | ^
> >    V |
> > ozone OODBMS
> >
> > All being done through sockets (I've seen in previous posts that they
> > could be a bottleneck) by different OS processes...
> >
> > I need to keep the apache web server (highly scalable and configurable
> > and I won't switch all the sites on my server at the same time).
> >
> > I don't see how I can do without the servlet... thus my question :
> >
> > Isn't it a way to run ozone and jserv in the same VM ?
> >
> > I have seen that you've got remote and local databases classes.
> Yes, LocalDatabase is the way to use ozone "embedded" in the client VM. This
> should also work with servlets and jserv.
> But in most cases the real bottleneck is the serialization of the method
> arguments - not the socket communication. Of course, we can pass arguments of a
> local method call by reference but this may lead to very ugly bugs if you try
> to use the same code for local and remote connections. So we decided to copy
> also arguments of local calls.
> >
> > If I was using a local database in a servlet, would if be run in a
> > separate thread and be accessible by different servlet threads handling
> > different requests ?
> No. A LocalDatabase can be accessed by different threads but one database
> connection (RemoteDatabase or LocalDatabase) cannot handle nested requests.
> (methods on LocalDatabase are synchronized). If you have a RemoteDatabase, then
> you can use one connection for each thread. With LocalDatabase you have to use
> one connection for all threads. This means a thread trying to access the
> database can be blocked by another thread.
> Falko
> --
> ______________________________________________________________________
> Falko Braeutigam                         mailto:falko@softwarebuero.de
> softwarebuero m&b (SMB)                    http://www.softwarebuero.de

Eric van der Vlist                                              Dyomedea

http://www.dyomedea.com                          http://www.ducotede.com