Book Akka Cookbook ⬆
Directory akka-cookbook\ contains Akka examples presented in Ortiz's book Akka Cookbook (Packt, 2017).It also includes different build scripts for experimenting with Akka on a Windows machine. |
Code examples can be built/run with the following tools:
Build tool | Build file | Parent file | Environment(s) |
---|---|---|---|
ant.bat |
build.xml |
build.xml |
Any a) |
gradle.bat |
build.gradle |
common.gradle |
Any |
make.exe |
Makefile |
Makefile.inc |
Any |
mvn.cmd |
pom.xml |
pom.xml |
Any |
sbt.bat |
build.sbt |
Any | |
cmd.exe |
build.bat |
Windows only |
a) Here "Any" means "tested on Windows, Cygwin, MSYS2 and UNIX".
The project directory is organised as follows :
> tree /a /f . | findstr /v /b [A-Z] | build.bat | build.gradle | build.sbt | build.sh | build.xml | gradle.properties | Makefile | pom.xml +---project | build.properties \---src +---main | +---resources | | application.conf | | logback.xml | \---scala | HelloAkka.scala \---test +---java | HelloAkkaTestJava.java \---scala HelloAkkaTest.scala
Batch file build.bat
matches what a user would run from the command prompt (use option -debug
to see the execution details):
> build -verbose run Compile 1 Scala source file to directory "target\classes" [HelloAkka-akka.actor.default-dispatcher-4] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started akka://HelloAkka >>> Press ENTER to exit <<<
🔎 Commands
ant.bat
(build.xml
),gradle.bat
(build.gradle
),make
(Makefile
),mvn
(pom.xml
) andsbt
(build.sbt
) produce the same output; for instance :> make -s run akka://HelloAkka >>> Press ENTER to exit <<<
BehaviourAndState
Example ▴
Batch file build.bat
matches what a user would run from the command prompt (use option -debug
to see the execution details):
> build -verbose run Compile 2 Scala source files to directory "target\classes" [BehaviourAndState-akka.actor.default-dispatcher-5] INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started actor.path=akka://BehaviourAndState/user/summingActor my state as sum is 2 >>> Press ENTER to exit <<< [BehaviourAndState-akka.actor.default-dispatcher-5] INFO akka.actor.CoordinatedShutdown - Running CoordinatedShutdown with reason [ActorSystemTerminateReason]
WIP
WIP
WIP
WIP
WIP
Footnotes ▴
[1] Lagom Documentation ↩
-
From the Lagom 1.6.x documentation :
- Java API docs
- Scala API docs (
com.lightbend.lagom.scaladsl
)