Midterm Examination

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Java RMI, JSON. gRPC

Last updated 10:22 PM on 4/10/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

14 Terms

1
New cards

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.

2
New cards

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.

3
New cards

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.

4
New cards

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.

5
New cards

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.

6
New cards

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.

7
New cards

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.

<p><span style="font-family: Arial, sans-serif;">An <mark data-color="yellow" style="background-color: yellow; color: inherit;">open-source RPC framework developed by Google in 2016</mark>, based on an internal rewrite of their long-standing RPC system. It functions as a <mark data-color="red" style="background-color: red; color: inherit;">low-level transport protocol for transferring data packets between communicating programs</mark>.</span> It allows programs running on <mark data-color="green" style="background-color: green; color: inherit;">different machines to </mark><span style="font-family: Calibri, sans-serif;"><strong><mark data-color="green" style="background-color: green; color: inherit;">communicate efficiently</mark> by calling methods remotely</strong></span>, similar to traditional RPC—but optimized for speed and scalability.</p>
8
New cards

Communication Patterns

Define how clients and servers exchange messages over HTTP/2.

  • Unary RPC

  • Server Streaming RPC

  • Client Streaming RPC

  • Bidirectional Streaming

9
New cards

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.

10
New cards

Server Streaming

  • Clients send a single request.

  • The server sends multiple responses back.

  • Useful when the server

11
New cards

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.

12
New cards

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.

13
New cards

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.

14
New cards

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.