Comments (3)
Update: Better use websockets
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
Bacon.js for reactive websockets
http://blog.scottlogic.com/2014/07/23/frp-with-bacon-and-d3.html
from scala-image-processor.
TODO:
- Modify actor creation to use the random websocket id available in the session.
Deprecated below
- After connection, send from the server a websocket ID to the client that needs to be included in each request to get updates pushed back to the client (otherwise we need to do this using Session Ids)
- Find a way to assign names to the actors we create, and to fetch actors by name as well (where name would be the unique id we want)
Scala examples
http://alvinalexander.com/scala/simple-scala-akka-actor-examples-hello-world-actors
Looking up 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
from scala-image-processor.
Update:
Check typesafe's activator ReactiveMaps
project that explains the actor & websocket
from scala-image-processor.
Related Issues (9)
- Add JS gallery to show generated images
- Provide random images for testing HOT 1
- Add stopwatch to time speed
- Create single thread execution context HOT 1
- Refactor file to use Play.resource?
- Add error message on ajax error
- Update websocket path to use same path as host
- Convert Jquery dom bindings to Bacon streams
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scala-image-processor.