1/13
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
Distributed Systems
Simple:
They can be defined as a combination of several computers with separate memory (linked over a network), on which it’s possible to run an application.
Depth:
It’s a collection of independent computers (nodes) that each have their own memory and processing power, but are connected through a network and work together to function as a single system.
Remote Procedure Call (RPC)
First successful distributed technology used in distributed systems/applications. It is a communication mechanism that allows a program to execute a function on another computer as if it were a local function call.
Distributed Programming in Java
Refers to the use of Java technologies to build applications where different parts of the program run on different machines, but still work together as one system.
Java Remote Method Invocation (RMI)
Enables the programmer to create distributed applications. Methods of remote Java objects can be invoked from other Java VMs (possibly different hosts). i.e., it can have a server that connects clients from different computers and/or virtual environments.
Procedure Calls
Also called a Local Procedure call, it is a function call (method call) within a process to execute some code; it’s when a program invokes a function/method that exists within the same process and memory space.
Remote Procedure Call
A software communication protocol that enables one program to request a service from another program on a different computer network without needing to understand the network details. It is a protocol that allows a program (client) to request and execute a function on another program located on a different machine, as if it were a local function call.
gRPC
An open-source RPC framework developed by Google in 2016, based on an internal rewrite of their long-standing RPC system. It functions as a low-level transport protocol for transferring data packets between communicating programs. It allows programs running on different machines to communicate efficiently by calling methods remotely, similar to traditional RPC—but optimized for speed and scalability.

Communication Patterns
Define how clients and servers exchange messages over HTTP/2.
Unary RPC
Server Streaming RPC
Client Streaming RPC
Bidirectional Streaming
Unary RPC
Simplest form of a remote procedure call
Interaction follows a basic request-response pattern.
Client sends a single request to the server and waits for a single response.
The server processes the request and responds with the status details and optional metadata.
Server Streaming
Clients send a single request.
The server sends multiple responses back.
Useful when the server
Client Streaming
Client sends a stream of multiple messages to the server.
Server waits for a single response.
Ideal for scenarios when a client needs to upload a large
amount of data in chunks.
Bidirectional Streaming
Both the client and the server send streams of messages to each other independently.
Client initiates the call and can start sending messages immediately
The server simultaneously receives those messages and responds with its own stream.
Both can read and write messages at the same time.
Protocol Buffers
These are a language-neutral, platform-neutral extensible mechanism for serializing structured data. It’s like JSON except it’s much faster and generates native language bindings.
The data structure you want to serialize is defined in a proto file.
Proto File: An ordinary text file with a .proto extension.One major component are messages, which are small logical records of information. Each message consists of a series of fields, represented as name-value pairs.
gRPC and Protocol Buffers
The service definition in a .proto file plays a role like the remote interface in Java RMI. It specifies the methods that can be invoked remotely, and the server must provide an implementation of those methods. On the client side, the generated stubs use that definition to call the server’s implementation as if they were local methods, even though the calls are executed across the network.