[ANNOUNCE] mysql-async and postgresql-async 0.2.2 released

165 views
Skip to first unread message

Maurício Linhares

unread,
May 18, 2013, 10:58:36 AM5/18/13
to scala-user
I have just released a newer version of the postgresql-async project,
an async database connector for PostgreSQL written in Scala and I'm
happy to announce that now there is also a mysql-async project that
also offers an async connector for MySQL. Both projects use Netty as
their network communication framework.

The project aims to offer a simple way to talk to both PostgreSQL and
MySQL in an async way and with a simple "send a statement, get a
future result back" approach. It is not supposed to be a full
replacement for JDBC or anything like that, it's just direct database
access as simple as possible. Scala 2.10 is required due to the use of
the new scala.concurrent.Promise and scala.concurrent.Future objects.

Both drivers offer basic and prepared statement support,
transformations for commonly used types and support for most of the
types offered by the database. You can read the README's available to
see how types are translated between db -> Scala.

You can read more about this release here ->
http://mauricio.github.io/2013/05/18/mysql-async-and-posrgresql-async-0.2.2-released.html

And the Github project repo is here ->
https://github.com/mauricio/postgresql-async

In case you're in a hurry, there is a small sample app using Play 2 +
postgresql-async and deploying on Heroku here ->
http://mauricio.github.io/2013/04/29/async-database-access-with-postgresql-play-scala-and-heroku.html

Feedback, bug reports, bug fixes and other improvements are all welcome :)

-
Maurício Linhares
http://mauricio.github.io/ - http://twitter.com/#!/mauriciojr

Brian Maso

unread,
May 18, 2013, 11:12:18 AM5/18/13
to Maurício Linhares, scala-user
Holy moly that's cool... I think the Java world has been waiting many years for async database access. Can't wait to check it out.



--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.





--
Best regards,
Brian Maso
(949) 395-8551
Follow me: @bmaso
br...@blumenfeld-maso.com

Maurício Linhares

unread,
May 18, 2013, 1:45:38 PM5/18/13
to Brian Maso, scala-user
Yeah, I felt the same, looking at the nodejs community they had all of
this in place, I thought it was time we had that too :)

virtualeyes

unread,
May 18, 2013, 4:26:21 PM5/18/13
to scala...@googlegroups.com, Brian Maso
Game changer if it works as advertised ;-)

Thoughts re: integrating with Slick, Squeryl, etc.?

Maurício Linhares

unread,
May 18, 2013, 4:57:40 PM5/18/13
to scala-user
Well, I'm hoping other people might get involved to help with that :)

There are still some MySQL and PostgreSQL types pending (like HSTORE
on PG and SETs on MySQL) and I'd like to do them before trying
integrations, but it's Apache licenced, anyone can fork and contribute
back.

Brian Maso

unread,
May 18, 2013, 5:03:30 PM5/18/13
to virtualeyes, scala-user (ggroups)
I wonder how much of a game-changer. Both mysql and postgres both still have connection limits... MySQL I know *can* get in to the 10K simultaneous connections range, but it requires a pretty beefed-up machine. The default is 150 IIRC.

Still... hooking asynch DB access up with Akka... I bet you could get some pretty ridiculously good throughput compared to more traditional webapp architecture for a given piece of hardware.

Flavio W. Brasil

unread,
May 18, 2013, 5:51:43 PM5/18/13
to virtualeyes, scala...@googlegroups.com, Brian Maso
Hi.

I am developing an integration with Activate. I've tested the postgresql driver and it works very well!
I am anxious to see what are the performance and scalability characteristcs of the driver.

-- 
Flávio W. Brasil

Maurício Linhares

unread,
May 19, 2013, 1:08:32 AM5/19/13
to scala-user
I'm accepting proposals for scalability testing :)

It's rather hard to make statements here, since it would definitely
allow you to keep 10k connections to the database, but can you use 10k
connections? Is the database going to allow you to make 10k
connections to it? How much memory overhead and GC time will 10k
connections will cause in your app? (every prepared statement is an
object and also takes up memory on both ends)

I think the main advantage is allowing you to follow the flow of a
framework like Akka, Spray or blueeyes, where the flow is usually
async by nature. If you're using JDBC, you need to "jump out" of the
main framework loop and block for it, when using these async drivers
you can just do it the way the framework works, since every db call
produces a future.

But if anyone has ideas on how this could be tested, I'm all ears :)
Reply all
Reply to author
Forward
0 new messages