Using SQLite as object store in a forking web server; can it be done safely?

15 Views Asked by At

I have some modules using SQLite to implement some object store. Now I want to use that from a forking web server (one process per client connection). The idea was to open the SQLite database in the main process and use the database handle in the forked child handlers to perform the request. The main process would not update the database after any child handler had been started. Apart from locking issues, is there any chance to get this working in a reliable way (any client handler may read and update any object in the database)?

An alternative I'm considering is to fork/exec an external utility that performs the required operations, but that's rather bad performance-wise,not to talk about data exchange...

0

There are 0 best solutions below