We are studying to use Play! Framework in a new project. We picked Play! because of it’s productivity, Scala support and non-blocking architecture.
After stress testing the (Java) Computer-database sample application I saw a lot of dispatcher and Ebean threads and I couldn’t find out how Play integrates with Ebean ORM. Every call is dispatched to Akka and executed in another thread.
I read all Play! framework documentation (specially this part http://www.playframework.org/documentation/2.0/JavaAsync) and couldn’t find any information about how this integration work.
I’ll really appreciate if someone could light this path for us.
Thanks!
first of all, about benchmarking:
please read this page about production setup: https://github.com/playframework/Play20/wiki/Production it’s crucial to have the right akka settings before running any benchmarks (depending on whether your app is mainly a blocking or non-blocking app you may need to use different threading settings). Also, please make sure you only benchmark in prod mode.
As for ebean: play is using the ebean library as is (including running ebean’s bytecode enhancer), so there is nothing special about it. Generally speaking, each request gets a separate thread and we send the response through akka to netty asynchronously.
Hope this helps.