The problem with tree (ordered) maps is that they usually take more
space and are slower than hash maps. So that's why I proposed a
separate Map and OrderedMap.

Plus, often times one needs to store a sequential structure, e.g. to
implement a Queue, or Stack, etc. It's possible to implement a list on
top of ordered map though, but one has to generate unique keys.

Doubly linked list takes up too much memory, and Array is terrible for
insertion, but C++ STL's Deque solves this by providing a list
consisting of multiple Array chunks.

HOWEVER - the paper that I noticed today (http://goo.gl/71aFc) - seems
to offer a cool ordered Map structure that also happens to be faster
than any Hash Map currently in use. It also does this in SMP way, so
multiple Node instances in local Node Cluster could even use such DB
together. Let's hope they don't slap a patent on it.

Re: the CouchDB - I'd imagine this is already a higher level
functionality - something that people should be able to implement and
evolve on top of the basic primitive operations,
like .put(k,v), .get(k), .range(k1, k2).

I'm looking for a good paper or book pondering complex schema design
on key/value stores, but haven't had much time to do a proper googling
for it yet.


On Feb 22, 9:13 pm, Alexey Petrushin <alexey.petrus...@gmail.com>
wrote:
> Hmm, maybe we don't need index integrity, after all if each dataset is
> independent and small we can rebuild indexes it every time we loading DB in
> memory.
>
> In such case non-blocking robust persistence can be achieved with storing
> database as append-only journal. So, it seems that we basically need:
> - an ordered b-tree, supporting sequential access and range queries

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to