DistributedObjects

DistributedObjects - CS 580 Client-Server Programming...

Info iconThis preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 580 Client-Server Programming Spring Semester, 2010 April 27, 2009 Copyright ©, All rights reserved. 2010 SDSU & Roger Whitney, 5500 Campanile Drive, San Diego, CA 92182-7700 USA. OpenContent ( http:// www.opencontent.org/opl.shtml ) license defines the copyright on this document.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
References 2 Pattern-Oriented Software: A System of Patterns, Buschman, Meunier, Rohnert, Sommerlad, Stal, 1996, pp. 323-338 (Client-Dispacther-Server), pp. 263-275 (Proxy) Design Patterns: Elements of Reusable Object-Oriented Software, Gamma, Helm, Johnson, Vlissides, 1995, pp. 207-218 (Proxy) CS 696 Emerging Technologies: Java Distributed Computing, Doc 5 Distributed Object Basics, 1999, http://www.eli.sdsu.edu/courses/spring99/cs696/notes/distObj/ distObj.html, Doc 6 RMI Intro, Doc 7 Java Security Model Permissions in the Java SE Development Kit, http://java.sun.com/javase/6/docs/ technotes/guides/security/permissions.html Default Policy Implementation and Policy File Syntax, http://java.sun.com/javase/6/ docs/technotes/guides/security/PolicyFiles.html Distrbuted Objects, http://en.wikipedia.org/wiki/Distributed_object Java Network Programming 3'rd Ed, Harold, O'Reilly, 2005, Chapter18 Remote Method Invocation
Background image of page 2
Distributed Objects 3 System that allows sending of messags to objects on remote machines public class Foo { public String hello() { return "Hi there"; } } Foo remote = getRemoteObject(); String message = remote.hello();
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Some Existing Systems 4 Java RMI CORBA DCOM Pyro (Python) dRuby ReplicaNet (C++)
Background image of page 4
Local verses Distributed Objects 5 Life Cycle References Request Latency Parallelism Communication Failure Security
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example (Pseudo Code) 6 public class Foo { public Vector sample( Vector input ) { input.add( "Hello" ); return input; } } Foo remote = getRemoteObject(); Vector local = new Vector(); Vector b = remote.sample(local); String message = b.get(0); foo Server aVector Client sample() with vector return vector Server Client
Background image of page 6
Remote Proxy 7 The actual object is on a remote machine (remote address space) Hide real details of accessing the object Used in CORBA, Java RMI Client Foo sample() Client Proxy Server Machine sample() Foo Proxy Network Client Machine
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Issues 8 How does the client find the server? Network connections must be made but to where and by who? How does the client object interact with the server object? How can we send a method request across the network?
Background image of page 8
Remote Method Parameters 9 Don’t move the parameters, just send them messages remotely foo Server sample() with remote vector reference aVector Client return remote vector reference add element to remote vector public class Foo { public Vector sample( Vector input ) { input.add( "Hello" ); return input; } } Foo remote = getRemoteObject(); Vector local = new Vector(); local.magicToKeepItLocal(); Vector b = remote.sample(local); String message = b.get(0);
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Passing Remote References 10 Foo remote = getRemoteObject(); Bar otherRemote = getOtherRemote(): remote.test(otherRemote);
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 49

DistributedObjects - CS 580 Client-Server Programming...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online