1 / 18

Jini Tutorial

Jini Tutorial. The road to reliable, autonomous distributed systems. Tutorial outline. Three parts, each (hopefully) one hour Part 1 Introduction Distributed systems Java basics Remote Method Invocation (RMI) Part 2 Overview of Jini Goals Architecture Basic concepts, protocols Part 3

truly
Download Presentation

Jini Tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jini Tutorial The road to reliable, autonomous distributed systems

  2. Tutorial outline • Three parts, each (hopefully) one hour • Part 1 Introduction • Distributed systems • Java basics • Remote Method Invocation (RMI) • Part 2 Overview of Jini • Goals • Architecture • Basic concepts, protocols • Part 3 • Jini Programming • Part 4 Advanced topics • Mobile Jini access • Adaptive user interfaces • Security

  3. Characteristics of distributed systems • Different from closed-box systems • The followings are not true • Zero network latency • Networks are reliable • Remote systems fault-free • Infinite bandwidth • One administration • Homogeneous systems • Other problems • Systems can be very large – many components and services • Software 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 libraries • networking, multimedia, from graphics to math functions. • Higher programmer productivity • Best 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 code • Easy 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).

  7. Java program Java API Java Virtual Machine (JVM) Hardware platform The Java Platform • Consists of: • The Java Virtual Machine (Java VM) • The Java Application Programming Interface (Java API) Java platform

  8. The Java Architecture • The Java programming language • interpreted • portable and architecture independent

  9. The role of mobile code • Mobile code enables: • Service provisioning, simple code/service deployment • Device and user specific dynamic user interfaces • Application/service composition on the fly • Summary • Java 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 • Distributed systems • Java basics • Remote Method Invocation (RMI) • Part 2 Overview of Jini • Goals • Architecture • Basic concepts, protocols • Part 3 • Jini Programming • Part 4 Advanced topics • Mobile Jini access • Adaptive user interfaces • Security

  12. Remote Method Invocation (RMI) • Java variant of Remote Method Invocation • Designed 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 spaces • Provides 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’d • Objects can be passed as arguments and returned as results remoteObject.someMethod( objectArgument ); • Any Java object can be passed during invocation including primitive types, core classes, user-defined classes and JavaBeans • Syntax of remote method invocation is same as the local invocations • RMI operates only in Java-Java domain, developers work within a single object model instead of working with multiple models • RMI-IIOP to other systems

  14. Client code Basic components HTTP HTTP Client machine Server machine Rmi registry Lookup / download stub skeleton remote 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 Serialization • Provides 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 Steps • Design 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.2 • Put classes in Web accessible directory (HTTP). • Start registry, start application.

  18. Main problem • Static system configuration • Client needs service name/IP address • Makes server/service replication impossible • Difficult to handle errors (network or server) • Solution is Jini

More Related