News for hackers. Stuff that matters.
Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Tuesday October 11, 2016 @09:04PM (#12689721)
Can somebody get us an on disk, small, fast, in-process, low-footprint NoSQL DB? Thus far, I've been pressing SQLite into use for a lot of monotyped data that would have been better served by a NoSQL DB, but I couldn't find one suitable.

Apparently, in-memory DBs in now. They're fast and all, that's nice, but I'm still running on a machine with 8 Gigs of ram, and when the dataset starts to exceed that, I want an option other than "grab some more DDR3." I remember the fate of TinyMUD: on-disk operation must at least be an option for any DB I'd use for datasets of a non-fixed size.

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
Re:Show HN: SummitDB – In-Memory NoSQL DB by chaotic-good on Wednesday October 12, 2016 @05:11AM (#12691402)
You can try LMBD - https://symas.com/products/lightning-memory-mapped-database/ In my opinion there is exactly two production ready embedded databases - SQLite and LMDB. At least this two databases have decent crash recovery mechanisms (I've tested both). I haven't tested all of them, maybe ForestDB and BerkleyDB are good as well.
Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Wednesday October 12, 2016 @11:39AM (#12693824)
The only question is this: Is the dataset required to fit into RAM? Because if it is, than I haven't fixed the problem, now have I...
Re:Show HN: SummitDB – In-Memory NoSQL DB by erichocean on Wednesday October 12, 2016 @04:32PM (#12696220)
> The only question is this: Is the dataset required to fit into RAM?

I run an LMDB dataset many times the size of RAM, works great. Most data isn't recent, so the virtual memory cache works extremely well.

Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Wednesday October 12, 2016 @06:00PM (#12696747)
Okay. Good.
Re:Show HN: SummitDB – In-Memory NoSQL DB by coleifer on Tuesday October 11, 2016 @11:37PM (#12690285)
http://engine.so/ -- quite a nice list of small, fast, in-process databases.
Re:Show HN: SummitDB – In-Memory NoSQL DB by erichocean on Wednesday October 12, 2016 @04:29PM (#12696193)
> Can somebody get us an on disk, small, fast, in-process, low-footprint NoSQL DB?

That's LMDB, as others have noted. I have used it in production for years, never once lost data. Insanely fast, low footprint, crash-proof.

(P.s. I have seen SQLite get corrupted regularly on mobile devices, which is why I no longer use it there.)

Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Wednesday October 12, 2016 @06:58PM (#12697041)
Bizarre. SQLite is known for being hard to corrupt. How did it happen?
Re:Show HN: SummitDB – In-Memory NoSQL DB by erichocean on Wednesday October 12, 2016 @07:09PM (#12697091)
No idea, but with about 50,000 regular users hitting the local SQLite DB on their mobile devices hard, I'd get a corrupted DB report a few times a week.

It's possible my SQLite configuration wasn't as crash-proof as the default install. I moved onto another project before I could investigate further.

Re:Show HN: SummitDB – In-Memory NoSQL DB by not_kurt_godel on Thursday October 13, 2016 @02:21AM (#12698896)
Seems possible you were just seeing the rate at which people's storage hardware gets corrupted rather than an issue with SQLite.
Re:Show HN: SummitDB – In-Memory NoSQL DB by bruno2223 on Wednesday October 12, 2016 @05:45AM (#12691532)
I use LevelDB, it is a key-value database, from Google.

I am using it with Nodejs, on t2.micro, handling 10+ million requests / day

Never had an issue. in production for one year already. Really good :-)

Re:Show HN: SummitDB – In-Memory NoSQL DB by tracker1 on Wednesday October 12, 2016 @06:35AM (#12691714)
There's also a lot of higher level abstractions over leveldb at this point.
Re:Show HN: SummitDB – In-Memory NoSQL DB by qwertyuiop924 on Wednesday October 12, 2016 @06:14AM (#12691625)
Level could work, but it depends on how expensive serialization is.
Re:Show HN: SummitDB – In-Memory NoSQL DB by brightball on Tuesday October 11, 2016 @11:02PM (#12690164)
Mnesia built into Elixir/Erlang potentially?
Re:Show HN: SummitDB – In-Memory NoSQL DB by alixaxel on Wednesday October 12, 2016 @09:01AM (#12692377)
Have you heard about TieDot?
Re:Show HN: SummitDB – In-Memory NoSQL DB by maerF0x0 on Wednesday October 12, 2016 @01:45AM (#12690660)
make a gigantic swap file?