RMI_Notes_PPT.pptx_ppt_ppt_agvsghavshavy

BhagyashreeRudraswam 5 views 8 slides Sep 15, 2025
Slide 1
Slide 1 of 8
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8

About This Presentation

RMI (Remote Method Invocation) is a Java API that allows an object in one Java Virtual Machine (JVM) to invoke methods on an object located in another JVM (possibly on a different machine).

It is Java’s way of implementing distributed object communicatio


Slide Content

Remote Method Invocation (RMI) .

What is RMI? - Allows calling methods on objects located on another machine - Extends object-oriented programming to distributed systems

Design Issues in RMI - Objects contain data + methods - New objects can be created dynamically - Object state can change after method call - One method can call others - Exception handling is important - Garbage collection frees unused objects

Distributed Objects - Objects may be on different computers - Client-Server model: client requests, server executes - Advantages: • Replication for reliability • Migration for performance • Encapsulation (state hidden) • Synchronization for multiple clients

Local vs Remote Invocation - Local invocation: same computer - Remote invocation: across computers using RMI

Remote References & Interfaces - Remote references: special reference to call remote methods - Remote interfaces: define methods callable remotely - Java RMI: interfaces extend Remote - CORBA: uses IDL

Actions in Distributed Objects - Remote calls may trigger further calls - New objects can be created remotely - References shared with clients

Garbage Collection & Exceptions - Java: automatic distributed garbage collection - C++: manual memory management - Exceptions may occur due to: • Network delay or crash • Lost messages - Must handle errors (timeouts, access issues)
Tags