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

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



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?
I don't see how I get an object into the database with methods to be
executed 
on the server.  Is this what the Repository is about?  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. 

163 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Remove
test.xml
filename: test.xml
hostname: localhost
Remove Document from DataBase!
164 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Store
test.xml
filename: test.xml
hostname: localhost
parse into memory time: 1334 ms
store time (parsed at client side): 13403 ms
165 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Remove
test.xml
filename: test.xml
hostname: localhost
Remove Document from DataBase!
166 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Store
test.xml 
filename: test.xml
hostname: localhost
parse into memory time: 1055 ms
store time (parsed at client side): 2941 ms
167 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Remove
test.xml
filename: test.xml
hostname: localhost
Remove Document from DataBase!
168 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Stores
test.xml
filename: test.xml
hostname: localhost
parse + store time (parsed at server side): 4140 ms
169 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Remove
test.xml
filename: test.xml
hostname: localhost
Remove Document from DataBase!
170 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Stores
test.xml
filename: test.xml
hostname: localhost
parse + store time (parsed at server side): 4387 ms
171 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:

I did not get test2.xml through Store; the database closed my connection
before Store finished.  So I reduced test2.xml:

185 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:wc test2.xml 
    4196   18116  159339 test2.xml
186 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:wc test7.xml 
    2305   10452   89289 test7.xml

181 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Store
test7.xml 
filename: test7.xml
hostname: localhost
parse into memory time: 1135 ms
store time (parsed at client side): 424220 ms
182 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Remove
test7.xml
filename: test7.xml
hostname: localhost
Remove Document from DataBase!
183 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:ojvm Stores
test7.xml
filename: test7.xml
hostname: localhost
parse + store time (parsed at server side): 404248 ms
184 memes.sea.boeing.com /export/home/ray/ozone/samples/XML:

Ray Allis - ray.allis@boeing.com