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.

Siberite: A Simple LevelDB-Backed Message Queue in Go

77 pointsby Bogdanovichover 9 years ago

4 comments

eisover 9 years ago
Why would you choose a LSM Tree based storage mechanism for a message queue?<p>The only reason I can come up with would be because it&#x27;s a read-to-use library you can just plug in which gives OK performance and some handy features because you can use the KV store for other things. But it doesn&#x27;t scale well and backups with LevelDB are not really easy either (close DB, copy all files).<p>Message queues when they are ordered (at least on the local node&#x2F;queue level) usually just need some kind of append-only log file. You don&#x27;t do random reads or writes into the middle of the queue, you only modify the head and tail.<p>InfluxDB, albeit being a time series db has similar write patterns to a message queue, learned it the hard way when they first tried to use a LSM Tree database (LevelDB), then switched to a B+Tree (BoltDB&#x2F;LMDB) but that also doesn&#x27;t scale once the DB gets big and the tree has quite some depth. They kindly did a nice writeup of their journey: <a href="https:&#x2F;&#x2F;influxdb.com&#x2F;docs&#x2F;v0.9&#x2F;concepts&#x2F;storage_engine.html" rel="nofollow">https:&#x2F;&#x2F;influxdb.com&#x2F;docs&#x2F;v0.9&#x2F;concepts&#x2F;storage_engine.html</a><p>Why not do it simple and use append-only files without complex structure and management?<p>Check out Kafka for a better storage format for message queues of this kind.<p>PS: every message queue should first clearly explain what guarantees it provides.
评论 #10408029 未加载
评论 #10407512 未加载
评论 #10407373 未加载
krat0sprakharover 9 years ago
This couldn&#x27;t have come at a better time - I was actually looking for a durable message-queue written in Go. Is there any way to read more about the architecture of this system? I find systems like these to be quite fascinating but taking the time to go through the code can sometimes be very time-consuming. It would be awesome if more projects have a writeup as detailed as cockroachdb[0]!<p>Aside: There used to be a site sometime back which used to distribute compiled binaries of Go code for all platforms? Is it still up any chance?<p>[0] - <a href="https:&#x2F;&#x2F;github.com&#x2F;cockroachdb&#x2F;cockroach#architecture" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;cockroachdb&#x2F;cockroach#architecture</a>
评论 #10408087 未加载
评论 #10407461 未加载
xrstfover 9 years ago
Sounds interesting. For my usecases, which require few (&lt; 10) messages&#x2F;sec and no clustering, would I gain anything by using Siberite over Beanstalk?
评论 #10407183 未加载
clumsysmurfover 9 years ago
Can you describe how the queue was represented as key&#x2F;value?
评论 #10407326 未加载