Extreme Java G22.3033-007
Total Page:16
File Type:pdf, Size:1020Kb
Extreme Java G22.3033-007 Session 8 - Sub-Topic 2 OMA Trading Services Dr. Jean-Claude Franchitti New York University Computer Science Department Courant Institute of Mathematical Sciences Trading Services for Distributed Enterprise Communications Dr. Jean-Claude Franchitti Page 1 Presentation Agenda • Enterprise Systems Technology Classifications • Naming, Directory, and Trading Services in a Nutshell • CORBA as a Trading Service • Microsoft Active Directory Services • Jini as a Trading Service – Jini Component Architecture – Jini Programming Model – Jini Infrastructure – Jini Class Architecture and Development Process – Jini Service Example – From the Logical Infrastructure to a Physical Solution – Physical Solution Implementation Steps • Conclusions 2 Enterprise Systems Technology Classifications Q User Interfacing Q AWT, Swing, JMF, JavaBeans Q Distributed Communications Enabling Q TCP/IP, HTTP, CORBA, RMI/IIOP, COM+ Q Services for Distributed Communications Q JNDI, CORBA Trading, JINI, Activation, JMS, JavaMail, JTA, JTS, etc. Q Systems Assurance Q Security, Reliability, Availability, Maintainability, Safety Q Data Enabling Q JDBC, RDBMs, ODBMSs Q Web Enabling Q HTML, XML, Applets, Servlets, JSPs Q Applications Enabling Q EJB, EAI 3 Page 2 Services for Distributed Communications Q Naming Q DNS, JNDI Q Directory Q NIS, NDS, LDAP, Microsoft Active Directory Q Trading Q CORBA Trading Service, JINI Q Activation Q CORBA LifeCycle Service, Java Activation Framework Q Messaging Q JMS, JavaMail, CORBA Event Service, CORBA Messaging Service, CORBA Notification Service Q Transaction Q CORBA OTS, JTS, JTA 4 Naming Service Q Provides the ability to bind names to objects, and lookup objects by names (~ telephone white pages) e.g., COSNaming, DNS, LDAP, NIS, JNDI 5 Page 3 Directory Service Q Provides a way to manage the storage and distribution of shared information (~ telephone yellow pages) e.g., NIS, NDS, LDAP, Microsoft Active Directory 6 Trading Service Q Provide a framework for objects to identify themselves in a distributed system Q Provides facilities for looking up and discovering other services Q Provides services to remote objects Q e.g., CORBA Trading, Jini, Microsoft Active Directory 7 Page 4 CORBA as a Trading Service Q Provides a sophisticated directory service in which the directory objects contain: § Attributes and service type information on distributed objects § Distributed objects Handles Q APIs: Admin, Link, Lookup, Proxy Register Microsoft Active Directory Service (ADS) Q Maintains user, security, and network resource information used on a Windows 2000 network Q DCOM components can store their activation and connection information in the ADS Q COM objects can be exposed as APIs to ADS 8 Introducing Jini as a Trading Service Q What is Jini Technology? Q Who Developed Jini? Q What are the Claimed Benefits? Q What are the Limitations? Q What is the Jini system architecture? 9 Page 5 Jini Technology Architecture Q Jini provides “underware” (not middleware) Q Jini helps services, clients, and users find other services (via lookup, registration, and leasing services) 10 What is Jini Technology? Q Jini provides an infrastructure to federate services in a distributed system Q Enable spontaneous networking Q Simplify delivery of network services Q Simplify access to network services Q Jini provides a programming model for reliable, secure distributed services Q Jini provides several basic services 11 Page 6 Who Developed Jini? Q Jim Waldo (CORBA, RMI, JavaSpaces) Q Bill Joy (BSD Unix, SunOS) Q Ken Arnold (JavaSpaces) Q Ann Wollrath (Java RMI) Q Bob Sheifler (X Window System) 12 What are the Claimed Benefits? Q Makes using a network more like using a phone Q Allows software and hardware components to more easily provide network services Q Makes adding and managing network services easier 13 Page 7 What are the Limitations? Q Intended for workgroups of 2-100 nodes/services Q Implies some agreement regarding trust, identity and policy within a single Jini federation Q Requires Java, 48KB of memory Q Licensing (SCSL new licensing model) Q … 14 Key Concepts Q Services Q Discovery and Lookup Q Extended RMI Q Distributed Security Q Leasing Q Transactions Q Distributed Events 15 Page 8 Services Q Services may be added or withdrawn from a Jini federation at any time Q Jini provides mechanisms for service registration, lookup, and use Q Services communicate by using a service protocol (i.e., a set of Java interfaces) Q Set of services is open-ended 16 Discovery and Lookup Q Lookup service provides mapping: Q Interfaces to objects Q Hierarchical lookup: Q Lookup service may include entry for other lookup services Q Discovery is registering a new service with a lookup service (Jini federation discovers service) 17 Page 9 Extended RMI Q Communication among services uses Java RMI Q Extended with leases Q RMI provides Q Activation Q Distributed garbage collection Q Multicast Q Replication 18 Distributed Security Q Principal: entity on behalf of which a service is accessed Q Access control list: associates access privileges with each object implementing a service 19 Page 10 Leasing Q A lease is a grant of access over a time period Q Negotiated as part of service protocol (~ CORBA licensing service role) Q If lease expires without renewal, user and provider can free associated resource Q Leases handle client and network failures, removal of services, … Q Exclusive lease says service cannot be shared 20 Transactions Q A series of operations may be wrapped in a transaction Q Insure changes made atomically: all or none Q Jini transaction interfaces supply service protocol for a two-phase commit 21 Page 11 Distributed Events Q Jini supports distributed events (~ CORBA events) Q Objects register interest in other object’s events Q Notifications delivered to interested objects 22 Java + Jini Q Base Java Q Infrastructure: Q Java VM, RMI, Java Security Model Q Programming Model: Q Java APIs, Java Beans, etc. Q Services: Q JNDI, EJBs, JTS, etc. Q Java + Jini Q Infrastructure: Q Extended RMI, Discovery, Distributed Security, Lookup Q Programming Model: Q Leasing, Transactions, Distributed Events Q Services: Q JavaSpaces, Two-Phase Commit Manager 23 Page 12 Discovery Protocol Q Service Joins a Jini Lookup Service Q Provider uses multicast to locate Lookup service Q Registers Interfaces Q Loads Proxy object into Lookup Service 24 Lookup Protocol Q Client looks up service when needed Q Looks up by Java type, attributes Q Copy of proxy moved to client Q Uses proxy to invoke services 25 Page 13 Client / Service Interaction Q Client uses service through proxy Q Proxy might be complete service object or RMI stub Q Or mixture of local/remote methods Q Service protocol may be private to sender 26 Jini Component Architecture Q Logical Component Architecture Q Storage, JavaSpaces, Printing, TM Q Jini Discovery, Join, and Lookup Q Java 2 platform (RMI, security, networking) Q Physical Component Architecture Q JSTK JavaSpaces Starter Kit Q Jini Starter Kit Q Jini Software Kit (JSK) - com.sun.jini.* Q Jini Extended Platform (JXP) - net.jini.* Q Jini Core Platform (JCP) - net.jini.core.* Q J2SE 27 Page 14 Jini Programming Model Q Distributed Events API Q Interface extending the JavaBeans event model Q Distributed Leasing Q Interfaces to obtain leases for use of distributed resources Q Distributed Transactions 28 Jini Infrastructure Q Service Discovery Q Jini Community Joining Q Services provide service items (meta-data attribute information, and proxy object) Q Jini Lookup Services Q Clients fill out a service template Q Clients receive a set of service matches Q Clients can extract the service proxy item to start using the service 29 Page 15 Jini Tools and Configuration Q JSK: Jini System Software Starter Kit Q JCP (jini-core.jar), JXP (jini-ext.jar), JSK (subset included in sun-util.jar) Q JSK provides a lookup service with the codename “reggie” Q JSK also provides a transaction management service with the codename “mahalo” Q Sun provides a Jini service called JavaSpaces used to store and retrieve Java objects in a distributed network (codename is “outrigger”) 30 Jini Class Architecture and Development Process Q Server side Q Jini service implementation Q Jini service proxy Q Connectivity needed to a back-end device or process Q Client side Q Discover a lookup service Q Create a Jini service template Q Look up a Jini service Q Handle Jini Service Lookup Matches Q Use the Jini Service 31 Page 16 Jini Service Examples Q Jini[TM] Technology Starter Kit (starter kit) and the Jini Technology Core Platform Compatibility Kit (TCK) are available to download under the Sun Community Source License v 3.0/Jini Technology Specific Attachment v 1.0 (SCSL3/Jini TSA v 1.0) program Q Sample applications are provided with the Starter Kit 32 Conclusions Q CORBA Trading Service provides support for associating distributed CORBA object references in a directory service Q CORBA Trading Service is a somewhat complicated framework to use Q ADS provides a directory service implementation and standard interfaces for COM/DCOM applications Q ADS is platform dependent Q Jini adds support for dynamic discovery of lookup services by servers and clients Q Jini’s API is simple Q Configuring Jini’s runtime infrastructure can be somewhat tedious. 33 Page 17 Links to more information Jini home Jini FAQs Jini white papers Jini specs Jini licensing 34 Page 18.