gomongo or mgo or go-mogo?

241 views
Skip to first unread message

nvcnvn

unread,
Apr 16, 2011, 8:20:49 AM4/16/11
to golang-nuts
Hi all, I'm a newbie for both GOlang and MongoDB.

I see that we have 3 Go driver for Mo: gomongo, mgo, go-mogo

Which drive now????
I just a newbie with MongoDB (i just finish the basic tut about
db.scores.save(....).....) So I realy nead a simple driver, what is
your advice for me??

Thanks!

Gustavo Niemeyer

unread,
Apr 16, 2011, 9:45:33 AM4/16/11
to nvcnvn, golang-nuts
> I see that we have 3 Go driver for Mo: gomongo, mgo, go-mogo
> Which drive now????

mgo, of course. Because.. hmm.. because I wrote it. ;-).

> I just a newbie with MongoDB (i just finish the basic tut about
> db.scores.save(....).....) So I realy nead a simple driver, what is
> your advice for me??

More seriously, though, you haven't mentioned what you intend to do.
All of them are simple to use for the basics. mgo has some pretty
unique features which you may or may not care about, and has been
getting new ones on a timely basis. I suggest reading the highlights
session here to see if you're interested or not:

http://labix.org/mgo

If you pick it, subscribe to the mailing list:

http://groups.google.com/group/mgo-users

The list is friendly to introductory questions, so check the
documentation out and feel free to poke us for missing points.

--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/blog
http://niemeyer.net/twitter

Message has been deleted

Gustavo Niemeyer

unread,
Apr 16, 2011, 10:59:42 AM4/16/11
to golan...@googlegroups.com, gary b
> - Mgo is the best choice if you do not plan to run mongos.  Mgo is the only
> driver that can connect directly to a replica set.

For clarity, mgo also deals fine with mongos, including the selection
between Eventual/Monotonic/Strong consistency modes.

mgo can also deal with *two* mongos at the same time for failover. I
have to put some more testing there, though, to ensure it's all
smooth.

> - With the exception of the cluster connection support mentioned earlier,
> Go-Mongo and mgo expose roughly the same set of MongoDB features.

There are actually quite a few other things, like authentication,
background pre-fetching, etc. But at this point the OP can figure by
himself.

Reply all
Reply to author
Forward
0 new messages