Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The point about operations is a very, very valid constraint of REST. Easy and common stuff like, "run this thing in the background", "send of this one, ephemeral, message" are very unnatural. Maybe a hybrid / bastard child of REST and gRPC would be a good marriage of resource and operations modelling.


The Google Cloud standard for async operations via the google.longrunning.Operation service: https://github.com/googleapis/googleapis/blob/master/google/.... This should be usable either via REST/JSON or gRPC.

It's designed to be generic for any kind of async operation, and to be "mixed in" with your APIs. There are utilities for waiting for an operation to finish (via polling); in theory it should be possible to use some type of server-push to avoid polling, but I'm not sure if anybody's doing this.

(I'm an Alphabet employee who's working on APIs delivered via gRPC / REST/JSON.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: