First Steps with Akka Remoting
Initially, I was hopeful that setting up a simple client/server infrastructure with akka would be very easy and painless because
- akka documentation is generally very well-written and comprehensive,
- the API looks astonishingly simple.
- There are some good code samples in the akka repository.
- Don't let the links to old documentation versions misguide you! - Always check that the websites you're looking at are about the most current version of akka.
- The client seems to require a full
ActorSystemwith remoting just for calling remote actors on the server.
- The client
ActorSystemhas to bind to a different port than the server
ActorSystemwhen running on the same box. Use different configuration sections or files.
- If you try to look up a remote actor using a wrong akka url, you won't get any kind of error message. It just won't work at all.
- If you call your remote actor
serverActorand your remote actor system
ServerSystem, and it's running on
localhost:2554, its url is
sbt distwon't copy any subproject libraries into the mikrokernel when the
nameof your sbt subprojects are not equal. Always use the name you set in your subproject settings (for example
name := "akka-shared") for your subproject id (
lazy val shared = Project(id = "akka-shared", ...)