Michael
Michael

Reputation: 42050

Design of server component in Scala

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:

Does it make sense? Are there any good examples of such a component in Scala?

Upvotes: 1

Views: 118

Answers (1)

fracca
fracca

Reputation: 2437

It makes sense given the details you showed.

A good framework for such case would be Akka. See the examples available in the source code, and the many open sourced projects in GitHub.

Upvotes: 1

Related Questions