SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Sonali Parab
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVAJalpesh Vasa
 
Java Networking
Java NetworkingJava Networking
Java NetworkingSunil OS
 
Serialization & De-serialization in Java
Serialization & De-serialization in JavaSerialization & De-serialization in Java
Serialization & De-serialization in JavaInnovationM
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types pptkamal kotecha
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods pptkamal kotecha
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in javaArafat Hossan
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)Manisha Keim
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate pptAneega
 
Remote Procedure Call in Distributed System
Remote Procedure Call in Distributed SystemRemote Procedure Call in Distributed System
Remote Procedure Call in Distributed SystemPoojaBele1
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 
Corba introduction and simple example
Corba introduction and simple example Corba introduction and simple example
Corba introduction and simple example Alexia Wang
 

Tendances (20)

RMI
RMIRMI
RMI
 
Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)Remote Method Invocation (Java RMI)
Remote Method Invocation (Java RMI)
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
CORBA & RMI in java
CORBA & RMI in javaCORBA & RMI in java
CORBA & RMI in java
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVA
 
Java RMI
Java RMIJava RMI
Java RMI
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
Serialization & De-serialization in Java
Serialization & De-serialization in JavaSerialization & De-serialization in Java
Serialization & De-serialization in Java
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
Servlets
ServletsServlets
Servlets
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
 
Multithreading in java
Multithreading in javaMultithreading in java
Multithreading in java
 
Java Server Pages(jsp)
Java Server Pages(jsp)Java Server Pages(jsp)
Java Server Pages(jsp)
 
Hibernate ppt
Hibernate pptHibernate ppt
Hibernate ppt
 
Remote Procedure Call in Distributed System
Remote Procedure Call in Distributed SystemRemote Procedure Call in Distributed System
Remote Procedure Call in Distributed System
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Struts
StrutsStruts
Struts
 
Corba introduction and simple example
Corba introduction and simple example Corba introduction and simple example
Corba introduction and simple example
 
Rmi architecture
Rmi architectureRmi architecture
Rmi architecture
 
Distributed objects
Distributed objectsDistributed objects
Distributed objects
 

En vedette

A Short Java RMI Tutorial
A Short Java RMI TutorialA Short Java RMI Tutorial
A Short Java RMI TutorialGuo Albert
 
Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Sun RPC (Remote Procedure Call)
Sun RPC (Remote Procedure Call)Peter R. Egli
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
Remote method invocation
Remote method invocationRemote method invocation
Remote method invocationDew Shishir
 
RPC: Remote procedure call
RPC: Remote procedure callRPC: Remote procedure call
RPC: Remote procedure callSunita Sahu
 
Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)Introduction to Remote Method Invocation (RMI)
Introduction to Remote Method Invocation (RMI)eLink Business Innovations
 
LIS Education in Africa
LIS Education in AfricaLIS Education in Africa
LIS Education in Africaavradeep30
 
Java RMI Detailed Tutorial
Java RMI Detailed TutorialJava RMI Detailed Tutorial
Java RMI Detailed TutorialMasud Rahman
 
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.pptumardanjumamaiwada
 
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 MySqlkamal kotecha
 
Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Rpc Case Studies (Distributed computing)
Rpc Case Studies (Distributed computing)Sri Prasanna
 
remote method invocation
remote method invocationremote method invocation
remote method invocationArun Nair
 

En vedette (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
 
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)
 
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
 
The 5th Fret (Band Profile)
The 5th Fret (Band Profile)The 5th Fret (Band Profile)
The 5th Fret (Band Profile)
 
remote method invocation
remote method invocationremote method invocation
remote method invocation
 

Similaire à Java rmi

Similaire à 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
 
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
 
RMI (Remote Method Invocation)
RMI (Remote Method Invocation)RMI (Remote Method Invocation)
RMI (Remote Method Invocation)
 
EJB.docx
EJB.docxEJB.docx
EJB.docx
 

Plus de Tanmoy Barman

java Servlet technology
java Servlet technologyjava Servlet technology
java Servlet technologyTanmoy Barman
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architectureTanmoy Barman
 
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 networksTanmoy Barman
 
INTRODUCTION TO CLOUD COMPUTING
INTRODUCTION TO CLOUD COMPUTINGINTRODUCTION TO CLOUD COMPUTING
INTRODUCTION TO CLOUD COMPUTINGTanmoy Barman
 

Plus de 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
 

Dernier

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
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 WorkerThousandEyes
 

Dernier (20)

Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
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.