Closed inakianduaga closed 8 years ago
Actually if we use websockets we can push the report results over the websocket, and we wouldn't need the database. This should be quite simple and with almost no changes to the frontend
https://www.playframework.com/documentation/2.4.x/ScalaWebSockets
http://blog.scottlogic.com/2014/07/23/frp-with-bacon-and-d3.html
Deprecated below
Scala examples
http://alvinalexander.com/scala/simple-scala-akka-actor-examples-hello-world-actors
Since each actor has a path (unique), we can search for it by doing
import play.api.libs.concurrent.Akka
import play.api.Play.current
// some code
val what = Akka.system.actorSelection("some path")
and presumably we can use that to tell the actor to do something
We should also be able to retrieve the name of a given actor
Check typesafe's activator ReactiveMaps
project that explains the actor & websocket
Heroku has a 30 sec maximum execution time, so we need to make the processing async and keep state in a db
https://gist.github.com/larste/6683694