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

Implement synchronous "data" endpoint #75

Closed
joestubbs opened this issue Mar 20, 2019 · 0 comments
Closed

Implement synchronous "data" endpoint #75

joestubbs opened this issue Mar 20, 2019 · 0 comments
Labels

Comments

@joestubbs
Copy link

By combining the aliases and results endpoint features, we have two of the primary building blocks for the proposed "adapters" capability. Even though it has essentially been implemented in tooling, it occurs to me that a final ingredient that would be of independent interest and would possibly allow us to call the adapters capability "feature complete" would be a synchronous data endpoint. The idea would be to provide a convenience endpoint like this:
/actors/v2/{actor_id}/data
(equivalently, /actors/v2/{alias}/data)
that would synchronously:

  1. send a message to an actor based on the request (see details below)
  2. subscribe to the execution's results queue and respond to the request by returning the result once ready.

This endpoint would provide a final ingredient for adapters since the request could contain "search" parameters representing a query to an adapter. Viewed in that way, it would make sense semantically for the endpoint to accept GET and URL query parameters.

However, the endpoint should also be useful for "compute oriented" actors since, by combining 1) and 2) into a synchronous call, it will eliminate poling on the client side, and should ultimately be much more efficient since it does not have to wait for the execution to be "finalized" by the worker (i.e., the various clean up tasks done at the end of an execution by the worker). With this use case in mind, to make the endpoint more useful, I think it could also accept POST, including octet stream content type bodies. This would make the functionality equivalent to the /messages endpoint.

@mwvaughn - I'd really like to hear you thoughts on this idea. In particular,

  1. what do you think about the endpoint name itself, (data), vs some we had considered in the past (e.g., /search). To me, /data seems more appropriate for handling other use cases outside of adapters.
  2. what do you think about allowing GET and POST?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants