Giter VIP home page Giter VIP logo

Comments (3)

inakianduaga avatar inakianduaga commented on July 19, 2024

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.

inakianduaga avatar inakianduaga commented on July 19, 2024

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.

inakianduaga avatar inakianduaga commented on July 19, 2024

Update:

Check typesafe's activator ReactiveMaps project that explains the actor & websocket

from scala-image-processor.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.