Thank you Go community for all the love that you showered on Badger. Within 8 hours of announcing Badger, the blog post made it to the first page of Hacker News. And within three days, the Github repo received 1250 stars, having crossed 1500 by the time of this post. We have already merged contributions and received feedback that we need to work on.
All this goes to show how much people enjoy Go native libraries. They
make things easier. Any tool, library or system written in Go can now just run
github.com/dgraph-io/badger, and they have a fast, efficient key-value store to use.
Dgraph users have been asking us about embeddable and go gettable Dgraph for a while. After hearing from many different users independently, I decided to create a Github issue to track it.
We had two dependencies on Cgo which prevented
go getable Dgraph in the past:
- ICU library to do tokenization and full-text search.
- RocksDB as the key-value store.
Back in Q1 2017, we got rid of C based ICU library and switched to using parts of Bleve. Bleve simplified our code base, at the cost of losing CJK support. But, we thought that’s a trade-off we can live with for the time being.
The second step of replacing RocksDB was a lot harder, and a lot more interesting journey, culminating in the release of Badger.
Today, we pushed a
Dgraph master branch to switch to Badger. That single change resulted in 450K deleted lines and made Dgraph
go getable. This is an exciting day for the Dgraph team, as it simplifies our lives as
Not only would we have simpler, faster builds and releases; we’d also have profiles going all the way down to the disk, and all the way out to the RAM. Every aspect of Dgraph system can now be tweaked for performance. No hard language boundaries, and that’s powerful.
I adore changes which delete more code than they add, while also gaining simplicity and functionality. This change is one of those.
Happy go getting! It needs a bit more work before Dgraph can be embedded in your Go code, but that is coming soon to master. It would be part of the v0.8 release.
Disclaimer: Dgraph in master branch contains latest changes and isn’t thoroughly tested. Use it at your own risk.
We are building an open source, real time, horizontally scalable and distributed graph database.
|Get started with Dgraph.||https://docs.dgraph.io|
|See our live demo.||https://dgraph.io|
|We are hiring. Join us!||https://dgraph.io/careers.html|
|Star us on Github.||https://github.com/dgraph-io/dgraph|
|Ask us questions.||https://discuss.dgraph.io|
Top image: Canadarm aboard the ISS