3 ms·
In the APIs of tomorrow clients should ask servers to prepare operations without executing them. Servers should return ids which clients may embed within follo
by lazyexecution 6y ago
In the APIs of tomorrow clients should ask servers to prepare operations without executing them. Servers should return ids which clients may embed within follow up operations, effectively allowing a client to construct a complex request out of simple operations and combinators.
Eventually the client will ask the server to evaluate the request and produce a result.
This lazy style of execution is what effect systems like https://zio.dev https://zio.dev support where a program constructs an effect which is executed later by the runtime.
I've attempted building this sort of effect-based API over protocols like ReST a few times without much success. The biggest problem isn't technical. The hardest problem is convincing coworkers and api consumers of the value of this approach.