290 likes | 393 Views
Jini Architectural Overview. Outline. Introduction System Goals Environmental Assumptions System Overview Key Concepts Component Overview Service Architecture An Example Registering the Print Service Printing. Introduction: System Goals.
E N D
JiniArchitectural Overview Peter Cappello
Outline • Introduction • System Goals • Environmental Assumptions • System Overview • Key Concepts • Component Overview • Service Architecture • An Example • Registering the Print Service • Printing
Introduction: System Goals Create an easily administeredservice network for humans & computational clients. • Enable users to: • share services over a network. • access services from anywhere on the network. • Simplify building, maintaining, & altering a network of services.
Introduction: Built on Java • Key Java characteristics: • Mobile code & data • Secure environment for downloaded code. • Strong typing
Introduction: Environmental Assumptions • Services (software/devices) have a: • network connectionwith: • reasonable latency • appropriate bandwidth (to service) • JRE that includes RMI.
System OverviewKey Concepts: Services • Jini’s core abstraction: the service. • A service is defined by a Java interface. • Service clients are people, computations, & other services. • Jini is targeted to a workgroup. Basic service discovery is via multicast on a LAN
System OverviewKey Concepts: Lookup Service • Discover services via the lookup service (LUS). • Lookup service: “maps” Java interfaces to objects that implement that interface. • Adding a service: • Discovery protocol: find an LUS. • Join protocol: insert the service.
System OverviewKey Concepts: RMI, Security • RMI • Clients communicate with the LUS via RMI • Downloadsservice proxy to the client. • Security • Principal: the user associated with an object If I start a Java application, I am the user. • Access control lists (ACL): Access to a service depends on the ACL of the associated user.
System OverviewKey Concepts: Lease • Access to a service is granted for a lease period (renewable) • Short protocol: • Request a lease for a period; • Get a lease for a period requested period. • When lease expires, object is garbage. Service entry in LUS is leased.
System OverviewKey Concepts: Transaction, Event • Transaction • A series of operations can be wrapped in a transaction. • Operations can span multiple services. • Transaction interface is a 2-phase commit (slow). • Distributed events • Object A registers interest in an event E associated with object B on another JVM; • Object B notifies object A when E occurs. Service A requests notification from an LUS whenever a service of type B joins the LUS.
System OverviewComponent Overview: Infrastructure • An RMI-integrated security system To download code, clients must install RMISecurityManager. • The Lookup Service A repository of service references. • Discovery/Join protocol The means by which: • clients discover LUS • services register their availability.
System OverviewComponent Overview: Programming Model • Leasing interface • Allocate/free resources using a renewable, duration-based model • Generalize allocation from binary (yes/no) to a duration. • Used to make system “self-healing”. • Event/notification interface • Remote event-driven communication to coordinate state changes among remote objects. • Transaction interface • Enables a set of operations to occur atomically.
System OverviewComponent Overview: Services • The Jini infrastructure & programming model enable the creation of a service network. • Each service is defined by its Java interface. • Examples include: • A print service accessed by other Jini services. • A space-based service coordination mechanism (JavaSpace). • A market-based resource allocation mechanism: coordinates buyers & sellers in auctions.
System OverviewService Architecture • Discovery client/service looks for an LUS. • Join service registers with an LUS. • Lookup client locates a service, by its Java interface (other attributes too).
System OverviewService Architecture: Invoke Service Client/Service protocol need not be RMI
An Example ZORAN CAMERA 1. Discover LUS PRINTER LUS
An Example ZORAN CAMERA 1. Discover LUS PRINTER LUS 2. Register with LUS
An Example ZORAN CAMERA 3. Sysadmin notified 1. Discover LUS PRINTER LUS 2. Register with LUS
An Example 4. Request notification when no paper ZORAN CAMERA 3. Sysadmin notified 1. Discover LUS PRINTER LUS 2. Register with LUS
An Example 4. Request notification when no paper ZORAN CAMERA 3. Sysadmin notified 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed
An Example 4. Request notification when no paper ZORAN CAMERA 6. Discover LUS 3. Sysadmin notified 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed
An Example 4. Request notification when no paper ZORAN CAMERA 6. Discover LUS 3. Sysadmin notified 7. Lookup print service 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed
An Example 4. Request notification when no paper ZORAN CAMERA 3. Sysadmin notified 6. Discover LUS 7. Lookup print service 8. Configure printer 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed
An Example 4. Request notification when no paper ZORAN CAMERA 3. Sysadmin notified 6. Discover LUS 7. Lookup print service 9. Print request 8. Configure printer 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed
An Example 4. Request notification when no paper ZORAN CAMERA 3. Sysadmin notified 10. Register interest when done 6. Discover LUS 7. Lookup print service 9. Print request 8. Configure printer 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed
An Example 4. Request notification when no paper ZORAN CAMERA 3. Sysadmin notified 10. Register interest when done 6. Discover LUS 7. Lookup print service 9. Print request 8. Configure printer 1. Discover LUS PRINTER LUS 2. Register with LUS 5. Renew LUS entry, as needed 11. notify done