Download
distributed object based systems n.
Skip this Video
Loading SlideShow in 5 Seconds..
Distributed Object-Based Systems PowerPoint Presentation
Download Presentation
Distributed Object-Based Systems

Distributed Object-Based Systems

690 Views Download Presentation
Download Presentation

Distributed Object-Based Systems

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Distributed Object-Based Systems Chapter 9

  2. Distributed Object­Based Systems • Topics discussed in this chapter: • CORBA is an industry-defined standard for distributed systems. • Distributed COM can be viewed as a middleware layer implemented on top of various Windows operating systems. • Globe is a research project being developed as part of a research project on large-scale wide-area distributed systems. • Comparison of CORBA, DCOM, and Globe

  3. Overview of CORBA • CORBA: Common Object Request Broker Architecture • Background: • Developed by the Object Management Group (OMG) in response to industrial demands for object­based middleware • Currently in version #2.4 and #3 • CORBA is a specification: different implementations of CORBA exist • Very much the work of a committee: there are over 800 members of the OMG and many of them have a say in what CORBA should look like • CORBA provides a simple distributed­object model, with specifications for many supporting services it may be here to stay (for a couple of years)

  4. Overview of CORBA • Architecture of CORBA • The Object Request Broker (ORB) forms the core of any CORBA distributed system. • Horizontal facilities consist of general-purpose high-level services that are independent of application domains. • User interface • Information management • System management • Task management • Vertical facilities consist of high-level services that are targeted to a specific application domain such as electronic commerce, banking, manufacturing.

  5. Overview of CORBA • The global architecture of CORBA.

  6. Object Model • CORBA has a traditional remote­object model in which an object residing at an object server is remote accessible through proxies • All CORBA specifications are given by means of interface descriptions, expressed in an Interface Definition Language (IDL). • An interface is a collection of methods, and objects specify which interfaces they implement. • It provides a precise syntax for expressing methods and their parameters.

  7. Object Model • CORBA follows an interface­based approach to objects: • Not the objects, but interfaces are the really important entities • An object may implement one or more interfaces • Interface descriptions can be stored in an interface repository, and looked up at runtime • Mappings from IDL to specific programming are part of the CORBA specification (languages include C, C++, Smalltalk, Cobol, Ada, and Java. • In DCOM and Globe, interfaces can be specified at a lower level in the form of tables, called binary interfaces.

  8. Object Model • Object Request Broker (ORB): CORBA's object broker that connects clients, objects, and services • Proxy/Skeleton: Precompiled code that takes care of (un)marshaling invocations and results • Dynamic Invocation/Skeleton Interface (DII/DSI): To allow clients to construct invocation requests at runtime instead of calling methods at a proxy, and having the server­side reconstruct those request into regular method invocations • Object adapter: Server­side code that handles incoming invocation requests.

  9. Object Model • Interface repository: • Database containing interface definitions and which can be queried at runtime • Whenever an interface definition is compiled, the IDL compiler assigns a repository identifier to that interface. • Implementation repository: • Database containing the implementation (code, and possibly also state) of objects. • Given an object reference, an object adaptor could contact the implementation repository to find out exactly what needs to be done.

  10. Object Model • The general organization of a CORBA system.

  11. Corba Services • Overview of CORBA services.

  12. Communication Models • Object Invocation Models • Synchronous • One-way • Deferred synchronous • Event and Notification Services • An event is produced by a supplier and received by a consumer. Events are delivered through an event channel. • Drawbacks of event services: • The event might be lost. • Consumers have no way to filter events. • Filtering capabilities have been added to the notificationservice.

  13. Object Invocation Models • Invocation models supported in CORBA.

  14. Event and Notification Services • The logical organization of suppliers and consumers of events, following the push-style model.

  15. Event and Notification Services • The pull-style model for event delivery in CORBA.

  16. Communication Models • CORBA supports the message-queuing model through the messaging service. • In callback model, A client provides an object with an interface containing callback methods which can be called by the underlying communication system to pass the result of an asynchronous invocation. • In polling model, the client is offered a collection of operations to poll its ORB for incoming result. • General Inter-ORB Protocol (GIOP) is a standard communication protocol between the client and server. • Internet Inter-ORB Protocol (IIOP) is a GIOP on top of TCP

  17. Messaging • CORBA's callback model for asynchronous method invocation.

  18. Messaging • CORBA'S polling model for asynchronous method invocation.

  19. Interoperability • GIOP message types.

  20. Processes • CORBA distinguishes two types of processes: clients and servers. • An interceptor is a mechanism by which an invocation can be intercepted on its way from client to server, and adapted as necessary before letting it continue. • It is designed to allow proxies to adapt the client-side software. • Request­level: Allows you to modify invocation semantics (e.g., multicasting) • Message­level: Allows you to control message­passing between client and server (e.g., handle reliability and fragmentation)

  21. Clients • Logical placement of interceptors in CORBA.

  22. Portable Object Adaptor • In CORBA, the Portable Object Adapter (POA) is a component that is responsible for making server-side code appear as CORBA objects to clients. • A servant is that part of an object that implements the methods that clients can invoke. • activate_object is a function used by a POA to build a CORBA object from a servant. • It takes a reference to a servant as input parameter and returns a CORBA object identifier as a result. • The object identifier is used as an index into the POA’s Active Object Map, which points to servants. • A CORBA object identifier is uniquely associated with a POA.

  23. Portable Object Adaptor • Mapping of CORBA object identifiers to servants. • The POA supports multiple servants. • The POA supports a single servant (multiple instances of the same servant).

  24. Portable Object Adaptor My_servant *my_object; // Declare a reference to a C++ objectCORBA::Objectid_var oid; // Declare a CORBA identifier my_object = new MyServant; // Create a new C++ objectoid = poa ->activate_object (my_object); // Register C++ object as CORBA OBJECT • Changing a C++ object into a CORBA object.

  25. Agents in CORBA • CORBA adopts a model in which agents from different kinds of systems can cooperate. • An agent system is defined as platform as a platform that allows the creation, execution, transfer, and termination of agents. • A place for an agent corresponds to a server where an agent resides. • Agent systems can be grouped into a region which represents a administrative domain. • An agent in CORBA is assumed to be constructed from a collection of classes. • Each region will have an associated finder (directory service), which allows it to find the location of the agents.

  26. Agents • CORBA's overall model of agents, agent systems, and regions.

  27. Naming • In CORBA, it is essential to distinguish specification­level and implementation­level object references • Specification level: An object reference is considered to be the same as a proxy for the referenced object.  Having an object reference means you can directly invoke methods. There is no separate client­to­object binding phase • Implementation level: When a client gets an object reference, the implementation ensures that, one way or the other, a proxy for the referenced object is placed in the client's address space. • Conclusion: Object references in CORBA used to be highly implementation dependent. Different implementations of CORBA could normally not exchange their references.

  28. Interoperable Object References • Recognizing that object references are implementation dependent, we need a separate referencing mechanism to cross ORB boundaries • Solution: Object references passed from one ORB to another are transformed by the bridge through which they pass (different transformation schemes can be implemented). • Passing an object reference A from ORB A to ORB B circumventing the A­to­B bridge may be useless if ORB B doesn't understand A. • To allow all kinds of different systems to communicate, we standardize the reference which is called Interoperable Object Reference (IOR) and passed between two different ORBs.

  29. Object References • The organization of an IOR with specific information for IIOP.

  30. Interoperable Object References • Each IOR comprise the following fields: • The repository identifier is assigned to an interface when that interface is stored in the interface repository. • The tagged profile contains the complete information to invoke an object. • There are two possible IOR bindings: • An IOR directly referring to an object is referred to direct binding. • The indirect binding request is sent to an implementation repository which acts as a registry. Indirect binding is used primarily for persistent objects.

  31. Object References • Indirect binding in CORBA.

  32. Naming Service • CORBA offers a naming service that allows clients to look up object references using a character-based name. A name in CORBA is a sequence of name components with the form a (id,kind)-pair where id indicates its name and kind indicates its attribute. • In most CORBA implementations, object references denote servers at specific hosts. Naming makes it easier to relocate objects

  33. Naming Service • In the naming graph all nodes are objects. There are no restrictions to binding names to objects. CORBA allows arbitrary naming graphs • A naming context is an object that stores a table mapping name components to object references. • There is no single root. An initial context node is returned through a special call to the ORB. the naming service can operate across different ORBs interoperable naming service.

  34. Synchronization • The two most important services that facilitate synchronization in CORBA are its concurrency control service and its transaction service. • The two services collaborate to implement distributed and nested transactions using two-phase locking. • There are two types of objects that can be part of transaction: • A recoverable object is an object that is executed by an object server capable of participating in a two-phase commit protocol. • The transactional objects are executed by servers that do not participate in a transaction’s two-phase commit protocol.

  35. Caching and Replication • CORBA offers no support for generic caching and replication. • CASCADE is built to provide a generic, scalable mechanism that allows any kind of CORBA object to be cached. • CASCADE offers a caching service implemented as a large collection of object servers referred to as a Domain Caching Server (DCS). • Each DCS is an object server running on a CORBA ORB. The collection of DCSs may be spread across the Internet.

  36. Caching and Replication • The (simplified) organization of a DCS.

  37. Fault Tolerance • In CORBA version 3, fault tolerance is addressed. The basic approach for fault tolerance is to replicate objects into object groups. • Masking failures is achieved through replication by putting objects into object groups. Object groups are transparent to clients. They appear as normal objects. • This approach requires a separate type of object reference: Interoperable Object Group Reference (IOGR). • IOGRs have the same structure as IORs. The main difference is that they are used differently. In IORs an additional profile is used as an alternative. In IOGR, it denotes another replica.

  38. Object Groups • A possible organization of an IOGR for an object group having a primary and backups.

  39. Fault Tolerance • To support object groups and to handle additional failure management in the Eteral system, it is necessary to add components to CORBA: • A replication manager is responsible for creating and managing a group of replicated objects. • An interceptor intercepts and passes the invocation to a separate replicas. • Invocation are subsequently sent to the other group members using reliable, totally-ordered multicasting.

  40. An Example Architecture • An example architecture of a fault-tolerant CORBA system.

  41. Security • The underlying idea is to allow the client and object to be mostly unaware of all the security policies, except perhaps at binding time. The ORB does the rest. • Specific policies are passed to the ORB as (local) policy objects and are invoked when necessary. • Examples: Type of message protection, lists of trusted parties. • A replaceable security service is a service which can be specified by means of standard interfaces that hide the implementation.

  42. Security • The general organization for secure object invocation in CORBA.

  43. Security • Replaceable security service can be implemented in combination with two different interceptors: • The access control interceptor is a request-level interceptor that checks the access right associated with an invocation. • A secure invocation interceptor is a message-level interceptor takes care of implementing the message protection. • The secure invocation interceptor sets up a security context (security information) for the client. • A security association will be established after the client is bound to the target object. • The value object sets up the security association with a standardized interface.

  44. Security • The role of security interceptors in CORBA.

  45. Distributed COM • DCOM: Distributed Component Object Model • Microsoft's solution to establishing inter­process communication, possibly across machine boundaries. • Supports a primitive notion of distributed objects • Evolved from early Windows versions to current NT­based systems (including Windows 2000) • Comparable to CORBA's object request broker

  46. DCOM Overview • Somewhat confused? DCOM is related to many things that have been introduced by Microsoft in the past couple of years: • DCOM: Adds facilities to communicate across process and machine boundaries. • SCM: Service Control Manager, responsible for activating objects (cf., to CORBA's implementation repository). • Proxy marshaler: handles the way that object references are passed between different machines.

  47. Overview of DCOM • The general organization of ActiveX, OLE, and COM.

  48. COM Object Model • An interface is a collection of semantically related operations • Each interface is typed, and therefore has a globally unique interface identifier • A client always requests an implementation of an interface: • Locate a class that implements the interface • Instantiate that class, i.e., create an object • Throw the object away when the client is done • Note: COM+ is effectively COM plus services that were previously available in an ad­hoc fashion

  49. Object Model • The difference between language-defined and binary interfaces.

  50. Tape Library and Registry • The overall architecture of DCOM.