Hi
I would like to ask a question relative to particular usage of actor model than doesn't fite well with atmos.
We use actors to make http queries outside a lot of http queries.
Here is a snippet code :
val futures = for (request <- validRequest) yield {
monitoringService.recordParallelDispatcherRequest(flow, request._2.engine.getName, chainMessage.engineContext.serveAdContext.sessionId.toString)
val engineActor = request._1 match { case StaticEngine() => staticEngineActor; case HttpEngine() => httpEngineActor }
(engineActor ? request._2).recover { case e => {
log.info("Parallel Timeout after " + timeout.duration.toMillis + " milliseconds for request: " + request._2)
monitoringService.recordParallelDispatcherTimeout(flow, request._2.engine.getName, chainMessage.engineContext.serveAdContext.sessionId.toString)
NoHttpResult(chainMessage, request._2.engine) }
}.mapTo[HttpResult]
Then we don't block and have a Oncomplete block like this
Future.sequence(futures) onComplete {
case Success(httpResults) => {
The problem is that the console doesn't give us the real time consumed by the actor processing
The latency scatter stay always at 10~15 ms but we know for sure that the time consumed into the actor is longer.
We think that the ask "EngineActor" for future breaks the console time counting thus give the time only of the first part of the code but not the real time consumed by the actor including the http responses.
What do you think ?
Thanks