|
|
|
|
|
by kodablah
4044 days ago
|
|
* Akka is not a totalizing choice, it's just a concurrency mechanism. Many people to not bury logic in there but in traits or other places handling normal futures. That's like saying if you use threads, it's a totalizing choice regardless of where the majority of your code resides. * "blocking is free" is contradicted right up earlier in the post with "highlights the additional cost of the real lightweight threads in Quasar" * I will admit, between these two choices, you must choose Akka if you embrace Scala. But the inverse is not true. * I don't believe it's a high rewrite price any more than any other library is. Do I pay a high rewrite price for using any other abstraction? I mean I just have functions that return futures, but because I composed them with Akka I can't rewrite it? In general I think it's unfair to make assumptions or opinions here. To compare objectively is one thing, but to say something is a choice one way, requires you code one way, etc is invalid. |
|
... that doesn't play nice with any other Java (or Clojure) concurrency mechanism.
> "blocking is free" is contradicted right up earlier in the post with "highlights the additional cost of the real lightweight threads in Quasar"
Well, very nearly free, and the cost will drop further.
> I mean I just have functions that return futures, but because I composed them with Akka I can't rewrite it?
Pretty much. Java code doesn't work that way, and certainly doesn't integrate with Scala futures. Also, you commit to using non-standard APIs in much of your application. With Quasar you'll likely write the REST endpoint in standard JAX-RS, and run it on top of Tomcat or Jetty or JBoss. So Akka is a library that 1/ encompasses many facets of your application, 2/ uses non-standard APIs everywhere and 3/ uses non-idomatic APIs that are very hard to compose with other Java libraries.
> to say something is a choice one way, requires you code one way, etc is invalid.
Akka does require you to write asynchronous code throughout the entire call-stack.