[erlang-questions] Multiple db connection drivers

Tim Watson <>
Sat Feb 18 02:53:19 CET 2012


On 16 February 2012 14:15, Erisa Dervishi <> wrote:
> Hi everybody,
>
> I am an erlang newbie, and I am doing a survey on existing Erlang db access
> drivers. I am most interested in drivers that can handle and process
> multiple concurrent db requests. Are there any working Erlang multithread db
> access drivers for MySql or PostgreSQL? What about BerkleyDB? Or any other
> Erlang driver that can handle db requests in parallel?

Max has suggested good pgsql drivers. It is worth baring in mind that
'multiple requests in parallel' is a broad requirement. Most JDBC
drivers, for example, offer thread safe Connection objects because
they serialise access, which means only one thread can proceed at
once. In practise, you need to use a connection per thread, which is
prohibitively expensive (esp. in terms of setup/teardown) and is the
reason all production java code ends up using connection pools. The
same is going to be true for erlang database drivers.

SqlRelay is an interesting one. If you use it, just bare in mind each
erlang port (linked to the external C program which is in turn,
connected to one of the connection daemons) is going to communicate
synchronously over stdio, so you'll need to do the same thing (pooling
the ports) there I would've thought.

Like Max, I can highly recommend Will's pgsql driver and there are a
number of other good ones out there, including some derived from his.

> There are plenty of drivers out there, but no documentation at all, and I am
> not experienced enough to find out the ones I'm interested in.
> I would be really glad if you could provide me some links or valuable
> suggestions.
>
> Thanks in advance!
> Cheers,
> Erisa
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list