Reputation: 42050
Suppose I need to a Scala
component to process incoming requests concurrently and return the processing results. Suppose also that the request processing consists of a few steps. Some of the steps are resource and time consuming, some of them are either I/O or CPU-bound, etc.
Assuming that requests come from inside the JVM I would design the component as follows:
Futures
, which wrap the stepsFuture
callbacks.Does it make sense? Are there any good examples of such a component in Scala?
Upvotes: 1
Views: 118