Re: That's what I did!
João Ribeiro <[email protected]> Thu, 27 Nov 2003 12:04:05 +0000
| Newsgroups | gmane.comp.java.enhydra.general |
|---|---|
| Message-ID | <[email protected]> |
Hi! Coments inline. Regards. João Paulo Ribeiro Axel Wilhelm Berle wrote: > Hi Vladimir, > > that's exactly the solution that I found. I examined > the code and pondered if I should do a hack. But than > I just set the DODS_HOME variable via > System.setProperty before launching DODS .. and it > worked. > > Thanks for your help! > > I still have some questions about the "correctness" of > DODS as a caching manager. One of my concernes is that > two or more threads access and try to update the same > DO (this concern has been mentioned in the online > manuals). How do I prevent this? (or how do I deal > with it?) Isn't that a major drawback? > > The other question is, how do I use the SQL feature > OFFSET and LIMIT? Often you need just a "page" of a > table and it would be a big waste to load the entire > table and throw away the parts you don't need! The > best solution for this (I suppose the database > optimizes this) would be the use of OFFSET and LIMIT. The problem with OFFSET and LIMIT is that if you need two pages you need two offsets and you will need to do two queries. Other points of view: 1) From a database point of view the best aproach is cursors. The values are kep at db and you only fetch what you need when you need it. If you need two page you only have to made one query and fetch the rows you need. This spend db resources and is more dificult to control from a web aplication point of view. You need the connection and resutset always open. This used only for special data and special cases. 2) Application cache. You can keep the values in cache and get them when you need. The advantage is that you use less database resources and can improve speed if the values are used by more than one user/application. The Dods LRU cache can be a good approach for doing that. Its the same approch as cursors but the data is kept at the application to be fetched as you need it so the resources are spended at the aplication and not the db. I think this will be a better approach from a web application point of view. > > I would like to use DODS for some work at a university > where I am tutoring some students and for this end I > feel that a more "scientific" documentation would be > necessary, explaining how the caching works, etc. > (well, this is just my personal whishing list!) > > > Thanks for your time, > > Axel > > > > > > > > > > > > > > > > > > > > > > > Message: 2 > Date: Wed, 26 Nov 2003 08:52:46 -0800 (PST) > From: Vladimir Ritz Bossicard <[email protected]> > Subject: Re: Enhydra: Re: Dods standalone program > (Vladimir Ritz > Bossicard) > To: [email protected] > Reply-To: [email protected] > > >>Still the same message: JVM can not find neither > > DODS > >>HOME nor ENHYDRA HOME! > > > what I do is a HUGE hack. But it works: > > 1) set the dods home location in a property of the > servlet (web.xml > file) > > <servlet> > <servlet-name>ApplicationGateway</servlet-name> > > <init-param> > <param-name>DodsHome</param-name> > > <param-value>/opt/java/install/dods-5.1</param-value> > </init-param> > > <init-param> > <param-name>DodsConfig</param-name> > > <param-value>/home/vladimir/proto/test/config/dods.conf</param-value> > </init-param> > > 2) in your servlet initialization code: > > System.setProperty("DODS_HOME", > config.getInitParameter("DodsHome")); > DODS.startup(config.getInitParameter("DodsConfig")); > > I won't say that it's a nice solution, but it does the > job. > > hth > > -Vladimir > > > ===== > Vladimir Ritz Bossicard > www.bossicard.com > > > > ===== > Axel Wilhelm Berle > > e-mail: [email protected] > Tel: (office) +55 16 618.0090 > (mobile) +55 16 9964.6343 > > __________________________________________________________________ > > Gesendet von Yahoo! Mail - http://mail.yahoo.de > Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de > _______________________________________________ > Enhydra mailing list > [email protected] > http://www.enhydra.org/mailman/listinfo.cgi/enhydra > > -- ---------------------------------------------------------------------------- MobiComp - Mobile Computing & Wireless Solutions phone: +351 253 305 250 fax: +351 253 305 251 mobile: +351 96 8690226 web: http://www.mobicomp.com ----------------------------------------------------------------------------