Playframework Hamburg
Meetup #1
Martin Grotzke - inoio gmbh
@martin_grotzke - http://inoio.de
reactive persistence showcas...
@martin_grotzke
Motivation
●
Realtime webapps
●
Long running connections
●
Thread based model: limited by # threads
●
One ...
@martin_grotzke
Solution – evented servers
●
Evented servers: single thread per CPU core
The Idea: threads are never block...
@martin_grotzke
Challenge – backends
●
Mostly synchronous, blocking drivers
●
Most prominent: JDBC (synchronous API), on
t...
@martin_grotzke
Solution example:
postgresql-async
https://github.com/mauricio/postgresql-async
●
postgresql-async & mysql...
@martin_grotzke
Sample project
https://github.com/magro/play-coda-reactive
Play 2 sample (based on the standard
computer d...
Questions!
@martin_grotzke
http://inoio.de
Upcoming SlideShare
Loading in …5
×

Playframework Hamburg Meetup #1 - Reactive persistence with Play 2 & postgresql-async

1,580 views

Published on

About Play Framework 2 asynchronous request handling and async, non-blocking database access using postgresql-async.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,580
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Playframework Hamburg Meetup #1 - Reactive persistence with Play 2 & postgresql-async

  1. 1. Playframework Hamburg Meetup #1 Martin Grotzke - inoio gmbh @martin_grotzke - http://inoio.de reactive persistence showcase with postgresql-async
  2. 2. @martin_grotzke Motivation ● Realtime webapps ● Long running connections ● Thread based model: limited by # threads ● One thread per request, bound until the request is complete ● Thread blocked by I/O, idle ● CPU switching context ● Servlets, Ruby on Rails, Django, PHP
  3. 3. @martin_grotzke Solution – evented servers ● Evented servers: single thread per CPU core The Idea: threads are never blocked ● All I/O is asynchronous ● Instead of waiting, the thread can process other requests ● Come back when the response from the I/O call is ready ● Play, Node.js, Twisted
  4. 4. @martin_grotzke Challenge – backends ● Mostly synchronous, blocking drivers ● Most prominent: JDBC (synchronous API), on top connection pools, query DSL libs, ORMs ...
  5. 5. @martin_grotzke Solution example: postgresql-async https://github.com/mauricio/postgresql-async ● postgresql-async & mysql-async ● Netty based drivers for MySQL and PostgreSQL written in Scala - 2.10
  6. 6. @martin_grotzke Sample project https://github.com/magro/play-coda-reactive Play 2 sample (based on the standard computer database sample) to demonstrate async, non-blocking database access using the postgresql-async driver
  7. 7. Questions! @martin_grotzke http://inoio.de

×