Skip to content

Instantly share code, notes, and snippets.

@pradeexsu
Created May 18, 2024 07:39
Show Gist options
  • Save pradeexsu/22a4b52b44f6e51972fec79a4aff0468 to your computer and use it in GitHub Desktop.
Save pradeexsu/22a4b52b44f6e51972fec79a4aff0468 to your computer and use it in GitHub Desktop.
API Protocol

APIs

  1. SOAP (Simple Object Access Protocol): - Exchanging structured data, highly secure and reliable. - Built-in support for features like transactions, security, and ACID compliance. - Commonly used in enterprise-level integrations where interoperability, formal contracts (via WSDL), and centralized control are important considerations. - Stateful interactions or when the service contracts are predefined and need to be strictly adhered to.
  2. REST (Representational State Transfer): - Scalable, lightweight APIs that are easy to understand and use. - Suitable for web applications, mobile apps, and public APIs, simplicity, performance, and scalability. - Best suited for stateless interactions. - CRUD (Create, Read, Update, Delete) operations on resources exposed via URLs.
  3. RPC (Remote Procedure Call): - Invoke procedures or functions on remote systems (of any other micro-service). - Call functions on remote server and receive results synchronously. - Tightly coupled systems or distributed systems when performance is critical.
  4. GraphQL:(readHeavy System) - Flexible and efficient way to query and manipulate data. - Varying data requirements and need to retrieve or update complex nested data structures with a single request. - Rapidly changing requirements, bandwidth efficiency is a concern, allows clients to request only the data they need. - Used for modern web and mobile applications that require real-time updates and a high degree of flexibility in data retrieval.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment