With the gaining popularity of SOA, gRPC architecture, which was adapted by Google for internal services communication ,has been gaining popularity. This slide share is about testing gRPC services at the service layer.
2. What is gRPC ?
Remote Procedure Calls
Protocol developed by Google
Client communicates with the server by calling functions defined on the API as if they were
Increasingly popular on microservices architecture for internal service communications
Where data from the service is not directly consumed by a web browser
Faster, efficient protocol with lesser network overhead - built on top of Http2 (connection
reuse,parallel requests) and protobuff
3. RPC - Working
gRPC client talks to server via gRPC channel
gRPC sends request(s) to the server and returns the server’s
protocol buffer response(s) to the client.
gRPC uses protocol buffers (created by Google) as the data
Unlike JSON, protocol buffers are a binary Interface Definition
Language (IDL) which makes it much faster for computers to
Calls can be synchronous or asynchronous
Client and server in different languages
● Proto file - defines how the client and
server can communicate and with what
● Protoc compiler generates the client code
required to talk to server from .proto file
● Takes care of serializing and deserializing
the requests and responses.