basiliscos / cpp-rotor

Event loop friendly C++ actor micro-framework, supervisable
MIT License
344 stars 33 forks source link

request-responce match/tracking and processing #6

Closed basiliscos closed 5 years ago

basiliscos commented 5 years ago

If an actor reacts on some message type (response), when actor sends an request we'd like to invoke specific to the response handler.

One obvious solution will be to include request message into response, and do some if in actor. Not very nice.

Another solution is to generate an new address, let the actor subscribes to the address, and let the actor sets this ephemeral address as reply_to in the request. That works, however what about fail-case? Also if there is an undefined number of such req/res, how to manage them?

Some pattern should be developed in rotor::core

basiliscos commented 5 years ago

Done with v0.04