async jdbc client vs async mysql clinet - for mysql

247 views
Skip to first unread message

ad...@cs.miami.edu

unread,
Feb 17, 2016, 2:36:27 PM2/17/16
to vert.x
Hi,


Just started with Vert.x, looks great.  Thanks for all the hard work the community has put into this.  I am interested in connecting to MYSQL, and I there are 2 out of the box options: the MYSL client and the ASYNC JDBC client. 

I could not find too much information as to the pros and cons of each client.

Here are my assumptions:

MYSQL Client - This uses true non blocking (I guess with Netty) to communicate with Mysql.  Thus, this solution will be very light on resources with very few threads.

JDBC Client - This is Async (so it will not block the main vertx loop), but since it uses plain JDBC, it is really just blocking on threads off of the main lop.  Thus, this will require more threads than the MYSQL Client, as it is really just a simple wrapper around plain old JDBC.  But perhaps this is a more stable client, as JDBC is so well utilized.

Are the above assumptions more or less correct?

Thanks,
-Adam





Paulo Lopes

unread,
Feb 18, 2016, 7:12:36 AM2/18/16
to vert.x
Hi,

Your assumptions are correct. The async driver is somehow faster but as not feature rich as the jdbc client. The bottom line it is just a trade off, if you need fast simple queries the async driver might be good for you, however if you need something more complex, say stored procedures, automatic return of generated ids, etc... then you should go with the jdbc client.

ad...@cs.miami.edu

unread,
Feb 18, 2016, 1:15:20 PM2/18/16
to vert.x
Paulo and Group,

Thanks for the reply.  As a brief follow up, do you think that the MYSQL Asyc client is ready for production?  Do people use it like that, or do most people instead fall back on old JDBC?

-Adam

Paulo Lopes

unread,
Feb 19, 2016, 3:00:30 AM2/19/16
to vert.x
Hi,

We've just added the async client recently and it is marked as: "tech preview" http://vertx.io/docs/#data_access

I think someone from the community (http://campudus.com/) has been using it on prod but I cannot comment on its reliability and/or use case.

Joern Bernhardt

unread,
Feb 19, 2016, 4:35:21 AM2/19/16
to vert.x
We are using the PostgreSQL part of the async driver in production, not the MySQL. I can try to help if there are issues on MySQL side, but I can't really say how it behaves in production and under load.

ad...@cs.miami.edu

unread,
Feb 19, 2016, 3:09:30 PM2/19/16
to vert.x
Paulo,

Thanks for pointing out the Technical Preview icon on the documentation.  I completely missed that.  It might be nice to also put that note within the manual page itself for the MySQL client.  Perhaps at the top.  It might also be nice to have a brief description of what the  term Technical Preview means to the vetx community and dev team.

Thanks again.

-Adam
Reply all
Reply to author
Forward
0 new messages