Re:EJDB: Embedded JSON Database for C/C++, .Net, NodeJS, Pyt...
by andrewstuart on Sunday July 07, 2013 @10:20PM
(#6004745)
So is it possible to use this as a database in a web app? What sort of problems would come up with concurrency?
[ Parent
| on HN ]
Re:EJDB: Embedded JSON Database for C/C++, .Net, NodeJS, Pyt...
by hendzen on Sunday July 07, 2013 @11:14PM
(#6004953)
Since the storage engine is a modified version of Tokyo Cabinet, I am assuming that you can have simultaneous readers, but a writer will lock everyone else out. From the Tokyo Cabinet specs [0]:
'Tokyo Cabinet provides two modes to connect to a database: "reader" and "writer". A reader can perform retrieving but neither storing nor deleting. A writer can perform all access methods. Exclusion control between processes is performed when connecting to a database by file locking. While a writer is connected to a database, neither readers nor writers can be connected. While a reader is connected to a database, other readers can be connect, but writers can not. According to this mechanism, data consistency is guaranteed with simultaneous connections in multitasking environment.'