Presentation is loading. Please wait.

Presentation is loading. Please wait.

May 2, 2006Shawn Mulkey - EECS 816 1 Distributed Computing & Object Oriented Middleware: Part 1 Presented By Shawn Mulkey.

Similar presentations


Presentation on theme: "May 2, 2006Shawn Mulkey - EECS 816 1 Distributed Computing & Object Oriented Middleware: Part 1 Presented By Shawn Mulkey."— Presentation transcript:

1 May 2, 2006Shawn Mulkey - EECS 816 1 Distributed Computing & Object Oriented Middleware: Part 1 Presented By Shawn Mulkey

2 Shawn Mulkey - EECS 8162 May 2, 2006 Agenda Introduction Supporting Technologies Remote Procedure Calls CORBA J2EE & RMI Conclusion

3 Shawn Mulkey - EECS 8163 May 2, 2006 Demonstration Interlude 1

4 Shawn Mulkey - EECS 8164 May 2, 2006 Introduction  Definitions  Usage  CORBA, J2EE/RMI,.Net Supporting Technologies Remote Procedure Calls CORBA J2EE & RMI Conclusion Agenda

5 Shawn Mulkey - EECS 8165 May 2, 2006 Definitions Distributed Computing : A set of programs executing on one or more computers which coordinate actions by exchanging messages. Concurrent Execution Independent Failure

6 Shawn Mulkey - EECS 8166 May 2, 2006 Definitions Middleware : Software components which promote extensibility and maintainability by employing abstraction between standardized interfaces. Behavior Semantics Data Representation

7 Shawn Mulkey - EECS 8167 May 2, 2006 Middleware Diagrams Local System Middleware Application Middleware Operating System Hardware Resources System Resources Distributed System Middleware Server Process Middleware Network Comm Client Application Middleware Network Comm

8 Shawn Mulkey - EECS 8168 May 2, 2006 Remote Procedure Call: A protocol used by a program to request a service from another program without having to understand network or inter-process details. Client/Server based Local procedure call semantics Definitions

9 Shawn Mulkey - EECS 8169 May 2, 2006 Distributed Computing Usage Distributed file systems Mobile systems Remote database access Web based applications Real-Time content distribution

10 Shawn Mulkey - EECS 81610 May 2, 2006 Distributed Computing Middleware Object oriented middleware  Extends RPC paradigm  Uses OO design principles Event based middleware  Publish-Subscribe systems Message oriented middleware  General queuing model

11 Shawn Mulkey - EECS 81611 May 2, 2006 Distributed OO Middleware Platforms Common Object Request Broker Architecture (CORBA)  Canonical standard  Extremely robust architecture  Variable vendor implementation Java RMI/J2EE  RMI is object based RPC  J2EE is a distributed object computing framework

12 Shawn Mulkey - EECS 81612 May 2, 2006 Distributed OO Middleware Platforms Microsoft DCOM/.Net  Proprietary distributed object technology  Strong tool support .Net intends complete integration Web Services  Based on open interoperable standards  Strong industry and academic support  Extensibility based on standardized semantics

13 Shawn Mulkey - EECS 81613 May 2, 2006 Introduction Supporting Technologies  Application Stack  Transport Protocols Remote Procedure Calls CORBA J2EE & RMI Conclusion Agenda

14 Shawn Mulkey - EECS 81614 May 2, 2006 Application Protocol Stack Creates layered architecture Between layers  Standardized interfaces  Standardized protocol  Message encapsulation Minimizes dependencies

15 Shawn Mulkey - EECS 81615 May 2, 2006 Application Protocol Stack Network Session Transport Application Physical Data Link SenderRouter 1Router 2 Recipient Message Enter Message Exit

16 Shawn Mulkey - EECS 81616 May 2, 2006 Network Transport Protocols Socket based Communication protocols  Packet sequencing  Error recovery TCP or UDP most common  Connection oriented vs. connectionless Addressing and routing  Typically IP based

17 Shawn Mulkey - EECS 81617 May 2, 2006 Introduction Supporting Technologies Remote Procedure Calls  RPC Introduction  Architecture  Protocol  Error Handling  Marshalling  Asynchronous RPC CORBA J2EE & RMI Conclusion Agenda

18 Shawn Mulkey - EECS 81618 May 2, 2006 RPC Introduction Application partitioned into ‘service’ and ‘client’ processes  Either may be anonymous  Service may be implemented as federation of processes Difference between RPC and general client/server model  ? RPC Follows semantics of local procedure call (LPC)

19 Shawn Mulkey - EECS 81619 May 2, 2006 RPC Introduction Requires naming and binding  Service lookup  E.g. DNS, NIS, NFS RPC service may or may not persist information  Data replication  Caching

20 Shawn Mulkey - EECS 81620 May 2, 2006 RPC Architecture Service provider advertises interface or implements standardized interface  Interface often defined in standardized language (IDL)  Service may (or may not) also employ LPC semantics Development framework provides connection and processing logic for services  Framework may also provide naming directory for service binding

21 Shawn Mulkey - EECS 81621 May 2, 2006 RPC Architecture Client executes ‘stub’ code to invoke remote service  Stub hides connection and processing details  Similar to macro expansion Stub generator may be explicit or implicit  Service provider may also execute against stub programs

22 Shawn Mulkey - EECS 81622 May 2, 2006 RPC Architecture Model Client Program Stub Procedure Service Program Stub Procedure Dispatcher Comm Manager Client Process Service Process Request Response Comm Manager

23 Shawn Mulkey - EECS 81623 May 2, 2006 RPC Protocol Request – Acknowledge / Response – Acknowledge  Request must be processed exactly once ClientServer Request Ack Reply Ack ClientServer Request Burst Ack Reply Ack

24 Shawn Mulkey - EECS 81624 May 2, 2006 Demonstration Interlude 2

25 Shawn Mulkey - EECS 81625 May 2, 2006 RPC Error Handling Unique error types  Binding error  Server unavailable Unknown failure origin  Transparent backup server use Unknown server state on failure  Transactional semantics may be required

26 Shawn Mulkey - EECS 81626 May 2, 2006 Data Marshalling Canonical data representation  eXternal Data Representation (XDR)  eXtensible Markup Language (XML) Efficiency of processing vs. interoperability Pointers complicate argument passing Design tip: Use external types in application

27 Shawn Mulkey - EECS 81627 May 2, 2006 Asynchronous RPC Features Synchronous semantics difficult to maintain  Lack of global clock Explicit asynchronous features useful  Request only call  Callbacks  Event notification

28 Shawn Mulkey - EECS 81628 May 2, 2006 Introduction Supporting Technologies Remote Procedure Calls CORBA  History & Introduction  Components & Architecture  Interface Definition Language  Services J2EE & RMI Conclusion Agenda

29 Shawn Mulkey - EECS 81629 May 2, 2006 CORBA Introduction Acronym: Development system addressing common RPC issues in an OO framework Overtaken by newer technologies, but still standard reference model ? Common Object Request Broker Architecture

30 Shawn Mulkey - EECS 81630 May 2, 2006 CORBA History Advanced Network Systems Architecture (ANSA) early attempt at distributed system generalization  Encouraged distributed objects design approach  Applied as set of guidelines to design Object Management Group (OMG) formed by vendors to promote interoperability between object systems  System developed became CORBA  Concrete tools over abstract ANSA specifications

31 Shawn Mulkey - EECS 81631 May 2, 2006 CORBA Features Provides common distributed object architecture Defines common syntax for data and interface definition Primarily method of inter-system interoperability  Strong legacy system support Implementations and support in common languages  C++  Java  Many others

32 Shawn Mulkey - EECS 81632 May 2, 2006 CORBA Components Entities  Object references  Abstract interface  Basic types  Constructed Types Requests  Operations on objects called by client on server  May be one way

33 Shawn Mulkey - EECS 81633 May 2, 2006 CORBA Components Object Request Broker (ORB)  Matches client request with servicing object Client stub  Generated calling code implementing connection and marshaling logic Server skeleton  Generated code extended by server object

34 Shawn Mulkey - EECS 81634 May 2, 2006 Basic CORBA Architecture Object Request Broker Calling Stub Client Program Interface Skeleton Server Object Have a nice day!

35 Shawn Mulkey - EECS 81635 May 2, 2006 Interface Definition Language Interface defined for client calls and server implementation CORBA IDL not compiled  Mapped to individual language constructs  Not every language directly supports every IDL feature Concrete implementations (stubs & skeletons) generated automatically

36 Shawn Mulkey - EECS 81636 May 2, 2006 Simple Interface Example Note:  C like syntax  Typed identifiers  Procedural declarations interface salestax { float calculate_tax ( in float taxable_amount ); }

37 Shawn Mulkey - EECS 81637 May 2, 2006 IDL Syntax Typed references and values  Interfaces  Constructed (structs, arrays, etc.)  Value Types  Built-in (int, float, etc.) Scoped access  ‘Module’ identifier  Namespace semantics

38 Shawn Mulkey - EECS 81638 May 2, 2006 IDL Syntax Parameter accessibility  in  out  inout Exceptions declared with ‘raises’ keyword Not all semantics available through IDL  Examples: security, lifecycle  Often implemented with standardized object behavior

39 Shawn Mulkey - EECS 81639 May 2, 2006 Declaration Example module CORBA { interface Object { InterfaceDef get_interface (); boolean is_nil(); Object duplicate (); void release (); boolean is_a (in string logical_type_id); boolean is_equivalent ( in Object other_object ); unsigned long hash( in unsigned long maximum); void create_request ( in Context ctx, in Identifier operation, in NVList arg_list, inout NamedValue result, out Request request, in Flags req_flag ); ………… };

40 Shawn Mulkey - EECS 81640 May 2, 2006 Standard CORBA Services ORB  Encapsulates all server behavior Load balancing Server initialization and termination  Performance customization  Extended features possible Naming  Hierarchical object reference map  Used by ORBs to locate objects or other ORBs  Names are symbol links to objects

41 Shawn Mulkey - EECS 81641 May 2, 2006 Optional CORBA Services Event Notification Service (ENS)  Publish/subscribe pattern Register with topic – receive handle Asynchronous event delivery  Long lived subscription requests Life-Cycle Service  Factory for object creation  Manages object copy, move & destruction  Manages backups, repository organization etc.

42 Shawn Mulkey - EECS 81642 May 2, 2006 Transaction Service  Concurrency control  Synchronizes object actions  Commit and abort semantics Security Service  Authentication  Access control  Non-repudiation Optional CORBA Services

43 Shawn Mulkey - EECS 81643 May 2, 2006 CORBA Implementations TAO / ACE  Free and product versions  Dr. Douglas Schmidt Orbix  Steven Vinoski VisiBroker  Borland  Feature rich  Wide range of OS and language interopration

44 Shawn Mulkey - EECS 81644 May 2, 2006 Introduction Supporting Technologies Remote Procedure Calls CORBA J2EE & RMI  Introduction  Java RMI  J2EE Conclusion Agenda

45 Shawn Mulkey - EECS 81645 May 2, 2006 RMI Introduction Remote Method Invocation An explicit remote procedure call system which leverages the Java development framework to facilitate all aspects of RPC such as binding, transport and marshalling.

46 Shawn Mulkey - EECS 81646 May 2, 2006 RMI Implementation Similar to CORBA semantics  Requires name lookup service  Requests serviced by remote components  Parameter data types must be marshaled  Exception system defined in specification Each component implemented with Java technology

47 Shawn Mulkey - EECS 81647 May 2, 2006 RMI Implementation tools rmiregistry – Server naming service rmic – stub compiler java.io.Serialization – Marshalling system java.rmi.Remote – Base remoting interface java.rmi.RemoteException – Base Remoting exception

48 Shawn Mulkey - EECS 81648 May 2, 2006 RMI Interfaces Server and client components implement java.io.Remote interface  May be extended with other interfaces  Standard java interface and member declaration syntax as IDL Example public interface BankAccount extends java.rmi.Remote { public void deposit(float amount) throws java.rmi.RemoteException; public void withdraw(float amount) throws OverdrawnException, java.rmi.RemoteException; public float getBalance() throws java.rmi.RemoteException; }

49 Shawn Mulkey - EECS 81649 May 2, 2006 RMI Protocol 1) Server process begins 2) Server process registers one or more objects with the naming service 3) Client makes remote call against stub code 4) Stub code initiates TCP or HTTP stream connection with server process

50 Shawn Mulkey - EECS 81650 May 2, 2006 RMI Protocol 5) Server accepts connection and processes RPC 6) Server sends returns value or exception 7) Client stub marshals returned data to the calling procedure

51 Shawn Mulkey - EECS 81651 May 2, 2006 RMI Code Sample public interface ReceiveMessageInterface extends java.rmi.Remote { String transformMessage(String x) throws RemoteException; } RMI Interface

52 Shawn Mulkey - EECS 81652 May 2, 2006 public class RmiServer extends java.rmi.server.UnicastRemoteObject implements ReceiveMessageInterface { public void RmiServer() { try{ // create the registry and bind the name and object. java.rmi.Registry registry = LocateRegistry.createRegistry( 9999 ); registry.rebind("rmiServer", this); } catch(RemoteException e) {... } public String receiveMessage(String x) throws RemoteException { return x.toUpper(); }

53 Shawn Mulkey - EECS 81653 May 2, 2006 public class RmiClient { static public void main(String args[]) { try{ // get the “registry” java.rmi.Registry registry = LocateRegistry.getRegistry(“somehost”, 9999); // look up the remote object ReceiveMessageInterface rmiServer = (ReceiveMessageInterface)(registry.lookup("rmiServer")); // call the remote method String result = rmiServer.transformMessage(text); System.out.println(result); } catch(RemoteException e){ … } catch(NotBoundException e){ … }

54 Shawn Mulkey - EECS 81654 May 2, 2006 RMI Summary Simple and efficient RPC system Remote call semantics completely transparent to client and server Implemented entirely with Java technology Limited service support  Security, life-cycle etc.

55 Shawn Mulkey - EECS 81655 May 2, 2006 J2EE Introduction Java 2 Platform Enterprise Edition “A set of coordinated specifications and practices that together enable solutions for developing, deploying, and managing multi- tier server-centric applications.” -Sun Microsystems, J2EE FAQ 2006

56 Shawn Mulkey - EECS 81656 May 2, 2006 J2EE Muti-Tier Design Client Tier  Application process  HTML Pages Web Tier  JSP  Servlets Business Tier  Domain Logic  Enterprise Java Beans Enterprise Information System (EIS) Tier  Database server

57 Shawn Mulkey - EECS 81657 May 2, 2006 J2EE Containers Framework handling low-level details  Connection management  Transaction and state management Promotes reusable application components  Usually called ‘beans’ Container presents API and runtime protocol for application beans

58 Shawn Mulkey - EECS 81658 May 2, 2006 J2EE Container Types J2EE Server  Running process  Container for other servers Enterprise JavaBeans (EJB) Container  Manages EJB components Web Container  HTTP server context  Servlet & JSP Management Application/Applet Container  Manages client environment  Facilitates connections to the server components

59 Shawn Mulkey - EECS 81659 May 2, 2006 J2EE Container Hierarchy © Sun Microsystems, 2006

60 Shawn Mulkey - EECS 81660 May 2, 2006 J2EE Services Java Naming and Directory Interface (JNDI) Enterprise ServiceBeans API Java Servlet API JavaServer Pages (JSP) API Java Messaging Service (JMS)

61 Shawn Mulkey - EECS 81661 May 2, 2006 J2EE Services Java Transaction API JDBC API Java API for XML Processing & RPC Java Authentication and Authorization Service

62 Shawn Mulkey - EECS 81662 May 2, 2006 Introduction Supporting Technologies Remote Procedure Calls CORBA J2EE & RMI Conclusion  Topic Summary  Questions  Looking Ahead Agenda

63 Shawn Mulkey - EECS 81663 May 2, 2006 Topic Summary Distributed applications consist of multiple processes communicating via message passing Remote Procedure Calls permit clients to request services from remote servers  Uses same semantics as local procedures Most RPC mechanisms have similar characteristics  Name binding  Data marshalling  Exception handling

64 Shawn Mulkey - EECS 81664 May 2, 2006 Topic Summary CORBA was first widely excepted OO RPC framework  Established common architecture used by future distributed frameworks  Created Interface Definition Language (IDL) to express service behavior and data descriptions  Stubs and skeletons generators on various platforms to accommodate interoperability

65 Shawn Mulkey - EECS 81665 May 2, 2006 Topic Summary Sun’s Java RMI (Remote Method Invocation) is Java specific PRC method  Uses Java constructs for RPC management (e.g. naming, marshaling, etc.)  Simple and elegant architecture  Generates Java stubs and skeletons  Limited built-in services

66 Shawn Mulkey - EECS 81666 May 2, 2006 Topic Summary Java 2 Enterprise Edition (J2EE)  Framework for distributed application development  Provides containers to handle low-level details  Applications consist of relatively simple ‘beans’ which perform application specific logic  Host of services available to facilitate distributed behavior

67 Shawn Mulkey - EECS 81667 May 2, 2006 Questions Who, What, Where, Why, How? ? ? ? ? ?

68 Shawn Mulkey - EECS 81668 May 2, 2006 Looking Ahead Microsoft.Net Technologies SOAP Web Services Grid Computing

69 Shawn Mulkey - EECS 81669 May 2, 2006 Thanks ! Distributed Computing & Object Oriented Middleware: Part 1 Shawn Mulkey


Download ppt "May 2, 2006Shawn Mulkey - EECS 816 1 Distributed Computing & Object Oriented Middleware: Part 1 Presented By Shawn Mulkey."

Similar presentations


Ads by Google