APIs Flashcards

1
Q

Most popular API Architecture styles

A
  1. SOAP: XML-based for enterprise applications where security and reliability are a priority. Complex and verbose and relies on strict standards
  2. 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)
  1. 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
  1. 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.
  1. 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.
  1. 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly