16
+ The structure of Java RMI Brief introduction to the internal structure of Java RMI V 0.1 © 2014 José María Foces Morán. All rights reserved

The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+

The structure of Java RMI

Brief introduction to the internal structure of Java RMI

V 0.1 © 2014 José María Foces Morán. All rights reserved

Page 2: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

2

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Page 3: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

3

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Creates and runs the remote object

Page 4: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

4

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Creates and runs the remote object

Server

Page 5: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

5

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Creates and runs the remote object

ServerRemote Object Impl

Page 6: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

6

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Creates and runs the remote object

ServerRemote Object Impl

Records remote objects names...

rmiregistry

Page 7: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

7

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Creates and runs the remote objectServer

Remote Object Impl

Records remote objects names...

rmiregistryAslan - TCP port 1234

registers new object into remiregistry

TCP port 1234

Page 8: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

8

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

Client

Page 9: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

9

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

Client

Lookup "Aslan" at protocol.unileon.es's rmiregistry

Page 10: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

10

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

Client

Remote object's STUB

Page 11: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

11

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

Client

Remote object's STUB

Page 12: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

12

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

ClientRemote object's STUB

Page 13: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

13

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

Interface class file must be

copied to the web server

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

ClientRemote object's STUB

Remote object's interface

Page 14: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

14

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

ClientRemote object's STUB

Remote object's interface

Access interface's class filefor finishing the the Stub

Page 15: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

15

Apache2 web serverpaloalto.unileon.es

· Server program· rmiregistry· Remote Objectprotocol.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

rmiregistryAslan - TCP port 1234

TCP port 1234

ClientRemote object's STUB

Remote object's interface

Client invokes STUB methods

Page 16: The structure of Java RMI - Universidad de Leónpaloalto.unileon.es/ds/Lab/RMI/DS-StructureOfJavaRMI.pdf · Java RMI needsthreehosts: TheClient, TheServer and theWeb server V 0.1

+ Java RMI needs three hosts: The Client, The Server and the Web server

V 0.1 © 2014 José María Foces Morán. All rights reserved

16

Apache2 web serverpaloalto.unileon.es

Client hostclient.unileon.es

ServerRemote Object Impl

TCP port 1234

ClientRemote object's STUB

Remote object's interface

STUB speaks RMI protocol with remote object

parameters

return value