News for hackers. Stuff that matters.
Re:Iowow – C11 skiplist-based persistent key/value storage e... by brongondwana on Monday April 09, 2018 @06:27PM (#16797519)
Will be interesting to test this against Cyrus' two skiplist based databases:

https://github.com/cyrusimap/cyrus-imapd/blob/master/lib/cyr...

https://github.com/cyrusimap/cyrus-imapd/blob/master/lib/cyr...

They take slightly different tradeoffs. I wrote twoskip to work around a handful of issues with skiplist around crash recovery. The big cost still is repack speed, which is why I have a project to build something called zeroskip, which won't be single-file, but will have some very nice never-rewrite behaviour.

http://opera.brong.fastmail.fm/talks/twoskip/twoskip-yapc12.... describes the design of twoskip a bit.

Re:Iowow – C11 skiplist-based persistent key/value storage e... by shin_lao on Monday April 09, 2018 @05:00AM (#16791445)
It's interesting to have a non-LSM based persistent engine (If I read correctly).

Although BTrees are slower when it comes to writing, they don't have compaction issues and are generally better are reading data from disk.

I also like there is a lower-level API should you wish to build your own database logic on top of the block manager.

It would be interesting to have more information about how data is actually written to disk and I think such approach could benefit from being able to mount a device directly.

Last but not least, 255 GB will seriously limit this database to embedded use cases.

Re:Iowow – C11 skiplist-based persistent key/value storage e... by adamansky on Monday April 09, 2018 @05:21AM (#16791530)
Yes, b+trees are more performant for reading compared to skip-list because of better data locality on memory/disk. But SL better at insertion and sequential reads. 255 GB is a simple trade-off between disk space required per record and the ability to manage large data-sets since SL is a not very space friendly data structure) Although I think 255 GB is good enough in many use cases.
Re:Iowow – C11 skiplist-based persistent key/value storage e... by ghoul2 on Monday April 09, 2018 @06:49AM (#16791878)
unrelated: I need a key-value storage engine/data structure that is suitable to use on a microcontroller, with sdcard as the storage medium. Performance isn't critical (within reason of course), but must need very little ram (10s-100s of bytes, at the high end), and of course must minimize/optimize sdcard writes and reads. Any suggestions?
Re:Iowow – C11 skiplist-based persistent key/value storage e... by 112233 on Monday April 09, 2018 @08:01AM (#16792214)
ENOTENOUGHINFO: Any of the following changes what data structure should be used: read/write ratio, key size, data size, what is the interface to sdcard. Gut feeling is that with TENS of bytes you will only get an append-only log.
Re:Iowow – C11 skiplist-based persistent key/value storage e... by thr0w__4w4y on Monday April 09, 2018 @10:29AM (#16793230)
Might be coincidental -- but you also post a similar request very recently on the FreeRTOS forum?
Re:Iowow – C11 skiplist-based persistent key/value storage e... by AstralStorm on Monday April 09, 2018 @03:36AM (#16791098)
Darn, I hoped for a standalone thread safe structure and there I get a whole database.

(Yes, I know that for some platforms you can mmap memory.)

Re:Iowow – C11 skiplist-based persistent key/value storage e... by mehrdadn on Monday April 09, 2018 @06:02AM (#16791678)
Skip lists are randomized, right? Whereas B[-whatever] trees have guaranteed fast performance?
Re:Iowow – C11 skiplist-based persistent key/value storage e... by adamansky on Monday April 09, 2018 @06:13AM (#16791726)
Yes. I suppose that probability to get such bad random distribution which makes SL search to be linear is similar to probability of moving all oxygen atoms to only one side of your room.
Re:Iowow – C11 skiplist-based persistent key/value storage e... by mehrdadn on Monday April 09, 2018 @06:16AM (#16791739)
Even against an adversary? (Asking because I don't know the data structure too well.)
Re:Iowow – C11 skiplist-based persistent key/value storage e... by hvidgaard on Monday April 09, 2018 @07:53AM (#16792171)
If the adversary find a bug in your system, such as not so random "random generator", then it can bring it down. But if the random generator is reasonable, then you can expect it to behave properly on all inputs.
Re:Iowow – C11 skiplist-based persistent key/value storage e... by amelius on Monday April 09, 2018 @05:29AM (#16791562)
What is the skiplist used for? I.e., what data does it allow to skip over?
Re:Iowow – C11 skiplist-based persistent key/value storage e... by Narew on Monday April 09, 2018 @05:44AM (#16791618)
The lastest example I found is Redis, they use Skip List for their Ordered set.

[1]: https://news.ycombinator.com/item?id=1171468

[2]: https://stackoverflow.com/questions/45115047/why-redis-sorte...