Hi Andy, further details on how (where to which client) you want to push would be helpful for my understanding (and future development).
We have developed an example app recently that does such a thing, it registers "drones" in an actor that keeps track of them by ID, and allows the server at-will to push commands to the drones into the websocket connection such drone has opened. It does a bit more so (handles resumption and clustering) it's more complex, but you could have a look at it for now: https://github.com/henrikengstrom/sa-2017-akka/blob/master/src/main/scala/org/h3nk3/saconf/backend/DroneConnectionHub.scala It is in Scala but the code would be pretty much the same in Java. I think this may point you in the direction you might want to take this. Hope this helps -- Konrad `ktoso` Malawski Akka <http://akka.io> @ Lightbend <http://lightbend.com> On 22 April 2017 at 02:15:32, Andrew Schenck ([email protected]) wrote: Hello all, I have scoured the questions raised here that are similar to my needs but so far have not been successful at finding a solution. I need (want) to be able to create an akka websocket server in which I can send messages from the server to the clients connected (for example, send the outputs from a flink analytic along the websocket to an end user GUI). I was able to implement the request-response example, but so far have had little success in a 'server push' model. Using something like jetty it is as easy as ws.broadcast, but I understand akka needs to use backpressure etc, soI guess what I am stumbling with is how to create a proper flow in a 'server-push' model, in *java*. If there are examples I can look at (haven't found any) or some literature I can read or any suggestions as to how to create this 'server-push' websocket model it would be greatly appreciated. Thanks for the help, Andy -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
