Akka gRPC Essentials A Hands-On Introduction

knoldus 29 views 11 slides May 03, 2024
Slide 1
Slide 1 of 11
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11

About This Presentation

Dive into the fundamental aspects of Akka gRPC and learn to leverage its power in building compact and efficient distributed systems. This session aims to equip attendees with the essential skills and knowledge to leverage Akka and gRPC effectively in building robust, scalable, and distributed appli...


Slide Content

Akka gRPC Essentials : A Hands-On Introduction Asbin Bhadra

Lack of etiquette and manners is a huge turn off.   KnolX Etiquettes Punctuality Join the session 5 minutes prior to the session start time. We start on time and conclude on time! Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call. Avoid Disturbance Avoid unwanted chit chat during the session.

What is  gRPC Why gRPC gRPC Architecture What is Akka gRPC Akka gRPC vs REST Demo

What is gRPC gRPC is a high-performance, open-source RPC (Remote Procedure Call) framework developed by Google. It uses HTTP/2 as the underlying protocol for communication, offering features like multiplexing, flow control, and header compression. gRPC enables efficient communication between distributed systems by defining a language-agnostic interface using Protocol Buffers ( protobufs ) for service definition and data serialization. It supports multiple programming languages. It facilitates the development of scalable, efficient, and resilient microservices architectures, with built-in support for load balancing, authentication, and error handling.

Why gRPC 2 1 4 3 Language Agnostic You can write services in different languages and have them communicate seamlessly. Bi-directional Streaming gRPC  supports bi-directional streaming, enabling efficient communication for real-time applications. Performance gRPC  offers high performance due to its use of HTTP/2 and binary serialization with  Protobuf . Strong Typing Protobuf  provides strong typing, making it easier to define APIs and generate client libraries.

gRPC Architecture gRPC follows a client-server architecture. The client sends a request to the server, which processes it and returns a response. gRPC Architecture revolves around the client-server communication model and it based on several key components.

gRPC Architecture Key Components Service Definition Server-Side Component  GRPC Server Client-Side Component GRPC Client Communication Protocol HTTP/2 Serialization Protocol Buffers ( protobuf )

Akka gRPC Akka gRPC is a framework that combines the power of Akka Toolkit and gRPC to build reactive, message-driven microservices. It provides a seamless integration between Akka actors and gRPC services, enabling developers to leverage the actor model for building highly concurrent and resilient systems. Akka gRPC utilizes Protocol Buffers for defining service contracts and message serialization, ensuring efficient communication between services. It offers features like streaming, backpressure handling, and supervision, which are inherent to Akka, enhancing the scalability and fault tolerance of gRPC -based applications. Akka gRPC supports both Java and Scala, making it suitable for developers familiar with the JVM ecosystem to build modern, reactive microservices.

Akka gRPC vs REST Architecture :  It builds on top of the gRPC framework, which is based on Remote Procedure Call (RPC) principles.  Performance : REST is an architectural style that relies on stateless, client-server communication via HTTP protocols. Type Safety : Akka gRPC natively supports bidirectional streaming and asynchronous communication. Akka gRPC Architecture :  REST is an architectural style that relies on stateless, client-server communication via HTTP protocols. Performance :  RESTful APIs are often optimized for simplicity and ease of use. However, performance can vary depending on factors such as network latency, payload size, and server-side processing. Type Safety : RESTful APIs can support asynchronous communication using techniques like long-polling or WebSockets , they are primarily based on request-response interactions. REST

Demo
Tags