by _Codemonkeyism · 11y ago · 0 comments
The advantage of futures comes when they are used in conjunction with AIO, they provide a decent abstraction for dealing with it. The performance benefits come from using AIO, Futures just provide a convenient way to deal with the results.
If Play was built on Tomcat instead of Netty, and you made various blocking calls inside the functions called by the Futures, you wouldn't get any performance benefits.
I try to add something in the end about thread pools. I didn't want to go into the thread/Core, different thread pools for IO/computation and thread pool for blocking direction to make it more complex.