mod_ruby, concurrency, IPC, and object caching.
Zallus Kanite <[email protected]> Thu, 5 Aug 2004 16:34:42 -0700
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Organization | Z0 Corp. |
| Message-ID | <[email protected]> |
This is more of a design question than anything, but, since mod_ruby allows for persistant objects within libraries, I thought I would ask: I'm writing Yet Another web framework/CMS, and was wondering what the best solution would be to avoid having disparate versions of an object (say, a DB row in a user table) being held in each of Apache's children. Solutions I've thought of: 1. Just erase the cache of any volatile data on startup. This goes against the premise of mod_ruby, which is to speed up CGI using a persistant namespace. 2. Contact the DB to see if an object with a certain ID has to be changed, before taking it as the current version. This seems okay, but would probably intoduce a few more DB queries per request than I'd wish. 3. Somehow maintain IPC between all the children, perhaps making one (possibly the first to serve a request) responsible for holding a table of such things. I can't really think of how to do this; has anyone had any experience with something like this?