score:0

There is a better solution within akka than Actors directly. This type of problem can be solved with the akka-http library which uses Streams (that utilize Actors "underneath the hood").

You first need an ActorSystem and ActorMaterializer:

import akka.actor.ActorSystem
import akka.stream.ActorMaterializer

implicit val actorSystem = ActorSystem()
implicit val actorMaterializer = ActorMaterializer()

import actorSystem.dispatcher

Then establish a connection with the request-id service:

import scala.concurrent.Future

import akka.stream.scaladsl.{Source, Flow}

import akka.http.scaladsl.Http
import akka.http.scaladsl.model.{HttpRequest, HttpResponse}

val idServiceUrl = "idServiceUrl.com"

val requestIDFlow : Flow[HttpRequest, HttpResponse, Future[Http.OutgoingConnection]]  = 
  Http().outgoingConnection(idServiceUrl)

The question was not specific about the "set of parameters and a specific date". It was also not specific on how those parameters and date should form an HttpRequest:

type ParametersType = ???
type DateType = ???

def paramsToIDRequest(paramaters : ParametersType, date : DateType) : HttpRequest = 
  ???

This method can then be used to query for a request-id:

type IDType = ???

//converts the http response from the ID service into an ID
def httpResponseToID(httpResponse : HttpResponse) : IDType = ???

val requestIDFuture : Future[IDType] = 
  Source.single(parametersToIDRequest(...))
        .via(requestIDFlow)
        .map(httpRequestToID)
        .runWith(Sink.head)

Similar techniques can be used to the get the status and finally get the results...


Related Query

More Query from same tag