Hi. I need to create an actor that will own some mutable state and offer a request-response interface to manipulate it. What is the proper way to achieve that with coroutines and channels? Perhaps:
- One single inbound channel that the clients use to send requests.
- Each client creates its own reply channel, that is added to the request.
- The actor coroutine sequentially fetch requests from the inbound channel, processes them, and sends the response to the reply channel referenced in the request.
So, there will be a single request channel and one reply channel per client.
Does this make sense? Is it possible to avoid having a reply channel per client?