-
Notifications
You must be signed in to change notification settings - Fork 44
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 "background calls" style of invocations #452
Comments
The way I've been thinking about this over the past months is to implement this at the ingress level, by implementing a well defined service Ingress {
rpc BackgroundInvoke(InvokeRequest) returns (BackgroundInvokeResponse);
}
message InvokeRequest {
string service = 1;
string method = 2;
bytes payload = 3;
}
message BackgroundInvokeResponse {
string sid = 1;
} With this contract in place, we need a bit of glue code and we just reuse and profit everything we have in the ingress, including gRPC, grpc web and connect support. Notably:
At the end of the day the user experience will look close to what you posted:
WDYT? |
Relevant discussion about returning invocation metadata: #288 |
I like it as well @slinkydeveloper, I'd be happy if we can have that 👍 |
We are missing a simple way to trigger a function without waiting it to actually complete.
In a recently learned use case, a user would like to trigger a long running workflow.
The way we currently do it, is by adding a service, that will do a background call to the real workflow service (like in the factoring example, verification test, etc') and indicate to the original caller that the request was durably accepted.
What can be useful for restate:
sid
that can be useful for introspection, deletion etc'.Here is an example of a possible interaction:
a response example can be
Not sure if headers are the correct approach in the long run, but it seems like less moving parts to manage at the moment.
Later I can see more requirements that would justify a brand new ingress endpoint, but not right now.
The text was updated successfully, but these errors were encountered: