Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a "replyWith" in mcrew services #20

Open
jsccast opened this issue Jan 25, 2018 · 2 comments
Open

Support a "replyWith" in mcrew services #20

jsccast opened this issue Jan 25, 2018 · 2 comments

Comments

@jsccast
Copy link
Member

jsccast commented Jan 25, 2018

Currently cmd/mcrew has an internal service for HTTP requests. That service supports "replyTo":MACHINE_ID in a request, which will cause the response to include "to":MACHINE_ID.

As an aid to writing a machine specification that will execute "flows" (more on that later), "replyWith":SOME_DATA in a request should result in the response including "with":SOME_DATA.

@boriwo
Copy link

boriwo commented Jan 25, 2018

Yes, that's a great idea. In practice, I've been holding such data in the bindings of the requesting sheen, only to merge it with the http response once it comes back later. In a way this would be similar to how timers work, were the message field in a timer request is the equivalent piece of data that replyWith would be for http. Maybe just call it message in both cases? On a related note, I'm trying to assemble a list of all such pieces of semantically loaded meta data that's floating around so we have a reference catalog but also to be able to harmonize the syntax across all components.

@jsccast
Copy link
Member Author

jsccast commented Jan 25, 2018

The HTTP situation seems to have a different structure than the timers service. The HTTP response is itself a message, and the service can embed a "to" property based on the "replyTo" property in the request. In contrast, the entire timer message is provided by the timer requester. So "replyWith" seems to fit the HTTP service protocol better than the "message" thing. Will contemplate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants