MongoDB Erlang driver

353 views
Skip to first unread message

hehehaha...@gmail.com

unread,
Jan 7, 2014, 11:17:10 PM1/7/14
to chica...@googlegroups.com
Hello,

Am I correct that ChicagoBoss uses MongoDB?

I have been trying for 2 days to get the MongoDB Erlang driver as referenced on the MongoDB website to work.  It won't compile using rebar, it won't do this, it won't do that, and when I 'hack' the code by hand to get it to compile, and then stick it in the Erlang lib directories, it just doesn't work.

The thing seems old and unmaintained.  How does ChicagoBoss utilize this thing?  Any tips from anyone using it?

I'd really like to try MongoDB out, but I also have little patience for this kind of slop in software.  It tends to force me onto more 'tried and true' stuff that "works," but at the same time I can never experiment or try out something cool or cutting edge or different.  I hate that.

Anyway, thanks.

Zachary Kessin

unread,
Jan 8, 2014, 5:58:41 AM1/8/14
to chica...@googlegroups.com
What errors are you getting from the compiler?

--Zach
> --
> You received this message because you are subscribed to the Google
> Groups "ChicagoBoss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to chicagoboss...@googlegroups.com.
> Visit this group at http://groups.google.com/group/chicagoboss.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/chicagoboss/b17d229a-ab48-462f-849d-4fe33db5fc57%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Zachary Kessin

unread,
Jan 8, 2014, 6:00:23 AM1/8/14
to chica...@googlegroups.com
Just to be clear CB can use mongo, we can also run against MySQL,
Postgres, Mnesia and Riak

--Zach
On 1/8/14, 6:17 AM, hehehaha...@gmail.com wrote:

Samuel Rose

unread,
Jan 8, 2014, 6:01:33 AM1/8/14
to chica...@googlegroups.com
I have just done a test myself with latest CB from
https://github.com/ChicagoBoss/ChicagoBoss using erlang R16B02 on
Ubuntu 12.04 with Mongodb installed. I am able to successfully connect
CB with Mongodb. So, if you can provide more information on the errors
you see, we can help
> https://groups.google.com/d/msgid/chicagoboss/52CD2F61.7090702%40gmail.com.

Kai Janson

unread,
Jan 8, 2014, 9:26:34 AM1/8/14
to chica...@googlegroups.com, chica...@googlegroups.com
I have no doubt in my mind that the official driver is a mess.
Evan and I had some "fun" dealing with it.

Long story short, the official driver is a prime example of poor engineering.
The code that handles MongoDB's strong suit, "ReplSet" is pretty much unusable.
This is ONLY true for the Erlang driver, all other languages are fine and work well with ReplSets.
:(
<me>
<soapbox>off</soapbox>
</me>

Sent from my non-google-device
> To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/CA%2BH5g6oAQWoENtjauQif5DZifnYZnw5RrN10DUdVkNJOJPeDXA%40mail.gmail.com.

hehehaha...@gmail.com

unread,
Jan 8, 2014, 11:34:57 AM1/8/14
to chica...@googlegroups.com
You can try downloading the driver yourself and following the instructions for building it.  You will see that it fails to build.  If you hack it so that it compiles, then you can't connect to the database because you get a run-time error that the command doesn't exist or the module can't be found or blah-blah.  Then if you deal with that issue... (on and on...).

Now I look and see that many people who are trying to fork or fix the code on github have issued pull requests and left comments that this needs to be fixed or that needs to be fixed (and some comments say the code no longer compiles) but the comments are months to years old and have still gone unresponded to.

I guess I'm not surprised.  This is what always happens to me when I work in Erlang.  Erlang itself is great, considered in a vacuum.  But once you leave the solace of anything that was shipped with it, it turns into a ghetto.  Even products WRITTEN in Erlang will support every language on the planet BUT Erlang.

I guess I would ask how ChicagoBoss is solving the issue... but I'm not sure I want to even try anymore.  I don't think I want to rest a project's fate on a joke unmaintained driver.

Thanks.

kotedo

unread,
Jan 8, 2014, 11:38:35 AM1/8/14
to chica...@googlegroups.com
I am with you on this; well on most of it.

The best way to complain would be to contact 10gen.com which put this horrible driver out in the first place.
Shall we?

—Kai

Evan Miller

unread,
Jan 8, 2014, 12:26:24 PM1/8/14
to ChicagoBoss
Just FYI Chicago Boss uses a fork of the driver that plays better with R16 and fixes some repl set stupidity in the stock driver:


As Kai mentioned we had a lot of "fun" getting the driver to actually work, and even now IIRC there's a pretty nasty file descriptor leak that makes it not really fit for production.

You're right that as far as most Erlang libraries go, we're still in the Wild West. You can see that either as a problem that the roads are washed out and you can't get a Vanilla Frappe Latte when you want it, or as an opportunity to build something that hasn't been done before and that a lot of people will find useful one day.

Evan



For more options, visit https://groups.google.com/groups/opt_out.

hehehaha...@gmail.com

unread,
Jan 8, 2014, 1:32:02 PM1/8/14
to chica...@googlegroups.com, hehehaha...@gmail.com
Thanks Evan - this is the kind of information I was looking for.  I will give your driver a look.

Samuel Rose

unread,
Jan 8, 2014, 2:16:42 PM1/8/14
to chica...@googlegroups.com
On Wed, Jan 8, 2014 at 11:34 AM, <hehehaha...@gmail.com> wrote:
> You can try downloading the driver yourself and following the instructions
> for building it. You will see that it fails to build. If you hack it so
> that it compiles, then you can't connect to the database because you get a
> run-time error that the command doesn't exist or the module can't be found
> or blah-blah. Then if you deal with that issue... (on and on...).
>
> Now I look and see that many people who are trying to fork or fix the code
> on github have issued pull requests and left comments that this needs to be
> fixed or that needs to be fixed (and some comments say the code no longer
> compiles) but the comments are months to years old and have still gone
> unresponded to.
>
> I guess I'm not surprised. This is what always happens to me when I work in
> Erlang. Erlang itself is great, considered in a vacuum. But once you leave
> the solace of anything that was shipped with it, it turns into a ghetto.
> Even products WRITTEN in Erlang will support every language on the planet
> BUT Erlang.
>
> I guess I would ask how ChicagoBoss is solving the issue... but I'm not sure
> I want to even try anymore. I don't think I want to rest a project's fate
> on a joke unmaintained driver.
>
> Thanks.
>

Sorry for my limited response. I should have specified from my end
that this worked with the rebar get-deps compile command run from an
app generated by the ChicagoBoss codebase

And, as it turns out, Evan clued (me) in that CB uses a custom
(forked) driver in it's dependencies.
> https://groups.google.com/d/msgid/chicagoboss/ca074425-1b7c-4aa9-895f-7be55507946f%40googlegroups.com.

hehehaha...@gmail.com

unread,
Jan 8, 2014, 2:28:10 PM1/8/14
to chica...@googlegroups.com, hehehaha...@gmail.com
Tried the ChicagoBoss build of this driver.  Fails when trying to pull the bson from git.
Reply all
Reply to author
Forward
0 new messages