From: Ryan Pavlik Date: 2004-04-21T10:43:07+09:00 Subject: Re: The quest for opensource database... On Wed, 21 Apr 2004 10:30:49 +0900 Shu-yu Guo wrote: > My application is web-based, and I just avoid having objects which > represent database data persist for more than one request. This is why > I need fast select. Unless I go distributed, caching things with ruby > procedures and triggers isn't enough, because if I use mod_ruby for > this web app, it's very likely that more than one copy of the app is > run as Apache pre-forks. If child #3 handles some request where some > data was input and it caches that input and updates the database, none > of the other children see that cached object, and unless they read the > database every request, they'll be hopelessly out of sync. > > I hope what I said made sense. It does... I have found that approach to be rather performance- inhibited as you seem to be finding as well. What I did is make the CGI very thin, and do all the work in a persistent backend. The benefits are manifold: * There are no longer sessions on the backend, so you don't have to worry about transaction-oriented programming and kludgery so much. * Data is retained as necessary, so access is fast. * You haven't tied yourself to the web as a frontend, and can write yourself "real" application frontends. * You don't have to touch CGI or HTML much if you do it right, which means focusing on core functionality. Anyhow, this may or may not be an option for you, but it definitely does help if you can do it. -- Ryan Pavlik "Feh. At least we can agree that if anything goes wrong, it was due to *your* acute negativism" - 8BT