[erlang-questions] [ANN] "MySQL/OTP" - rewritten MySQL driver

Viktor Söderqvist viktor@REDACTED
Wed Feb 25 14:47:20 CET 2015


Hello Erlang users!

Due to the known problems with Emysql, especially the lack of solid
transaction handling, we have written a MySQL driver from scratch. The
code structure of Emysql wasn't good enough to build upon and since we
also wanted to change the API a little, it made sense to write a new
driver. As the name suggests, that we wanted to make it more
"OTP-ish".

Github project page:

https://github.com/mysql-otp/mysql-otp

Notable Features:

* A connection is a gen_server which makes it easy to use
https://github.com/devinus/poolboy, https://github.com/seth/pooler or
any other supervisor based connection pooling mechanism for those who
need connection pooling.
* Mnesia style transactions that can be *nested* (implemented using
SQL savepoints) and are automatically *retried* when deadlocks are
detected, just like Mnesia transactions.
* Simple API without records.

More information is available on the github project page and in the
corresponding github wiki.

Since a few weeks, we're using this driver in production in a hosted
e-commerce platform powering a few thousand web stores, but in the
interest of all users of Erlang + MySQL we have created a separate
github organisations for this project to keep it independent. I would
consider this driver fairly stable already.

Also note that we're not in any way against the Emysql project, which
AFAIK is still in need of a maintainer. For new projects however, I'd
recommend MySQL/OTP.

Viktor Söderqvist



More information about the erlang-questions mailing list