Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Remote Method Invocation (RMI) in Java: A Distributed System Approach, Study notes of Distributed Programming and Computing

This PPT report provides an in-depth understanding of Remote Method Invocation (RMI) in Java, a distributed computing model that allows Java objects to communicate with each other across different machines. the concepts of RMI, its implementation, and a case study of a temperature service. It also discusses exception handling and the process of preparing and running an RMI-based application.

What you will learn

  • How is exception handling implemented in RMI?
  • What is the role of the RMI registry in an RMI-based application?
  • What is Remote Method Invocation (RMI) in Java?
  • What are the steps involved in creating an RMI-based application?
  • How does RMI allow Java objects to communicate across different machines?

Typology: Study notes

2021/2022

Uploaded on 11/26/2022

prabhat-singh-13
prabhat-singh-13 🇮🇳

1 document

1 / 14

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
PPT REPORT
on
REMOTE METHOD INVOCATION
(DISTRIBUTED SYSTEM)
Submitted in the partial fulfilment of the requirement for the Degree of
BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE AND ENGINEERING
Submitted by:
PRABHAT SINGH
201910101110032
B. TECH CSE 4th YEAR
Under Guidance of-
MR. NEELESH MISHRA
(Asst. Professor)
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING.
SHRI RAMSWAROOP MEMORIAL UNIVERSITY,
LUCKNOW-DEVA ROAD, U.P., INDIA
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Partial preview of the text

Download Remote Method Invocation (RMI) in Java: A Distributed System Approach and more Study notes Distributed Programming and Computing in PDF only on Docsity!

PPT REPORT on REMOTE METHOD INVOCATION (DISTRIBUTED SYSTEM) Submitted in the partial fulfilment of the requirement for the Degree of BACHELOR OF TECHNOLOGY in COMPUTER SCIENCE AND ENGINEERING Submitted by: PRABHAT SINGH 201910101110032 B. TECH CSE 4th YEAR Under Guidance of- MR. NEELESH MISHRA (Asst. Professor) DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING. SHRI RAMSWAROOP MEMORIAL UNIVERSITY , LUCKNOW-DEVA ROAD, U.P., INDIA

CERTIFICATE

Certified that Prabhat Singh(201910101110032) has carried out the PPT work presented in this report entitled “REMOTE METHOD INVOCATION” for the award of Bachelor of Technology from Shri Ramswaroop Memorial University , Lucknow under my supervision. These embodies results of original work, and studies as are carried out by the student himself and the contents of the these do not form the basis for the award of any other degree to the candidate or to anybody else from this or any other University. Mr. Neelesh Mishra Assistant Professor Computer Science and Engineering Department Shri Ramswaroop Memorial University

DECLARATION

I hereby declare that this submission is my own work done under the guidance of Mr. Neelesh Mishra and that, to the best of my knowledge and belief, it contains no material previously published or written by another person nor material which to a substantial extent has been accepted for the award of any other degree or diploma of the university or other institute of higher learning, except where due acknowledgment has been made in the text. Signature: Name: PRABHAT SINGH Roll No: 201910101110032

INTRODUCTION

  • Remote Method Invocation (RMI) is Java’s implementation of obJect-to- object communication among Java objects to realize a distributed computing model.
  • RMI allows us to distribute our objects on various machines, and invoke methods on the objects located on remote sites.

STEPS IN RMI BASED APPLICATION

  1. Design the interface for the service.
  2. Implement the methods specified in the interface.
  3. Generate the stub and the skeleton.
  4. Register the service by name and location.
  5. Use the service in an application MORE DETAILS :-
    • Once the object (or service) is registered, a client can look up that service.
    • A client (application) receives a reference that allows the client to use the service (call the method).
    • Syntax of calling is identical to a call to a method of another object in the same program.

PARAMETER MARSHALLING

  • Transfer of parameters (or marshalling) is done by the RMI.
  • Complex objects are streamed using Serialization.
  • RMI model of networking for distributed system involves only Java.
  • No need to learn IDL or any other language. CASE STUDY: TEMPERATURE SERVICE
  • let’s create a distributed system using RMI model for networking (remote access).
  • Basically, this program will download the weather (temperature) information from the site: http://iwin.nws.noaa.gov/iwin/us/travele r.html

TEMPERATURE SERVER IMPL

this class’s constructor calls a private method which in turn:

  1. Connects to the URL specified
  2. Streams into a buffer the page referenced.
  3. Parses the buffer to get the required data.
  4. Creates an array of weather information STREAMING URL
    • Using the open Stream of java.net.URL class you can stream in the file specified by an universal resource locator (URL).
    • It can be streamed into a buffer where it can be analyzed for information. Any number of URLs can be streamed in.

SERVER OBJECT NAME

  • Syntax for the server object name is: //host: port/remoteObjectName
  • Default port number for rmiregistry is 1099
  • For local host the object name: //localhost/TempServer For a remote host, for example //127.0.0.1/TempServer WEATHER ITEM CLASS: - Is used in the Graphical display of the weather information.

BIBILOGRAPHY

  • https://web.cs.dal.ca/~jamie/CS3171/M aterials/Grundke/distrSys.ppt
  • http://gvpcew.ac.in/LN-CSE-IT- 22 - 32/CSE- IT/4-Year/42-DisSys/DSys-ChVVDP-UNIT- 3.pd
  • http://www.cs.toronto.edu/~penny/tea ching/csc407- 03s/lectures/15rmiejb.ppt
  • https://www.cs.ryerson.ca/~aabhari/ DS-CH5-RMI-2.ppt
  • https://cse.buffalo.edu/~bina/cse718/ lec14RMI/lec14RMI.ppt
  • https://www.geeksforgeeks.org/remo te-method-invocation-in-java/
  • https://www.javatpoint.com/RMI

CONCLUSION

  • We discussed the core concepts in implementing a distributed systems using RMI.
  • Temperature examples shown illustrates all the important RMI features.
  • The temperature example shown also illustrates how you may access data available in resources identified URLs.
  • We will analyze programs: 16.2, 16.6, 16.7.