Corba ORB

xiaoxiao2021-03-06  85

Object Request Broker (ORB) Object Request Broker, ORB) is an object bus that allows objects to transparently send requests to local or remote other objects or receive responses there. ORB allows objects to discover and call each other's services at runtime. ORB is an middleware that establishes a client / server relationship between objects. By using ORB, a client object can be transparently calling a method of server objects. The role of the client / server is merely interacting between two objects. ORB objects can act as customers or servers depending on the occasion.

Corba ORB client and server work

Client: Client IDL Stubs provides a static interface for the object server. These precompiled stubes define how customers call the corresponding services on the server. From a customer's point of view, the stub is called a local call, which is a local agent of a remote server object. The service is defined by the IDL, and the root of the client and server is generated by the IDL compiler. For each interface on the server it use, the customer must have an IDL stub. Dynamic Call Interface (DLL) allows you to find called methods at runtime. The interface pool API allows and modifies all methods for the registered component interfaces and their support and the parameters they need. CORBA claims these descriptions as a method tag. We can see the interface pool as a dynamic ORB metadata. The ORB interface consists of some APIs, which are used to locate local services related to the application. The global pool ID is the global flag provided by ORB, called the pool ID (Repository ID) for unique and global flags in the environment of multiple vendor ORBs and pools, and its interfaces. The pool ID is a system-generated, unique string to maintain the consistency of a naming rule for multiple pools, which is not allowed to have any name conflicts. The pool ID is generated by the instruction Pragmas in the IDL. The pool ID itself is a string, consisting of a three-level name hierarchy. Server-side: Server IDL stub (OMG said it is a frame) provides a static interface for services output by each service area. Created by the IDL compiler. Dynamic Frame Interface (DSI) provides a run-up dynamic binding mechanism for the server that needs to be processed by the client that is called to some components, which are called a framework (or stub) that is called the IDL compilation. The object adapter is located on the top of the ORB core communication service, which is requested for the service representative of the server object. It provides a runtime environment to initialize the server object, transmit the request to them and assign their object ID - CORBA called this ID. The object adapter also uses instances (such as objects) that implement the pool records and their runtime instances. Implementation Repository provides a runtime information pool, which stores the class, an instantiated object, and the ID information supported by the server. It also provides a public place for storing additional information related to ORB implementation. The ORB interface consists of some APIs for positioning the local service.

At the same time supports dynamic and static client / server calls, and the characteristics of the interface pool increase CORBA performance. Static calls are easier to program, faster, and can generate documents themselves. Dynamic calls provide maximum flexibility, but more difficult programming. Dynamic calls are very useful for tools that are looking for services at runtime. The server is unable to distinguish dynamic and static calls, both of which contain the same message semantics. In both cases, ORB is found through the server IDL stub to find the server object adapter, pass the parameters, and transfers the control to the object.

转载请注明原文地址:https://www.9cbs.com/read-122557.html

New Post(0)