Databases in pure Go

2,665 views
Skip to first unread message

Archos

unread,
Apr 29, 2013, 4:22:52 AM4/29/13
to golan...@googlegroups.com
I need a database engine to be used in clients but I discard wrappers to C libraries to can install it easily in whatever system where Go works.

I have found:

+ An implementation of LevelDB in Go (https://github.com/syndtr/goleveldb)
+ And a  low level database engine whick looks me very intersting (https://github.com/cznic/exp/tree/master/lldb)

Any other more?

Hǎiliàng

unread,
Apr 29, 2013, 7:49:31 AM4/29/13
to golan...@googlegroups.com
The Postgresql driver is a pure Go implementation:
https://github.com/lib/pq

Hǎiliàng

Didier Spezia

unread,
Apr 29, 2013, 8:38:39 AM4/29/13
to golan...@googlegroups.com

There is a minimalist implementation of bitcask at:

Regards,
Didier.

Dobrosław Żybort

unread,
Apr 29, 2013, 9:03:24 AM4/29/13
to golan...@googlegroups.com
Another LevelDB implementation: https://code.google.com/p/leveldb-go/

Archos

unread,
Apr 29, 2013, 9:44:41 AM4/29/13
to golan...@googlegroups.com
But you would need to install the Postgres server in the client (user's computer).

For a server, I use a mature RDBMS; there are no problems on its installation/deploy but this does not happens when you want that it can be easily installed in whatever user's computer (windows, linux) without worries about the libraries and dependencies.

Ken Allen

unread,
Apr 29, 2013, 10:21:25 AM4/29/13
to golan...@googlegroups.com
Are you discarding the idea of C bindings because you don't want to depend on dynamic libraries or because you don't want to have to deal with compiling it? You can statically link sqlite3 in go 1.1, and you can even include the amalgamated c source in your go source tree. You can actually get that to work in go 1, but I've only seen it work on windows. I don't know if this is because it only works on windows or because nobody bothered for other platforms because they all have sqlite3 out of the box.

minux

unread,
Apr 29, 2013, 10:31:14 AM4/29/13
to Ken Allen, golan...@googlegroups.com
On Mon, Apr 29, 2013 at 10:21 PM, Ken Allen <cardb...@gmail.com> wrote:
Are you discarding the idea of C bindings because you don't want to depend on dynamic libraries or because you don't want to have to deal with compiling it? You can statically link sqlite3 in go 1.1, and you can even include the amalgamated c source in your go source tree. You can actually get that to work in go 1, but I've only seen it work on windows. I don't know if this is because it only works on windows or because nobody bothered for other platforms because they all have sqlite3 out of the box.
the latter.

if you want, you can always put sqlite3 amalgamated source code in the same directory
of your Go binding, and sqlite3 will be statically linked into your package (and application).
this applies to Go 1.0.x and the upcoming Go 1.1.

Archos

unread,
Apr 29, 2013, 10:37:48 AM4/29/13
to golan...@googlegroups.com
I discard C bindings because they are not easily deployed, specially when you have to deal the compilation in different systems.

Whether all code is pure Go then it's very simple to cross-compile it for wathever system/architecture.

Chris Howey

unread,
Apr 29, 2013, 12:27:13 PM4/29/13
to golan...@googlegroups.com
I found this one which seemed interesting:

Peter Bourgon

unread,
Apr 29, 2013, 12:32:49 PM4/29/13
to Chris Howey, golang-nuts
As its author, I endorse diskv for appropriate workloads :)

If diskv isn't precisely suiting your needs, I also happily accept
feature requests.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Martin Bruse

unread,
Apr 30, 2013, 2:24:34 AM4/30/13
to golan...@googlegroups.com
Take a look at https://github.com/zond/god. It may cover your needs.

It contains a tiny tiny bit of C in the murmur package, however.

This C compiles most anywhere, but perhaps it is still a problem for you.

Damian Gryski

unread,
Apr 30, 2013, 2:35:57 AM4/30/13
to golan...@googlegroups.com
The C in zond/god is just for murmur3, of which there are a number of pure Go implementations. It could easily be swapped out with some build flags.

Damian

Anssi Porttikivi

unread,
Apr 30, 2013, 6:30:51 AM4/30/13
to golan...@googlegroups.com
Here is some motivation, why rolling your own or borrowed source for database work my be a good case for reinventing wheels:

http://torbit.com/blog/2013/02/19/big-data-at-torbit/

Martin Bruse

unread,
Apr 30, 2013, 9:00:40 AM4/30/13
to Damian Gryski, golang-nuts
Alright, I found https://github.com/spaolacci/murmur3, which was quite
as fast as the C implementation.

The last traces of C in https://github.com/zond/god are now gone, if
anyone is interested :D

On Tue, Apr 30, 2013 at 8:35 AM, Damian Gryski <dgr...@gmail.com> wrote:
> The C in zond/god is just for murmur3, of which there are a number of pure Go implementations. It could easily be swapped out with some build flags.
>
> Damian
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/VAio7-EW6Mc/unsubscribe?hl=en-US.
> To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.

Dobrosław Żybort

unread,
May 9, 2013, 1:08:55 AM5/9/13
to golan...@googlegroups.com
I found some more:
  • https://github.com/akrennmair/epos
    epos is a embeddable persistent object store, written in Go. It is meant to store, retrieve, query and delete Go objects to a local file store.
    Use LevelDB or diskv as backend, support indexes
    Must investigate more, finally something looking like maybe I can use instead of SQLite!

And also I found wendigo
An experimental translation of SQLite to Go
but it's not fully translated, so unusable for now (maybe someone interested in finishing it?)
https://github.com/feyeleanor/wendigo

Best regards,
Dobrosław Żybort

W dniu poniedziałek, 29 kwietnia 2013 10:22:52 UTC+2 użytkownik Archos napisał:
Reply all
Reply to author
Forward
0 new messages