I am breaking down a stateless microservice into multiple ones. I would like to maintain statelessness in all of them. Some requests require data provided by one (or more) of the other services. The choreography-based Saga Pattern solves this by letting services communicate through event streams and storing the original request in a pending state until the requested data is delivered back. Unfortunately storing the pending request in memory makes the services that rely on others stateful. I know this is not the end of the world but it makes things more complicated and I would like to avoid that if possible.
I can think of two alternatives that would allow all services to be stateless:
Storing the pending requests in some database temporarily
I'm not a big fan of this idea because it will probably slow things down quite a bit and requires additional infrastructure that needs to be maintained and is a potential point of failure.
Attach pending request data to event and push response to client
I use Nchan to send real-time updates to clients. I could attach all required data (everything needed to complete the request) to the event generated by Service A and send it off to Service B without storing the pending request in memory. Then Service B would do its thing and once it is done it could either directly send the response (of the original request) through Nchan or send an event back to Service A which would then send the response via Nchan.
Option 2 seems most viable to me right now. What do you think and is there another option I am missing?