Presentation on theme: "The road to reliable, autonomous distributed systems"— Presentation transcript:
1 The road to reliable, autonomous distributed systems Jini TutorialThe road to reliable, autonomous distributed systems
2 Tutorial outline Three parts, each (hopefully) one hour Part 1 IntroductionDistributed systemsJava basicsRemote Method Invocation (RMI)Part 2 Overview of JiniGoalsArchitectureBasic concepts, protocolsPart 3Jini ProgrammingPart 4 Advanced topicsMobile Jini accessAdaptive user interfacesSecurity
3 Characteristics of distributed systems Different from closed-box systemsThe followings are not trueZero network latencyNetworks are reliableRemote systems fault-freeInfinite bandwidthOne administrationHomogeneous systemsOther problemsSystems can be very large – many components and servicesSoftware deployment problems – packaging and distributing, upgrading
4 Why Java? The Java Language has many good design features secure, safe (with respect to bugs), object-oriented, familiar (to C C++ and even Fortran programmers).Good set of librariesnetworking, multimedia, from graphics to math functions.Higher programmer productivityBest available electronic and paper training resources.
5 Why Java?Java is rapidly getting the better (the best!) Integrated Development Environments (IDEs) for programs.Java is naturally integrated with network and universal machine supports potentially powerful “write once-run anywhere” model.Supports mobile codeEasy to teach, so there is a large and growing trained labour force.First language in most CS course
6 Java: Key Technical Ideas A Better Language:Simplicity and C/C++ compatibility promote fluency;GC and Threads allow software components;Platform independence saves time;Strong typing catches errors up front;Declared exceptions forces coverage in code.Scalable Applications;Threads for parallel speedup; patterns “in the large”.Dynamic linking allows simple apps to grow;Range of implementations from JavaCard through J2ME (mobile) to J2EE (enterprise).
8 The Java Architecture The Java programming language interpreted portable and architecture independent
9 The role of mobile code Mobile code enables: Summary Service provisioning, simple code/service deploymentDevice and user specific dynamic user interfacesApplication/service composition on the flySummaryJava is good but not enough!
10 Missing from the Java language Access to remote JVMs (RMI)Ad hoc networking and dynamic system configuration (Jini)
11 Tutorial outline Part 1 Introduction Part 2 Overview of Jini Part 3 Distributed systemsJava basicsRemote Method Invocation (RMI)Part 2 Overview of JiniGoalsArchitectureBasic concepts, protocolsPart 3Jini ProgrammingPart 4 Advanced topicsMobile Jini accessAdaptive user interfacesSecurity
12 Remote Method Invocation (RMI) Java variant of Remote Method InvocationDesigned for Client-Server applications over unstable and slow networks.Allows objects running on one JVM invoke methods on an object running on another JVM.The basic object model of Java does not permit invocations on objects located in remote address spacesProvides easy access to objects existing on remote virtual machines. RMI extends the basic Java object model beyond a single VM address space.RMI provides (and hides) communication between remote Java programs.Fast remote method invocations with low latency and high bandwidth are required for high performance computing.
13 Java RMI Model cont’dObjects can be passed as arguments and returned as resultsremoteObject.someMethod( objectArgument );Any Java object can be passed during invocation including primitive types, core classes, user-defined classes and JavaBeansSyntax of remote method invocation is same as the local invocationsRMI operates only in Java-Java domain, developers work within a single object model instead of working with multiple modelsRMI-IIOP to other systems
14 Basic components Client machine Server machine stub skeleton HTTPHTTPClient machineServer machineRmi registryClient codeLookup / downloadstubskeletonremote server
15 Required operations in distributed object applications Register/Locate remote objects:Obtain references to remote objects . An application can register its remote objects with RMI's simple naming facility, the rmiregistry, or the application can pass and return remote object references as part of its normal operation.Communicate with remote objects:Details of communication between remote objects are handled by RMI; to the programmer, remote communication looks like a standard Java method invocation.Load class bytecodes for objects that are passed around:Because RMI allows a caller to pass objects to remote objects, RMI provides the necessary mechanisms for loading an object's code, as well as for transmitting its data.
16 Object SerializationProvides a programmer the ability to read or write a whole object to and from a raw byte stream.An essential feature needed by RMI implementation when method arguments are passed by copy.
17 Development StepsDesign and implement components of distributed application.Define remote interface – specifies functionality as remote methods.Implement remote objects – implement the remote interface.Implement clients.Compile sources and generate stubs and skeletons.No skeletons from v1.2Put classes in Web accessible directory (HTTP).Start registry, start application.
18 Main problem Static system configuration Solution is Jini Client needs service name/IP addressMakes server/service replication impossibleDifficult to handle errors (network or server)Solution is Jini