leveldb | 9 May 2012 00:31

Issue 89 in leveldb: Feature request: stream into the database

Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 89 by ericu <at> chromium.org: Feature request: stream into the  
database
http://code.google.com/p/leveldb/issues/detail?id=89

For IndexedDB in Chrome, we need to be able to store large binary blobs in  
our LevelDB instance.  However, we don't want to have to have each entire  
blob in memory at once; these could be multiple-gigabyte objects.  We're  
fine with chopping them into chunks manually and adding them under separate  
keys, but we still want all chunks to be committed in a single atomic  
action.

Currently WriteBatch is an in-memory construct, so even if we break up the  
Blob into chunks, it's all going to be kept in memory anyway.  I'd like to  
request that you add either a WriteBatch that spills to disk as you build  
it, or some other way to stream large data into the db.

When reading it back out, we'll have the same contraints--we can't afford  
to have the whole thing in memory, and will just want to grab a limited  
byte range at a time.


Gmane