restatedev / restate

Restate is the platform for building resilient applications that tolerate all infrastructure faults w/o the need for a PhD.
https://docs.restate.dev
Other
1.63k stars 37 forks source link

Investigate feasibility of Hyper 1.0 usage for invoker #100

Closed tillrohrmann closed 1 year ago

slinkydeveloper commented 1 year ago

I've identified the components we need to implement this migration:

Client

Body

Body::sender has been removed. We can use StreamBody from http-body-util to send and receive streaming bodies, or implement ourselves our own body, since the trait has been simplified and should be easier to implement one now.

tillrohrmann commented 1 year ago

Do we need to support HTTP/1? Or could we just reduce the scope of the invoker to HTTP/2?

Will the lambda service endpoint work with HTTP/2? If yes, then one thing I could imagine where HTTP/1 might be useful is if someone wants to implement a SDK w/ it (because request/response mode is simpler or so?).

slinkydeveloper commented 1 year ago

Will the lambda service endpoint work with HTTP/2?

Yes, because the users puts the AWS API gateway in front of it, which supports HTTP/2 prior knowledge and ALPN, so no issues there.

HTTP/1 might be useful is if someone wants to implement a SDK w/ it (because request/response mode is simpler or so?).

The invoker doesn't imply that HTTP/2 means bidi-stream support, it picks the service protocol "mode" based on the configuration and not on the established connection.

I would say let's implement HTTP/1 only if we need it. I think it's safe to assume that communications between internal systems out there today can do HTTP/2.

slinkydeveloper commented 1 year ago

I think for the time being we agree to stay on hyper, and eventually adopt 1.0 when possible. I'll close this issue for the time being as I consider the investigation done.