Web Services
created: 18 January 2021
revision: 1
REST - set of Constraints
- Uniform (HTTP) interface, Client-Server independent evolution, Cacheable, Layered systems, Code on demand; Stateless - data requests are independent from prior and future requests;
- Prefer when information needs to be read/written at a source level: photos, read/write submitted data, ordering information
- Nice to have HATEOAS, where future possible actions are part of the response.
SOAP - protocol
- Transport independent, works well in distributed environments, standardized (wsdl).
- Prefer for conversational state management (stateful): financial services, e-commerce payments, more complex services.
gRPC + Protobuf
- Get/Post only
GraphQL
- JSON based
- precise data request and more efficient data loading.
- queries into several systems can be done as one
- beware cyclic cases
- :-) The best practice with versioning is not to version the API at all.
- might lead to performance issues due to complexity of queries.