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
local.
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 servers
protocol buffer response(s) to the client.
gRPC uses protocol buffers (created by Google) as the data
interchange format
Unlike JSON, protocol buffers are a binary Interface Definition
Language (IDL) which makes it much faster for computers to
process.
Calls can be synchronous or asynchronous
Client and server in different languages
4. Protobuff
Proto file - defines how the client and
server can communicate and with what
information
Protoc compiler generates the client code
required to talk to server from .proto file
Takes care of serializing and deserializing
the requests and responses.
6. Accessing rpc service programmatically
Test the API as a whole unit in itself - seeing it as a black box that accepts a request and
returns a response