[akka-user] Re: Akka HTTP Websockets Java with Actor

2018-03-04 Thread Brett Tofel
In case anyone is looking for an updated version of this code that will work with more current akka-http and Java: https://gist.github.com/bentito/560eb95c64fa131efb34ad62c7bf60f8 -Brett Tofel On Tuesday, March 8, 2016 at 9:59:26 AM UTC-5, Johan Andrén wrote: > > Here is an adaptation of the

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-05-12 Thread sergey . zakharov
We ended up creating flow per connection which is not ideal, but this flow holds reference to the actor and session id. The actor receives OpenSession event with unique session ID and reference to the actor to send replies, creates child to handle the session, and then dispatches all incoming

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-04-12 Thread Alan Klikic
Hi all, any feedback on this? Thank you in advance. Br, Alan Dana petak, 1. travnja 2016. u 15:53:17 UTC+2, korisnik Alan Klikic napisao je: > > Hi Endre, > > thank you for the info. > > All, > > I tested this example and noticed that AnActor is instanced only ones when > Router.createRoute

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-04-01 Thread Alan Klikic
Hi Endre, thank you for the info. All, I tested this example and noticed that AnActor is instanced only ones when Router.createRoute is called. Does this mean that one instance of AnActor is used for all websocket connections (if you have multiple parallel connections)? I thought that AnActor

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-31 Thread Endre Varga
On Thu, Mar 31, 2016 at 4:08 PM, Alan Klikic wrote: > Hi all, > > Sink sink = Flow.create() > .map((msg) -> new Incoming(msg.asTextMessage().getStrictText())) >* .to(Sink.actorRef(actor, PoisonPill.getInstance()));* > > Can you please explain

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-31 Thread Alan Klikic
Hi all, Sink sink = Flow.create() .map((msg) -> new Incoming(msg.asTextMessage().getStrictText())) * .to(Sink.actorRef(actor, PoisonPill.getInstance()));* Can you please explain what does bolded part of the code do? My first thought was that PoisonPill is sent

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-20 Thread Konrad Malawski
New Java API is comign in very large steps, I think the new one you'll like a lot and come back to plain Akka :-) On Mon, Mar 14, 2016 at 5:13 PM, Guido Medina wrote: > Also there are other aspects you should be aware like back-pressure which > is better handled at Akka, to

Re: [akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-19 Thread Guido Medina
Give me cookies first, oreos !!! I'm sure I will, it is just a matter of time and spend sometime migrating, I just initially didn't have the time to be the first with headaches, That said I think in a couple of weeks I should be moved over. Thanks to Akka team and contributors for all the effort

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-14 Thread Guido Medina
Vert.x is just another reactive framework, I found it easier to use than Akka HTTP for Java that's all, and I think (at least today) it is faster. I cannot really recommend you one or the other just state what I know, the decision is still yours. I know Akka team works very hard on improving

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-14 Thread Alan Klikic
Hi Guido, thank you for the shared info. We are planing to use Google's Protocol Buffer (https://developers.google.com/protocol-buffers/) instead of JSON. You recommend using Vort.x with Netty implementation instead of Akka HTTP for now? Br, Alan Dana srijeda, 9. ožujka 2016. u 11:11:43

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-09 Thread Guido Medina
*Disclaimer:* The Akka HTTP performance on that page is outdated, now; if Akka HTTP is around 75% performance of Play 2, you can guess where it would be on that list. On Wednesday, March 9, 2016 at 9:58:04 AM UTC, Guido Medina wrote: > > Hi Alan, > > I hope the Akka/Java example has helped, I

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-08 Thread Johan Andrén
Here is an adaptation of the Scala sample, but in Java: import akka.NotUsed; import akka.actor.*; import akka.http.javadsl.model.ws.Message; import akka.http.javadsl.model.ws.TextMessage; import akka.http.javadsl.server.HttpApp; import akka.http.javadsl.server.Route; import

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-08 Thread code . patrol
It also may be helpful to check this blog post http://blog.scalac.io/2015/07/30/websockets-server-with-akka-http.html and its source code https://github.com/ScalaConsultants/wsug-akka-websockets On Tuesday, February 23, 2016 at 3:33:18 PM UTC+3, Guido Medina wrote: > > Hi, > > Has anyone been

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-08 Thread Alan Klikic
Hi Guido, this post helped me allot. Thanks. How can I send message from the Actor to the "connected" websocket? As a response to initial message received from websocket and as a standalone/push message from Actor to websocket? Thank you in advance. Br, Alan Dana srijeda, 24. veljače 2016. u

[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-02-24 Thread Guido Medina
While Akka HTTP is accessible to Java 8 users I decided to go for an alternative which I was trying to avoid but at least I know is of high performance and it fits right my needs. When a connection is upgraded to websocket it is passed to an actor, also every message sent is forwarded to an