This is not related to the elevator. There are already many different pieces of information:
- The HttpClient library, as already suggested,
- or Dispatch Scala library for accessing HTTP services
- information on how to cache data in Scala in various ways, if you need it
Think about caching completely, it is usually a good choice if your application generates a lot of requests and you can afford caching. Caching will allow you to achieve many goals:
- reduce response time, since you are not dependent on a remote service (if you perform synchronous data processing)
- avoid denial of service in the event of the death of a remote service. Otherwise, your application will generate many sockets for reading data and output resources (either sockets, or threads, or something else).
- do not exceed the SLA of the remote service, as many services limit the number of requests that you are allowed to pefrorm for a certain period of time.
So, you can just sit and stack these things to get this.
source share