[lug] Embedded database recommendations

Rob Nagler nagler at bivio.biz
Wed Aug 25 08:28:02 MDT 2010


Davide writes:
> I worked with postgreSQL and it has all you ask in the list, and

I would second this.  It's extremely robust.  I have a friend that
uses postgresql in environments which have about 10K reqs/second.  He
says it works perfectly.  Postgresql has fine-grain locking, which
makes it much more concurrent than sqlite, and PG has had concurrency
going back decades, whereas sqlite has only had it a couple of years.

If you are talking about 10GB objects, there must be enough space in
the system to run PG.  If it is an embedded system, I would think
reliability would trump size, but that's how I think about things.

I would also question having multiple threads running through the db.
That type of concurrency might be too much for any db.  Rather
encapsulate the db accesses in a single thread (one per "process" in
Unix speak), and then use thread primitives to lock access to the db
connection.  Otherwise, you run the risk of serious thrashing for an
expensive resource.  ACID ain't cheap. :)

Rob



More information about the LUG mailing list