News for hackers. Stuff that matters.
Re:Show HN: SummitDB – In-Memory NoSQL DB by misframer on Tuesday October 11, 2016 @09:20PM (#12689784)
There are several key-value stores you can choose from. RocksDB, LevelDB, lmdb, Berkeley DB, Tokyo Cabinet, sophia, and others. What about those? You can always build abstractions on top.
Re:Show HN: SummitDB – In-Memory NoSQL DB by lopatin on Wednesday October 12, 2016 @02:05AM (#12690717)
BoltDB if you'd like to embed it into a Go program.
Re:Show HN: SummitDB – In-Memory NoSQL DB by chaotic-good on Wednesday October 12, 2016 @05:13AM (#12691410)
BoltDB can be corrupted on crash (kill -9 or hard reset) at least this was the case when I gave it a try. Any database can but in that case that was easy to achieve.
Re:Show HN: SummitDB – In-Memory NoSQL DB by mbertschler on Wednesday October 12, 2016 @06:23AM (#12691660)
did you file a bug for this? I thought it was pretty resilient in such cases
Re:Show HN: SummitDB – In-Memory NoSQL DB by chaotic-good on Wednesday October 12, 2016 @10:33AM (#12693181)
I've found several submitted issues that described this problem. All this issues are closed now so maybe I was wrong about Bolt.
Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Wednesday October 12, 2016 @06:16AM (#12691634)
Thanks for the suggestions. Some of those might work. The only problem with k/v stores is the serialization/deserialization cost, as most of them can only store strings.
Re:Show HN: SummitDB – In-Memory NoSQL DB by erichocean on Wednesday October 12, 2016 @04:30PM (#12696204)
> The only problem with k/v stores is the serialization/deserialization cost, as most of them can only store strings.

I store Cap'n Proto objects directly into LMDB, and can read them without any memory allocation or deserialization cost. Freaking rocks.

Re:Show HN: SummitDB – In-Memory NoSQL DB by ddorian43 on Wednesday October 12, 2016 @06:47AM (#12691775)
lmdb has some special cases where you can store capnproto/flat-buffers objects and read without copying/deserializing!
Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Wednesday October 12, 2016 @07:39AM (#12691969)
Really? that could be useful...
Re:Show HN: SummitDB – In-Memory NoSQL DB by ddorian43 on Wednesday October 12, 2016 @08:01AM (#12692059)
LMDB can hand you back a pointer to your object in the memory map, and we can easily use that pointer with Cap'n Proto without any calls to malloc(). source: https://news.ycombinator.com/item?id=12394385