Remote method invocation in Java

Слайд 2

Introduction

a Java API that performs remote method invocation, the object-oriented equivalent of remote procedure

Introduction a Java API that performs remote method invocation, the object-oriented equivalent
calls (RPC).
Supports direct transfer of serialized Java classes and distributed garbage collection.
an alternative to low level sockets.
Instead of creating objects on local machines we create some of the objects on other machines and we communicate with those objects as we would normally do with local objects.

Слайд 3

WHAT IS RMI?

RMI is a core package of the JDK 1.1

WHAT IS RMI? RMI is a core package of the JDK 1.1
and above that can be used to develop distributed application.
It enables software developers to write distributed applications in which the methods of remote objects can be invoked from other JVMs

Слайд 4

Goals of RMI

Support seamless remote invocations on objects in different java virtual

Goals of RMI Support seamless remote invocations on objects in different java
machines.
Integrate the distributed object model into the Java language in a natural way while retaining most of the Java language’s object semantics.
Make writing reliable distributed applications as simple as possible.
Preserve the safety provided by the java sun real time environment.

Слайд 5

Java RMI Overview

Java RMI Overview

Слайд 6

Security

There are a number of security issues that you should be aware

Security There are a number of security issues that you should be
of when developing mission-critical systems in RMI.
There is no authentication; a client just requests and object (stub), and the server supplies it. Subsequent communication is assumed to b from the same client.
There is no access control to the objects
There are no security checks on the RMI registry itself; any caller Is allowed to make request.
There is no version control between the stubs and the skeletons, making it possible for client to use a down-level stub to access a more recent skeleton breaking release-to-release binary compatibility

Слайд 7

Java RMI steps

Define the remote interface.
Implement the server.
Implement the client.
Compile the source

Java RMI steps Define the remote interface. Implement the server. Implement the
files.
Start the Java RMI registry, Server and Client.

Слайд 8

Example

This example will follow to create a distributed version of the classic

Example This example will follow to create a distributed version of the
Hello World program using Java Remote Method Invocation (Java RMI).
uses a simple client to make a remote method invocation to a server which may be running on a remote host.
The files which shall be created are:
Hello.java - a remote interface.
Server.java - a remote object implementation that implements the remote interface
Client.java - a simple client that invokes a method of the remote interface.

Слайд 9

Hello.java

Hello.java

Слайд 10

Server.java

Server.java

Слайд 11

Client.java

Client.java

Слайд 12

References

Qusay H. Mahmoud,(1999). Distributed Programming with Java. Greenwich CT: Manning Publications Co.
https://en.wikipedia.org/wiki/Java_remote_method_invocation
https://docs.oracle.com/javase/8/docs/technotes/guides/rmi/hello/hello-world.html
http://lycog.com/wp-content/uploads/2011/03/java-rmi-overview.png

References Qusay H. Mahmoud,(1999). Distributed Programming with Java. Greenwich CT: Manning Publications Co. https://en.wikipedia.org/wiki/Java_remote_method_invocation https://docs.oracle.com/javase/8/docs/technotes/guides/rmi/hello/hello-world.html http://lycog.com/wp-content/uploads/2011/03/java-rmi-overview.png
Имя файла: Remote-method-invocation-in-Java.pptx
Количество просмотров: 30
Количество скачиваний: 0