Interface. ❖ Acts as a communication bridge between two systems. ❖ Enables software components to interact seamlessly. ➢ Example: Mobile app requesting weather data from a server.
(e.g., REST, gRPC). ❖ Library APIs: Access pre-built code libraries. ❖ OS APIs: Enable interaction with OS features. ❖ Hardware APIs: Interface with physical devices. ➢ Example: Mobile app requesting weather data from a server.
interact with an API. ❖ Includes: ▪ Endpoints. ▪ Methods (GET, POST, etc.). ▪ Data formats (JSON, XML, Protobuf). ▪ Authentication and error handling. ❖ Ensures consistency and predictable integration. ➢ Popular API specification formats: RESTful APIs, GraphQL, SOAP, gRPC
a Design Pattern ❖ Uses HTTP protocol ❖ Objects that are send or saved are called resources ❖ Operations are described by HTTP verbs ❖ Transfer data as XML or JSON
framework by Google ❖ High Performance RPC framework ❖ Uses HTTP/2 for efficient data transmission. ❖ Uses Protocol Buffers for message interchange and for the fast binary serialization.
client and server ❖ Performant and efficient on the wire Small binary message Faster serialization and deserialization ❖ In addition to traditional unary APIs, we get: Client Streaming APIs Server Streaming APIs Bi-Directional Streaming APIs Why gRPC? What do I get?
and efficiency, thanks to HTTP/2 and Protocol Buffers. ❖ Distributed Systems: Advanced features like authentication, bidirectional streaming, and flow control make it powerful for distributed architectures. ❖ Polyglot Environments: Supports multiple languages, enabling APIs for diverse client ecosystems. ❖ Mobile Apps: Efficient network usage and bidirectional streaming make it suitable for mobile API consumption. When to use gRPC?