SlideShare a Scribd company logo
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

More Related Content

What's hot

Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method InvocationPaul Pajo
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVAJalpesh Vasa
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corbaMayuresh Wadekar
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocationashishspace
 
Naming in Distributed Systems
Naming in Distributed SystemsNaming in Distributed Systems
Naming in Distributed SystemsNandakumar P
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.pptVMahesh5
 
Chapter 14 replication
Chapter 14 replicationChapter 14 replication
Chapter 14 replicationAbDul ThaYyal
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and modelsMayank Jain
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architectureAbDul ThaYyal
 
Communications is distributed systems
Communications is distributed systemsCommunications is distributed systems
Communications is distributed systemsSHATHAN
 
Simplex stop and_wait_protocol
Simplex stop and_wait_protocolSimplex stop and_wait_protocol
Simplex stop and_wait_protocolMusfira Ameer
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed SystemsDilum Bandara
 

What's hot (20)

Java RMI
Java RMIJava RMI
Java RMI
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVA
 
007 nms smi, oid, snmp method
007 nms smi, oid, snmp method007 nms smi, oid, snmp method
007 nms smi, oid, snmp method
 
Distributed objects & components of corba
Distributed objects & components of corbaDistributed objects & components of corba
Distributed objects & components of corba
 
Corba
CorbaCorba
Corba
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
Distributed deadlock
Distributed deadlockDistributed deadlock
Distributed deadlock
 
Naming in Distributed Systems
Naming in Distributed SystemsNaming in Distributed Systems
Naming in Distributed Systems
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Servlet.ppt
Servlet.pptServlet.ppt
Servlet.ppt
 
Chapter 14 replication
Chapter 14 replicationChapter 14 replication
Chapter 14 replication
 
Ds objects and models
Ds objects and modelsDs objects and models
Ds objects and models
 
4.file service architecture
4.file service architecture4.file service architecture
4.file service architecture
 
Communications is distributed systems
Communications is distributed systemsCommunications is distributed systems
Communications is distributed systems
 
Simplex stop and_wait_protocol
Simplex stop and_wait_protocolSimplex stop and_wait_protocol
Simplex stop and_wait_protocol
 
Semi join
Semi joinSemi join
Semi join
 
Introduction to EJB
Introduction to EJBIntroduction to EJB
Introduction to EJB
 
Jdbc ppt
Jdbc pptJdbc ppt
Jdbc ppt
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
 

Viewers also liked

Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with codekamal kotecha
 
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
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivityTanmoy Barman
 
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
 

Viewers also liked (20)

Java rmi example program with code
Java rmi example program with codeJava rmi example program with code
Java rmi example program with code
 
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)
 

Similar to Java rmi

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

More from 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
 

More from 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
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Alison B. Lowndes
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesBhaskar Mitra
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCzechDreamin
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyJohn Staveley
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Product School
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxDavid Michel
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...CzechDreamin
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlPeter Udo Diehl
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesThousandEyes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Thierry Lestable
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupCatarinaPereira64715
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaRTTS
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...Product School
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...Elena Simperl
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxAbida Shariff
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomCzechDreamin
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
Demystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John StaveleyDemystifying gRPC in .Net by John Staveley
Demystifying gRPC in .Net by John Staveley
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 

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.