Hi, I thought 'billywiz' sounded familiar - I read this while looking
into fsync with NodeJS:
http://groups.google.com/group/nodejs/browse_thread/thread/630d7d20cbf22d14
* What's the best way of doing fsync in NodeJS (in 0.2.6 or 0.4.0)?
I could add durability to barricane-db. Consider a
'DB.flushToDisk(callback)' method, which calls back when all writes
cause *before* that point had been written AND an fsync had completed.
(Implementation thoughts - add a .transactionCount integer and
a .outstandingWritesByTransactionCount object to the DB and then place
each outstanding write in .outstandingWritesByTransactionCount on
write and remove them when completed. Then the fsync can be triggered
when there are no writes < [.transactionCount as of when
the .flushToDisk() was called]).
As far as I understand, the transaction log only needs one additional
feature to make it robust: DB.open() must be prepared for the last
line to be only partially written to disk, and therefore invalid JSON.
Is there something else I've missed here?
Your point about external queries is correct - I should change this to
say that there are no ODBC/JDBC drivers for BarricaneDB and that there
are never likely to be any.
* If 'DB.flushToDisk(callback)' would be useful to you, let me know
and I'll add it (and the handling of invalid JSON) next week. If you
have other ideas on a durability API, please let me know.
* Are there other features from your experience with in-memory
databases which could translate well to BarricaneDB?
All the best,
Chris.