APIs Flashcards
1
Q
Most popular API Architecture styles
A
- SOAP: XML-based for enterprise applications where security and reliability are a priority. Complex and verbose and relies on strict standards
- RESTful: Resource-based for web servers and built on http methods. Easy to implement but not great if you need real time data
- Statelessness is a core principle, making it suitable for stateless operations and distributed systems.
- Typically JSON (though XML and other formats can also be used)
- GraphQL: Query language for reduced network load. Good for apps with complex data requirements but more processing on the server side.
- Provides a schema system, allowing clients to request only the data they need and amalgamate multiple requests into one.
- JSON responses
- gPRC: High performance for inter-service communication for microservices. Uses protocol buffers by default. Limited browser support.
- Uses HTTP/2 for transport, supporting bidirectional streaming and multiplexing, which enhances communication efficiency.
- Protocol Buffers (protobuf) is a binary serialization format developed by Google for efficient data interchange between services.
- WebSocket: Bi-directional for low-latency data exchange when you need real time data.
- Creates a long-lived connection between client and server, allowing for real-time, continuous data flow without repeatedly polling.
- Typically JSON, but binary data like Protocol Buffers can also be used.
- Webhook: Asynchronous for event-driven applications. Not good if you need synchronous communication or an immediate response.
- Typically relies on HTTP callbacks and is useful for integrating disparate systems through event reactions.
- Typically JSON