SlideShare a Scribd company logo
1 of 12
REMOTE
METHOD
INVOCATION
BY
S.RAGAVI
I –M.SC(CS)
NADAR SARASWATHI
COLLEGE OF ART AND
SCIENCE
Introduction
 Low-level sockets can be used to develop
client/server distributed applications
 But in that case, a protocol must be designed
 Designing such a protocol is hard and error-
prone (how to avoid deadlock?)
 RMI is an alternative to sockets
What is RMI?
 A core package of the JDK1.1+ that can be used
to develop distributed applications
 Similar to the RPC mechanism found on other
systems
 In RMI, methods of remote objects can be invoked
from other JVMs
 In doing so, the programmer has the illusion of
calling a local method (but all arguments are
actually sent to the remote object and results sent
back to callers)
Copyright © 2001 Qusay H. Mahmoud
Local v. Remote method invocation
Goals and Features of RMI
 seamless object remote invocations
 callbacks from server to client
 distributed garbage collection
 in RMI, all objects must be written in Java
RMI System Architecture
 Built in three layers (they are all independent):
- Stub/Skeleton layer
- Remote reference layer
- Transport layer
Copyright © 2001 Qusay H. Mahmoud
The Stub/Skeleton layer
 The interface between the application layer
and the rest of the system
 Stubs and skeletons are generated using the
RMIC compiler
 This layer transmits data to the remote
reference layer via the abstraction of marshal
streams (that use object serialization)
 This layer doesn’t deal with the specifics of
any transport
The Stub/Skeleton l
- Client stub responsible for:
 Initiate remote calls
 Marshal arguments to be sent
 Inform the remote reference layer to invoke the call
 Unmarshaling the return value
 Inform remote reference the call is complete
- Server skeleton responsible for:
 Unmarshaling incoming arguments from client
 Calling the actual remote object implementation
 Marshaling the return value for transport back to
client
The Remote Reference Layer
 The middle layer
 Provides the ability to support varying remote
reference or invocation protocols independent of
the client stub and server skeleton
 Example: the unicast protocol provides point-to-
point invocation, and multicast provides invocation
to replicated groups of objects, other protocols
may deal with different strategies.
 Not all these features are supported.
The Transport Layer
 A low-level layer that ships serialized objects
between different address spaces
 Responsible for:
 Setting up connections to remote address spaces
 Managing the connections
 Listening to incoming calls
 Maintaining a table of remote objects that reside in
the same address space
 Setting up connections for an incoming call
 Locating the dispatcher for the target of the remote
call
How does RMI work?
 An invocation will pass through the
stub/skeleton layer, which will transfer data to
the remote reference layer
 The semantics of the invocation are carried to
the transport layer
 The transport layer is responsible for setting
up the connection
Remote  method invocation

More Related Content

What's hot

6 Switch Fabric
6 Switch Fabric6 Switch Fabric
6 Switch FabricFNian
 
Get into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ TestGet into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ Testcertblaster
 
10 implementing subprograms
10 implementing subprograms10 implementing subprograms
10 implementing subprogramsMunawar Ahmed
 
OSI (open systems interconnection) Model
OSI (open systems interconnection) ModelOSI (open systems interconnection) Model
OSI (open systems interconnection) ModelNetwax Lab
 
The Solaris Network Environment (Presentation
The Solaris Network Environment (PresentationThe Solaris Network Environment (Presentation
The Solaris Network Environment (Presentationmayur6789
 
9 subprograms
9 subprograms9 subprograms
9 subprogramsjigeno
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolMohd Arif
 
HDLC(High level Data Link Control)
HDLC(High level Data Link Control)HDLC(High level Data Link Control)
HDLC(High level Data Link Control)sonangrai
 
Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...
Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...
Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...Luigi Vanfretti
 
ITFT_Data Link Layer issues
ITFT_Data Link Layer  issuesITFT_Data Link Layer  issues
ITFT_Data Link Layer issuesSneh Prabha
 
Sreerag parallel programming
Sreerag   parallel programmingSreerag   parallel programming
Sreerag parallel programmingSreerag Gopinath
 

What's hot (20)

Hdlc
HdlcHdlc
Hdlc
 
10. sub program
10. sub program10. sub program
10. sub program
 
6 Switch Fabric
6 Switch Fabric6 Switch Fabric
6 Switch Fabric
 
Loader
LoaderLoader
Loader
 
Get into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ TestGet into Networking by Clearing Comptia Network+ Test
Get into Networking by Clearing Comptia Network+ Test
 
10 implementing subprograms
10 implementing subprograms10 implementing subprograms
10 implementing subprograms
 
X.25
X.25X.25
X.25
 
OSI (open systems interconnection) Model
OSI (open systems interconnection) ModelOSI (open systems interconnection) Model
OSI (open systems interconnection) Model
 
Parallel programming model
Parallel programming modelParallel programming model
Parallel programming model
 
Module3 part1
Module3 part1Module3 part1
Module3 part1
 
The Solaris Network Environment (Presentation
The Solaris Network Environment (PresentationThe Solaris Network Environment (Presentation
The Solaris Network Environment (Presentation
 
X.25
X.25X.25
X.25
 
9 subprograms
9 subprograms9 subprograms
9 subprograms
 
Hdlc ppt..
Hdlc ppt..Hdlc ppt..
Hdlc ppt..
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
HDLC(High level Data Link Control)
HDLC(High level Data Link Control)HDLC(High level Data Link Control)
HDLC(High level Data Link Control)
 
Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...
Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...
Towards Consistent Model Exchange and Simulation of VSC-HVDC Controls for EMT...
 
ITFT_Data Link Layer issues
ITFT_Data Link Layer  issuesITFT_Data Link Layer  issues
ITFT_Data Link Layer issues
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
Sreerag parallel programming
Sreerag   parallel programmingSreerag   parallel programming
Sreerag parallel programming
 

Similar to Remote method invocation

remote method invocation
remote method invocationremote method invocation
remote method invocationRavi Theja
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptxFamiDan
 
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)shraddha mane
 
Module 3 remote method invocation-2
Module 3   remote method  invocation-2Module 3   remote method  invocation-2
Module 3 remote method invocation-2Ankit Dubey
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocationashishspace
 
DS R16 - UNIT-3.pdf
DS R16 - UNIT-3.pdfDS R16 - UNIT-3.pdf
DS R16 - UNIT-3.pdfVarshaBaini
 
Java RMI Detailed Tutorial
Java RMI Detailed TutorialJava RMI Detailed Tutorial
Java RMI Detailed TutorialMasud Rahman
 
Distributed Programming using RMI
 Distributed Programming using RMI Distributed Programming using RMI
Distributed Programming using RMIbackdoor
 
Distributed Programming using RMI
Distributed Programming using RMIDistributed Programming using RMI
Distributed Programming using RMIbackdoor
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed SystemsDilum Bandara
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVAJalpesh Vasa
 
20CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 220CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 2Kathirvel Ayyaswamy
 

Similar to Remote method invocation (20)

remote method invocation
remote method invocationremote method invocation
remote method invocation
 
CHP-4.pptx
CHP-4.pptxCHP-4.pptx
CHP-4.pptx
 
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)
 
Module 3 remote method invocation-2
Module 3   remote method  invocation-2Module 3   remote method  invocation-2
Module 3 remote method invocation-2
 
Remoting and serialization
Remoting and serializationRemoting and serialization
Remoting and serialization
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
DS R16 - UNIT-3.pdf
DS R16 - UNIT-3.pdfDS R16 - UNIT-3.pdf
DS R16 - UNIT-3.pdf
 
RMI (Remote Method Invocation)
RMI (Remote Method Invocation)RMI (Remote Method Invocation)
RMI (Remote Method Invocation)
 
Java RMI Detailed Tutorial
Java RMI Detailed TutorialJava RMI Detailed Tutorial
Java RMI Detailed 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
 
009693652.pdf
009693652.pdf009693652.pdf
009693652.pdf
 
B0960512
B0960512B0960512
B0960512
 
On MQ Series & JMS
On MQ Series & JMSOn MQ Series & JMS
On MQ Series & JMS
 
Communication in Distributed Systems
Communication in Distributed SystemsCommunication in Distributed Systems
Communication in Distributed Systems
 
Rmi
RmiRmi
Rmi
 
Rmi
RmiRmi
Rmi
 
Remote Method Invocation in JAVA
Remote Method Invocation in JAVARemote Method Invocation in JAVA
Remote Method Invocation in JAVA
 
20CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 220CS2021-Distributed Computing module 2
20CS2021-Distributed Computing module 2
 
20CS2021 Distributed Computing
20CS2021 Distributed Computing 20CS2021 Distributed Computing
20CS2021 Distributed Computing
 

More from DEEPIKA T

71619109 configuration-management.pdf (1) (1)
71619109 configuration-management.pdf (1) (1)71619109 configuration-management.pdf (1) (1)
71619109 configuration-management.pdf (1) (1)DEEPIKA T
 
Parallelizing matrix multiplication
Parallelizing  matrix multiplicationParallelizing  matrix multiplication
Parallelizing matrix multiplicationDEEPIKA T
 
Health care in big data analytics
Health care in big data analyticsHealth care in big data analytics
Health care in big data analyticsDEEPIKA T
 
Role of human interaction
Role of human interactionRole of human interaction
Role of human interactionDEEPIKA T
 
Basic analtyics & advanced analtyics
Basic analtyics & advanced analtyicsBasic analtyics & advanced analtyics
Basic analtyics & advanced analtyicsDEEPIKA T
 
Soap,Rest&Json
Soap,Rest&JsonSoap,Rest&Json
Soap,Rest&JsonDEEPIKA T
 
Graph representation
Graph representationGraph representation
Graph representationDEEPIKA T
 
Presentation2
Presentation2Presentation2
Presentation2DEEPIKA T
 
Depth first search [dfs]
Depth first search [dfs]Depth first search [dfs]
Depth first search [dfs]DEEPIKA T
 
Topological sort
Topological sortTopological sort
Topological sortDEEPIKA T
 
Path compression
Path compressionPath compression
Path compressionDEEPIKA T
 

More from DEEPIKA T (20)

See
SeeSee
See
 
71619109 configuration-management.pdf (1) (1)
71619109 configuration-management.pdf (1) (1)71619109 configuration-management.pdf (1) (1)
71619109 configuration-management.pdf (1) (1)
 
80068
8006880068
80068
 
242296
242296242296
242296
 
Data mining
Data miningData mining
Data mining
 
Parallelizing matrix multiplication
Parallelizing  matrix multiplicationParallelizing  matrix multiplication
Parallelizing matrix multiplication
 
Health care in big data analytics
Health care in big data analyticsHealth care in big data analytics
Health care in big data analytics
 
Ajax
AjaxAjax
Ajax
 
Role of human interaction
Role of human interactionRole of human interaction
Role of human interaction
 
Basic analtyics & advanced analtyics
Basic analtyics & advanced analtyicsBasic analtyics & advanced analtyics
Basic analtyics & advanced analtyics
 
Soap,Rest&Json
Soap,Rest&JsonSoap,Rest&Json
Soap,Rest&Json
 
Applet (1)
Applet (1)Applet (1)
Applet (1)
 
Jdbc ja
Jdbc jaJdbc ja
Jdbc ja
 
Appletjava
AppletjavaAppletjava
Appletjava
 
Graph representation
Graph representationGraph representation
Graph representation
 
Al
AlAl
Al
 
Presentation2
Presentation2Presentation2
Presentation2
 
Depth first search [dfs]
Depth first search [dfs]Depth first search [dfs]
Depth first search [dfs]
 
Topological sort
Topological sortTopological sort
Topological sort
 
Path compression
Path compressionPath compression
Path compression
 

Recently uploaded

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 

Recently uploaded (20)

18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 

Remote method invocation

  • 2. Introduction  Low-level sockets can be used to develop client/server distributed applications  But in that case, a protocol must be designed  Designing such a protocol is hard and error- prone (how to avoid deadlock?)  RMI is an alternative to sockets
  • 3. What is RMI?  A core package of the JDK1.1+ that can be used to develop distributed applications  Similar to the RPC mechanism found on other systems  In RMI, methods of remote objects can be invoked from other JVMs  In doing so, the programmer has the illusion of calling a local method (but all arguments are actually sent to the remote object and results sent back to callers)
  • 4. Copyright © 2001 Qusay H. Mahmoud Local v. Remote method invocation
  • 5. Goals and Features of RMI  seamless object remote invocations  callbacks from server to client  distributed garbage collection  in RMI, all objects must be written in Java
  • 6. RMI System Architecture  Built in three layers (they are all independent): - Stub/Skeleton layer - Remote reference layer - Transport layer Copyright © 2001 Qusay H. Mahmoud
  • 7. The Stub/Skeleton layer  The interface between the application layer and the rest of the system  Stubs and skeletons are generated using the RMIC compiler  This layer transmits data to the remote reference layer via the abstraction of marshal streams (that use object serialization)  This layer doesn’t deal with the specifics of any transport
  • 8. The Stub/Skeleton l - Client stub responsible for:  Initiate remote calls  Marshal arguments to be sent  Inform the remote reference layer to invoke the call  Unmarshaling the return value  Inform remote reference the call is complete - Server skeleton responsible for:  Unmarshaling incoming arguments from client  Calling the actual remote object implementation  Marshaling the return value for transport back to client
  • 9. The Remote Reference Layer  The middle layer  Provides the ability to support varying remote reference or invocation protocols independent of the client stub and server skeleton  Example: the unicast protocol provides point-to- point invocation, and multicast provides invocation to replicated groups of objects, other protocols may deal with different strategies.  Not all these features are supported.
  • 10. The Transport Layer  A low-level layer that ships serialized objects between different address spaces  Responsible for:  Setting up connections to remote address spaces  Managing the connections  Listening to incoming calls  Maintaining a table of remote objects that reside in the same address space  Setting up connections for an incoming call  Locating the dispatcher for the target of the remote call
  • 11. How does RMI work?  An invocation will pass through the stub/skeleton layer, which will transfer data to the remote reference layer  The semantics of the invocation are carried to the transport layer  The transport layer is responsible for setting up the connection