This project aims at providing an actor system for Scala.js, featuring:
- Supervision
- (Almost) transparent collaboration with actors in an Akka-based backend
- Transparent collaboration with actors in several Web Workers
It is currently a prototype, working well but still in a rough shape. Hence, it is not published anywhere yet.
To build the libraries, use
> package
in an sbt console.
The fault-tolerance example is taken from Akka's documentation and showcases supervision, death watch notifications and the like.
Build it with:
> faultToleranceExample/packageJS
then open examples/faulttolerance/index-dev.html
in your browser and look
at the Web console for the output.
The Web Workers example demonstrates the communication between Web Workers.
Build it with:
> webworkersExample/packageJS
then open examples/webworkers/index-dev
in your browser and look at the Web
console for the output.
The Chat example is a full-stack Play/Akka/Scala.js application where client and server communicate transparently between Akka/JVM and "Akka/JS".
Build the client then run the server with:
> chatExampleScalaJS/optimizeJS
> project chatExample
[scalajs-actors-examples-chat] $ run
then navigate to http://localhost/opt with your browser. To have some fun, open multiple tabs (or multiple browsers) and start playing with the chat.
The best source of documentation for the design at large is this report.
Scala.js actors is distributed under the Scala License.