TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Badger – A fast key-value store written natively in Go

355 pointsby michaelangermanabout 8 years ago

18 comments

blaisioabout 8 years ago
There is so much negativity in these comments! This project is really cool!<p>I really appreciate the trend to rewrite C&#x2F;C++ libraries in Go. It has always been really frustrating that hacky library wrappers for other languages leave performance and features on the table because they&#x27;re either incomplete or just too hard to implement in the host language. For most of the languages out there, it is always better to have a native implemention.<p>There are now a number of great embedded key&#x2F;value stores for Go, which make it really easy to create simple, high performance stateful services that don&#x27;t need the features provided by SQL.
评论 #14337651 未加载
评论 #14342009 未加载
评论 #14339816 未加载
评论 #14342557 未加载
评论 #14337506 未加载
mjaniczekabout 8 years ago
Now let somebody run a QuickCheck on it, like they did with LevelDB: <a href="http:&#x2F;&#x2F;htmlpreview.github.io&#x2F;?https:&#x2F;&#x2F;raw.github.com&#x2F;strangeloop&#x2F;lambdajam2013&#x2F;master&#x2F;slides&#x2F;Norton-QuickCheck.html" rel="nofollow">http:&#x2F;&#x2F;htmlpreview.github.io&#x2F;?https:&#x2F;&#x2F;raw.github.com&#x2F;strange...</a>
评论 #14342083 未加载
评论 #14342604 未加载
iainmerrickabout 8 years ago
It&#x27;s interesting that the main motivation for this was that the Cgo interface to RocksDB wasn&#x27;t good enough. I hate to turn this into a language war, but it&#x27;s a big difference between Rust&#x2F;Nim&#x2F;etc where you just call C code more or less directly, and Go&#x2F;Java&#x2F;etc, which need a shim layer to bridge between C code and their language runtime.<p>And possibly Go has the right approach! Is it better to make C integration as simple and smooth as possible, to leverage existing libraries, or is it better to encourage people to ditch all that unsafe C code and write everything in Go?
评论 #14343402 未加载
dis-sysabout 8 years ago
I am excited about the fact that the design is focused on SSD from day one (not just optimised for SSD). Wondering whether the authors have plan to optimise it for Intel Optane which has lower latency and much higher random IOPS at low QD. Currently I am using a cgo based RocksDB wrapper with the WAL stored on Intel Optane, the rest of the data is on a traditional SSD.<p>It will also be great to have some comparison on write performance with fsync enabled.<p>Overall, very interesting project, bookmarked, will definitely follow the development!
skydeabout 8 years ago
Range iteration latency is very important and might be limited by concurrency. I think you can only get 100K IOPS on Amazon’s i3.large when the disk Request queue is full.<p>fio [1] can easily do this because it spawn a number of threads<p>While working with Rocksdb we also found that Range iteration latency was very bad compared to a B+-tree and that RocksDB get good read performance mostly from random read because it&#x27;s using bloomfilters.<p>Does anyone know if this got fixed somehow recently?<p>[1] <a href="https:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;fio" rel="nofollow">https:&#x2F;&#x2F;linux.die.net&#x2F;man&#x2F;1&#x2F;fio</a>
评论 #14338178 未加载
reacharavindhabout 8 years ago
Probably a naive question, but how does it compare to Redis? When would someone look for a K-V store written in X instead of the already mature Redis?
评论 #14337034 未加载
评论 #14343169 未加载
评论 #14337195 未加载
评论 #14337041 未加载
mirekrusinabout 8 years ago
Silly question - if SSDs or even motherboard had persistent storage of (couple of) 4 KB blocks where you&#x27;d be able to fsync &lt; 4 KB (unfinished&#x2F;non-yet-full pages) of data fast (DRAM + battery) - would that setup speed up writes in databases?<p>It seems that databases often want to persist&#x2F;flush data in unfinished (4KB or 8KB) pages when they&#x27;re being built, once they are full, they don&#x27;t change much - once full they could be normally persisted. Another kind of pages are those that change very frequently - ie. single &quot;root&quot; page which keeps counters or other stuff in single, root page.<p>It seems a bit wasteful that multiple &quot;checkpoints&quot; (flushes&#x2F;fsyncs) on partial blocks are triggering on hardware whole block rewrites. Similarly with &quot;root&quot;&#x2F;&quot;meta&quot; pages that keep track of just few bytes frequently changing are triggering similar whole page rewrites.<p>To be honest even some kind of PCI card with little battery and slot for DDR4 would probably do the trick, no? The rest could be implemented in software - as long as you&#x27;d have access to fast flushing with battery backed memory that survives hard crash - it should be fine.<p>Is this silly idea?
评论 #14337989 未加载
评论 #14337509 未加载
libeclipseabout 8 years ago
This could not have come at a better time, I&#x27;ve been looking for a fast, simple, pure Go key-value store.<p>Few questions:<p>- Does this have a log file? If so, what does it log and can it be disabled?<p>- How is the data stored? (Single file, multiple files, etc.)<p>- How is the RAM usage?
评论 #14336873 未加载
fortytw2about 8 years ago
off topic: flipping through the dgraph code, I noticed their licensing switch from Apache 2 to AGPLv3, anyone involved around to comment? Adding a draconic open source license is an unwise decision for an early stage database product imo<p>(<a href="https:&#x2F;&#x2F;open.dgraph.io&#x2F;licensing" rel="nofollow">https:&#x2F;&#x2F;open.dgraph.io&#x2F;licensing</a> is a dead link)
评论 #14336778 未加载
评论 #14339681 未加载
评论 #14337009 未加载
评论 #14343224 未加载
评论 #14341805 未加载
评论 #14338033 未加载
dkarapetyanabout 8 years ago
There&#x27;s that word again, natively. Should just say written in Go. The native part is redundant.
评论 #14336584 未加载
评论 #14338189 未加载
Asmod4nabout 8 years ago
How does it compare to LMDB?
marcrosoftabout 8 years ago
Why not boltdb?
评论 #14337588 未加载
评论 #14337535 未加载
评论 #14336771 未加载
评论 #14338120 未加载
评论 #14336676 未加载
faragonabout 8 years ago
Figures per minute? Same-process key-value should give millions <i>per second</i> operations (using one thread). And accessing via network, e.g. a la Redis, should be hundreds of thousands <i>per second</i> [1].<p>[1] <a href="https:&#x2F;&#x2F;redis.io&#x2F;topics&#x2F;benchmarks" rel="nofollow">https:&#x2F;&#x2F;redis.io&#x2F;topics&#x2F;benchmarks</a>
评论 #14338229 未加载
zieabout 8 years ago
How do I use it? there is zero docs on how to even get started, what the API is like(is there even one?) This could be worth all the peanuts in the world, but if the only way to learn how to use it, is read the Go source, very few people will bother.
评论 #14336399 未加载
评论 #14336534 未加载
评论 #14336537 未加载
didipabout 8 years ago
This is pretty exciting. I would love to see comparisons between badger and goleveldb
评论 #14338238 未加载
udevabout 8 years ago
The world wold benefit from some sort of map (or catalogue) of database engines and systems currently available.<p>Anyone aware of such a thing?
评论 #14375326 未加载
usegolangabout 8 years ago
How does this compare to boltdb?
评论 #14336773 未加载
thedatamongerabout 8 years ago
nobody has said it so I must. Badgers? We don&#x27;t need no stinking badgers!
评论 #14336949 未加载