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

Re: The lightbulb just isn't going on....



On Tue, 09 May 2000, Ray Allis wrote:
> Falko Braeutigam wrote:
> > 
> > Okay, then here goes our Tuesday-afternoon-quick-and-dirty-tutorial ;)
> > 
> > objects. So instead of creating an object via new <classname> - createObject()
> > is called. In the client probably a RemoteDatabase object represents the
> > database. Because of the single-instance architecture of ozone this *always*
> > creates an object inside the server.
> 
> > server over a socket connection which is very slow. The proper way is to put the
> > populate code in the Garage class which is a database class itself. Then you
> > don't need explicite transaction *and* the code is much faster because in runs
> > inside the server -- That's the difference ;)
> > 
> > Hope this helps.
> 
> I'm still missing some insight. ;) How does this apply to the
> samples/XML/Store?
A DOM parser, which populates a document with nodes, should be a database class
(or be wrapped be a database class) to let its code run inside the server.

> I don't see how I get an object into the database with methods to be
> executed 
> on the server.
???

Again, calling createObject() on any implementation of OzoneInterface
(RemoteDatabase, LocalDatabase, Database) *always* creates an object inside the
server. The question is: where does the code run that calls createObject().

> Is this what the Repository is about?  
No. AFAIK the Repository was our first try to provide a XML store on top of
ozone. Of course the Repository code handles server/client side distribution
transparently but this was not the primarly goal.

> Looks
> interesting, but
> "XMLRepository.java:13: Package org.ozoneDB.xml.repository not found in
> import".
> (This is ozone-0.4.zip)
> 
> In samples/XML I changed:
>                 pDoc = store_parseAtClientSide (docName);
> to:
>                 pDoc = store_parseAtServerSide (docName);
> 
> called it 'Stores'.  I don't see the 27 times improvement.

With the example in my post I wanted to show the differences between calling
createObject() in server side or client side code. The different code in the
Store.java examples shows the difference between *parsing* XML on the client or
the server. parseAtCerver() simply sends the XML text to the server where
parseAtClient send a (non-persistent) DOM tree to the server. Both
parseAtClientSide() and parseAtServerSide() actually calling createObject
inside the server. So your measurements do reflect the difference between the
two ways of parsing and nothing else.


Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de