Question

Just getting invited to look at an issue in a third party application where the behavior is as more clients connect (using web socket) app hangs after a certain connections. I am trying to get more info and better access to the codebase but below is what I have right now which looks like a standard code flow. Any gottachs to keep in mind when play, akka, web sockets are in the mix? Will post more info as it becomes available.

Controller has

def service = WebSocket.async[JsValue] { request =>
       Service.createConnection
 }

Service.createConnection looks as

def createConnection: Future[(Iteratee[JsValue, _], Enumerator[JsValue])] = {

val serviceActor = Akka.system.actorOf(Props[ServiceActor])

val socket_id = UUID.randomUUID().toString

val (enumerator, mChannel) = Concurrent.broadcast[JsValue]

    (serviceActor ? Connect(socket_id, mChannel)).map{
    ...........
    }
}

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top