Scala actors & Ambient Reference

Yes, this is possible with Akka. There are 2 ways to achieve this as far as I know: akka-remote – Provides remote actor ref, but you need to decide where each actor should exsist. akka-cluster – Provides cluster sharding. Automatically manages actor physical location and ensures that given shard (Actor) is present on at most … Read more

When to use Actors vs Futures?

There certainly is no shortage of opinion on the topic of what should and shouldn’t be an actor. Like these two posts: http://noelwelsh.com/programming/2013/03/04/why-i-dont-like-akka-actors/ http://www.chrisstucchio.com/blog/2013/actors_vs_futures.html I don’t think you’re going to find an absolute answer to this question other then that it’s situational and it’s really up to your preferences and your problem. What I can … Read more

Map the Exception of a failed Future

There is also: f recover { case cause => throw new Exception(“Something went wrong”, cause) } Since Scala 2.12 you can do: f transform { case s @ Success(_) => s case Failure(cause) => Failure(new Exception(“Something went wrong”, cause)) } or f transform { _.transform(Success(_), cause => Failure(new Exception(“Something went wrong”, cause)))}

Difference between Java Concurrency, Akka and RxJava?

According to Mathias Doenitz at this point in time RxJava doesn’t have back pressure unlike Akkas Reactive Streams implementation. But RxJava seems to be working on adding back pressure. Both frameworks will be able to interact through the reactive streaming spi. So you will be able to do very very similar things. According to Mathias … Read more

How to restrict actor messages to specific types?

Then you’d have to encode the message type into the Actor ref, which would drastically decrease the value of something like the ActorRegistry. Also, with powerful mechanics like “become” (which is fundamental to the actor model) typing the messages is less valuable. Since Akka doesn’t leak memory when a message is not matched to the … Read more

Spray, Akka-http and Play, Which is the best bet for a new HTTP/REST project

Spray is production ready, but the development team (Mathias Doenitz) works for Typesafe on Akka-http now. The status of Akka-http is “development preview”. There are vague promises of a full release “within a few months”, but nothing you can take to the bank. Edited 29-July-2015: The status of Akka-HTTP is now “release candidate” with version … Read more

Discovery of Akka actors in cluster

I’m working on a private project which is basically a very extended version of the chatroom example and I also had startup problems with akka and the whole “decentralized” thinking. So I can tell you how I “solved” my extended chatroom: I wanted a server which could easily be deployed multiple times without much additional … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)