If I had to set up an API,
here are 6 protocols I'd consider:
1 REST (Representational State Transfer)
↳ A stateless, resource-based API protocol using standard HTTP methods
↳ Best for: CRUD operations in web and mobile apps
↳ Risk: over-fetch or under-fetch data because of fixed endpoints
——
2 gRPC (Google Remote Procedure Call)
↳ A high-performance, contract-based protocol using a binary format
↳ Best for: internal microservices communication
↳ Risk: limited browser support
——
3 GraphQL
↳ An API query language for clients to request specific data
↳ Best for: frontend-heavy apps with complex data fetching needs and faster response needs
↳ Risk: performance issues from overly flexible queries
——
4 SOAP (Simple Object Access Protocol)
↳ A protocol using XML for messaging with strict standards
↳ Best for: enterprise applications that need high security
↳ Risk: verbose & complex because of XML specifications
——
5 WebSockets
↳ A bidirectional, real-time protocol over a persistent TCP connection
↳ Best for: real-time apps, such as chat or sports updates
↳ Risk: extra logic needed to handle connection states and reconnections
——
6 MQTT (Message Queuing Telemetry Transport)
↳ A lightweight, publish-subscribe protocol
↳ Best for: IoT, sensor devices
↳ Risk: complex queries and large payloads may not work well
(What else should make this list?)
———
💾 Save this for later and restack it to help others learn system design.