SlideShare ist ein Scribd-Unternehmen logo
1 von 18
by Tanmoy Barman
Cont: barmantanmoy.47@gmail.com
Discussion
 Definition.
 Scenario.
 Local Vs. Remote Object
 Goals of RMI.
 Architecture of RMI.
 How it works?
 RMI vs. CORBA.
 Other Remote object Technologies.
Define
 RMI (Remote Method Invocation) represents a distributed
Object Application. It allows a java program running on
one JVM ( i.e. client) to invoke methods on another
JVM(i.e. Server).
 Therefore RMI represents a Client and Server.
 Java RMI is provided in the java.rmi package.
Scenario
 Consider the follow scenario :
 Developer A writes a service that performs some useful function.
He regularly updates this service, adding new features and
improving existing ones.
 Developer B wishes to use the service provided by Developer A.
However, it's inconvenient for A to supply B with an update every
time.
 Java RMI provides a very easy solution! Since RMI can
dynamically load new classes, Developer B can let RMI handle
updates automatically for him. Developer A places the new
classes in a web directory, where RMI can fetch the new
updates as they are required.
Scenario
Developer A
Client
S
E
R
V
E
R
Remote method Invocation
JVM
JVM
Developer B
Local Vs. Remote Object
 Although we would like remote objects to behave exactly
the same as local object, that is impossible for several
reasons:
 Networks can be unreliable.
 Resources may not be accessible.
 References on one machine (memory addresses) have no
meaning on another machine.
Goals of RMI
 Minimize difference between working with local and remote
Objects.
 Minimize Complexity.
 Preserve Type Safety.
 Distributed Garbage Collection.
Architecture
Architecture
 RMI architecture consists of:-
 Application layer.
 Proxy layer(Stub and skeleton).
 RRL(Remote Reference Layer).
 Transport layer.
Architecture
 Application Layer
 It’s a responsible for the actual logic (implementation) of the
client and server applications.
 Generally at the server side class contain implementation logic
and also apply the reference to the appropriate object as per the
requirement of the logic in application.
 Proxy Layer
 It’s also called the “Stub/Skeleton layer”. A Stub class is a client
side proxy handles the remote objects which are getting from the
reference. A Skeleton class is a server side proxy that set the
reference to the objects which are communicates with the Stub.
Architecture
 Remote Reference Layer (RRL)
 It’s a responsible for manage the references made by the
client to the remote object on the server so it is available on
both JVM (Client and Server).
 The Client side RRL receives the request for methods from
the Stub that is transferred into byte stream process called
serialization (Marshaling) and then these data are send to the
Server side RRL.
 The Server side RRL doing reverse process and convert the
binary data into object. This process called deserialization
(or Unmarshaling )and then sent to the Skeleton class.
Architecture
 Transport Layer
 It’s also called the “Connection layer”. It’s a responsible
for the managing the existing connection and also setting up
new connections. So it is a work like a link between the
RRL on the Client side and the RRL on the Server side.
How it works?
 The RMI Registry is a naming service.
 RMI server programs use this service to bind the remote
java object with the names using “Naming.rebind()”.
 Clients executing on local or remote machines retrieve the
remote objects by their name registered with the RMI
registry using “Naming.lookup()”and then execute
methods on the objects.
 1099 is the default RMI port.
How it works?
Client
S
E
R
V
E
R
RMI
Registry
Communicate directly by invoking
methods on the remote object
RMI Vs. CORBA
 RMI
 Specified to only java Technology.
 Interfaces specified internally in java.
 Distributed Garbage collection is available integrated with
local collectors.
 Object are passed and returned as parameters.
 It is free of cost.
RMI Vs. CORBA (contd.)
 CORBA
 Specified to any language.
 Interfaces defined externally through IDL(Interfaces
Definition Language) .
 No distributed Garbage collection is available.
 Cost money according to the vendor.
Other Remote Object Technologies
 CORBA
 Common Object Request Broker Architecture
 Designed for interoperability between different
languages as well as different architectures.
 DCOM or COM
 Distributed Component Object Model
 Interoperability between different machines and
language as long as they are Wintel.
Java rmi

Weitere ähnliche Inhalte

Was ist angesagt?

Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
kamal kotecha
 
Object and component based middleware for distributed system development
Object and component based middleware for distributed system developmentObject and component based middleware for distributed system development
Object and component based middleware for distributed system development
ektabhalwara
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
Mayuresh Wadekar
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
guest11106b
 

Was ist angesagt? (20)

Java RMI
Java RMIJava RMI
Java RMI
 
Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
 
Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)
 
Java buzzwords
Java buzzwordsJava buzzwords
Java buzzwords
 
Corba
CorbaCorba
Corba
 
Java RMI
Java RMIJava RMI
Java RMI
 
Servlets
ServletsServlets
Servlets
 
Network programming in java - PPT
Network programming in java - PPTNetwork programming in java - PPT
Network programming in java - PPT
 
8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems8. mutual exclusion in Distributed Operating Systems
8. mutual exclusion in Distributed Operating Systems
 
Object and component based middleware for distributed system development
Object and component based middleware for distributed system developmentObject and component based middleware for distributed system development
Object and component based middleware for distributed system development
 
Core java complete ppt(note)
Core java  complete  ppt(note)Core java  complete  ppt(note)
Core java complete ppt(note)
 
Java thread life cycle
Java thread life cycleJava thread life cycle
Java thread life cycle
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
JAVA PROGRAMMING- GUI Programming with Swing - The Swing ButtonsJAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
Java multi threading
Java multi threadingJava multi threading
Java multi threading
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
Enterprise Java Beans - EJB
Enterprise Java Beans - EJBEnterprise Java Beans - EJB
Enterprise Java Beans - EJB
 

Andere mochten auch

A Short Java RMI Tutorial
A Short Java RMI TutorialA Short Java RMI Tutorial
A Short Java RMI Tutorial
Guo Albert
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
Ashish Kumar
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)
Sri Prasanna
 

Andere mochten auch (20)

A Short Java RMI Tutorial
A Short Java RMI TutorialA Short Java RMI Tutorial
A Short Java RMI Tutorial
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
Rmi architecture
Rmi architectureRmi architecture
Rmi architecture
 
Basic java
Basic java Basic java
Basic java
 
Introduction To Rmi
Introduction To RmiIntroduction To Rmi
Introduction To Rmi
 
Rmi ppt-2003
Rmi ppt-2003Rmi ppt-2003
Rmi ppt-2003
 
Remote method invocation
Remote method invocationRemote method invocation
Remote method invocation
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure call
 
RPC
RPCRPC
RPC
 
Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
LIS Education in Africa
LIS Education in AfricaLIS Education in Africa
LIS Education in Africa
 
Java RMI Detailed Tutorial
Java RMI Detailed TutorialJava RMI Detailed Tutorial
Java RMI Detailed Tutorial
 
Ravi Tuppad
Ravi TuppadRavi Tuppad
Ravi Tuppad
 
Routing Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.pptRouting Technique Table Type by Umar danjuma maiwada.ppt
Routing Technique Table Type by Umar danjuma maiwada.ppt
 
Java rmi
Java rmiJava rmi
Java rmi
 
Jdbc example program with access and MySql
Jdbc example program with access and MySqlJdbc example program with access and MySql
Jdbc example program with access and MySql
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)
 
Rmi
RmiRmi
Rmi
 

Ähnlich wie Java rmi

Distributed Programming using RMI
 Distributed Programming using RMI Distributed Programming using RMI
Distributed Programming using RMI
backdoor
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMI
backdoor
 
Session 1 Tp1
Session 1 Tp1Session 1 Tp1
Session 1 Tp1
phanleson
 

Ähnlich wie Java rmi (20)

Oracle docs rmi applications
Oracle docs rmi applicationsOracle docs rmi applications
Oracle docs rmi applications
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
Module 3 remote method invocation-2
Module 3   remote method  invocation-2Module 3   remote method  invocation-2
Module 3 remote method invocation-2
 
Rmi
RmiRmi
Rmi
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
MIDELWARE TECH
MIDELWARE TECHMIDELWARE TECH
MIDELWARE TECH
 
Java RMI(Remote Method Invocation)
Java RMI(Remote Method Invocation)Java RMI(Remote Method Invocation)
Java RMI(Remote Method Invocation)
 
Remote method invocation
Remote method invocationRemote method invocation
Remote method invocation
 
DS
DSDS
DS
 
Remote method invocatiom
Remote method invocatiomRemote method invocatiom
Remote method invocatiom
 
Java rmi
Java rmiJava rmi
Java rmi
 
Rmi
RmiRmi
Rmi
 
Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)Report on mini project(Student database handling using RMI)
Report on mini project(Student database handling using RMI)
 
Java rmi tutorial
Java rmi tutorialJava rmi tutorial
Java rmi tutorial
 
Distributed Programming using RMI
 Distributed Programming using RMI Distributed Programming using RMI
Distributed Programming using RMI
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMI
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVA
 
Distributed objects
Distributed objectsDistributed objects
Distributed objects
 
DS R16 - UNIT-3.pdf
DS R16 - UNIT-3.pdfDS R16 - UNIT-3.pdf
DS R16 - UNIT-3.pdf
 
Session 1 Tp1
Session 1 Tp1Session 1 Tp1
Session 1 Tp1
 

Mehr von Tanmoy Barman (6)

Jini
JiniJini
Jini
 
Java server pages
Java server pagesJava server pages
Java server pages
 
java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technology
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architecture
 
introduction to channel borrowing scheme in cellular networks
introduction to channel borrowing scheme in cellular networksintroduction to channel borrowing scheme in cellular networks
introduction to channel borrowing scheme in cellular networks
 
INTRODUCTION TO CLOUD COMPUTING
INTRODUCTION TO CLOUD COMPUTINGINTRODUCTION TO CLOUD COMPUTING
INTRODUCTION TO CLOUD COMPUTING
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Java rmi

  • 1. by Tanmoy Barman Cont: barmantanmoy.47@gmail.com
  • 2. Discussion  Definition.  Scenario.  Local Vs. Remote Object  Goals of RMI.  Architecture of RMI.  How it works?  RMI vs. CORBA.  Other Remote object Technologies.
  • 3. Define  RMI (Remote Method Invocation) represents a distributed Object Application. It allows a java program running on one JVM ( i.e. client) to invoke methods on another JVM(i.e. Server).  Therefore RMI represents a Client and Server.  Java RMI is provided in the java.rmi package.
  • 4. Scenario  Consider the follow scenario :  Developer A writes a service that performs some useful function. He regularly updates this service, adding new features and improving existing ones.  Developer B wishes to use the service provided by Developer A. However, it's inconvenient for A to supply B with an update every time.  Java RMI provides a very easy solution! Since RMI can dynamically load new classes, Developer B can let RMI handle updates automatically for him. Developer A places the new classes in a web directory, where RMI can fetch the new updates as they are required.
  • 6. Local Vs. Remote Object  Although we would like remote objects to behave exactly the same as local object, that is impossible for several reasons:  Networks can be unreliable.  Resources may not be accessible.  References on one machine (memory addresses) have no meaning on another machine.
  • 7. Goals of RMI  Minimize difference between working with local and remote Objects.  Minimize Complexity.  Preserve Type Safety.  Distributed Garbage Collection.
  • 9. Architecture  RMI architecture consists of:-  Application layer.  Proxy layer(Stub and skeleton).  RRL(Remote Reference Layer).  Transport layer.
  • 10. Architecture  Application Layer  It’s a responsible for the actual logic (implementation) of the client and server applications.  Generally at the server side class contain implementation logic and also apply the reference to the appropriate object as per the requirement of the logic in application.  Proxy Layer  It’s also called the “Stub/Skeleton layer”. A Stub class is a client side proxy handles the remote objects which are getting from the reference. A Skeleton class is a server side proxy that set the reference to the objects which are communicates with the Stub.
  • 11. Architecture  Remote Reference Layer (RRL)  It’s a responsible for manage the references made by the client to the remote object on the server so it is available on both JVM (Client and Server).  The Client side RRL receives the request for methods from the Stub that is transferred into byte stream process called serialization (Marshaling) and then these data are send to the Server side RRL.  The Server side RRL doing reverse process and convert the binary data into object. This process called deserialization (or Unmarshaling )and then sent to the Skeleton class.
  • 12. Architecture  Transport Layer  It’s also called the “Connection layer”. It’s a responsible for the managing the existing connection and also setting up new connections. So it is a work like a link between the RRL on the Client side and the RRL on the Server side.
  • 13. How it works?  The RMI Registry is a naming service.  RMI server programs use this service to bind the remote java object with the names using “Naming.rebind()”.  Clients executing on local or remote machines retrieve the remote objects by their name registered with the RMI registry using “Naming.lookup()”and then execute methods on the objects.  1099 is the default RMI port.
  • 14. How it works? Client S E R V E R RMI Registry Communicate directly by invoking methods on the remote object
  • 15. RMI Vs. CORBA  RMI  Specified to only java Technology.  Interfaces specified internally in java.  Distributed Garbage collection is available integrated with local collectors.  Object are passed and returned as parameters.  It is free of cost.
  • 16. RMI Vs. CORBA (contd.)  CORBA  Specified to any language.  Interfaces defined externally through IDL(Interfaces Definition Language) .  No distributed Garbage collection is available.  Cost money according to the vendor.
  • 17. Other Remote Object Technologies  CORBA  Common Object Request Broker Architecture  Designed for interoperability between different languages as well as different architectures.  DCOM or COM  Distributed Component Object Model  Interoperability between different machines and language as long as they are Wintel.