Patrick Phalen wrote:
[Sam Gendler, on Sun, 09 Apr 2000] :: I have a product which needs to maintain a connection to a 300MB :: database file (Metakt, if you must know). The initial connection takees :: about 3 seconds, due to the size of the file, so I wanted to make a :: product that will keep the connection open, and re-use it.
This is timely. I'm evaluating Metakit for a project right now. This is currently implemented as a Python CGI, with responses appended to flat files which are FTP'd to a mainframe nightly for batch processing. Now, we want to add a local store which can be queried ad hoc for marketing purposes. (Zope may or may not be part of the picture.)
Is concurrency an issue with your application? If so, how are you dealing with it? In our case, many simultaneous users could fill out forms at the same time.
Currently, I am preloading a database with data from the Open Directory Project, and then accessing the Metakit from zope in read only mode. I have yet to really delve into the Metakit code to see if I need to worry about concurrency when reading, but if so, I guess I will have no choice but to wrap my class' get function with a mutex. Actually, I was forced into Metakit, as I am using Andrew Kuchling's Oedipus product, but I fully intend to migrate it over to BerkeleyDB (sleepycat), in order to take advantage of remote acess, thread safety, etc. Oops, the girlfriend is dragging me out of the house. Checkout out Andrew's product from starship.python.org (search for his name, or look for Oedipus). You will only need the code in database.py, which has a wrapper class for Metakit. --sam