Solo disponible en BuenasTareas
  • Páginas : 8 (1937 palabras )
  • Descarga(s) : 0
  • Publicado : 20 de noviembre de 2011
Leer documento completo
Vista previa del texto
November 29, 1999



CORBA - the Common Object Request Broker Architecture - is a powerful framework which allows software components to be used together. What makes it exciting and powerful is that the different components can be located in different processes and on different machines and can be implemented in different languages, such as JavaT M , C and C++. The differentCORBA objects can be treated identically to local objects making their use transparent. This is a very powerful mechanism akin to the UNIX pipe framework. It allows specialized tools to be developed and linked with other tools to perform tasks. It offers great possibilities for software in general, and definitely allows statistical environments to share services and become less monolothic and moreadaptable. CORBA appears complicated but this is due to the generality it offers as well as the fact that it typically made available in newer languages that we do not use in our daily work - namely, C++ and JavaT M . The goal of the tools described here is to provide access to and the functionality of CORBA within the interpreted languages we use to do data analysis and research. These include S, R,Matlab, etc. The functions presented here are not intended to form the final end-user API. Instead, they are the primitives that others can build upon in the interactive language to provide high-level access to the CORBA environment. However, they are already reasonably high-level and can be used immediately. Future plans involve accessing other CORBA services (e.g. the property service, etc.) andimplementing a version of the For() function which distributes and manages tasks with fault tolerance.



The heart of CORBA is the communication between client and server in the form of attributes and operations. In order for this to work, both client and server must agree on what the server can do and how to call it. The server declares its list of accessible attributesand operations as an Interface. This is specified using the Interface Definition Language (IDL). This is not used to implement the server (or client), just describe its capabilities. A simple example is given below to illustrate the basic nature of IDL. Here we describe the facilities available from a Matrix object. (This is not intended to be complete. We will see how to extend this naturallylater in the document.) interface Matrix { long nrow(); long ncol(); double data(in long i, in long j); }; Note that each parameter has a qualifier that indicates whether the argument is either in, out or inout. An out parameter is used to transmit data from the server to the client. An inout argument is used to pass information from the client to the server as a regular argument (in) but also is usedto communicate values back to the client from the server. The out arguments are used much like passing pointers in C so they callee can modify the contents of the object. It allows more than one object to returned, avoiding putting them into a container structure and making this the return type. An IDL description of a server’s capabilities is all that is needed to define the communication betweena server and its clients. Now we implement these. Compilation of the IDL to a suitable target language is the usual manner of implementing either a server or client. Most CORBA implementations provide an IDL to C++ compiler. Others also offer IDL to JavaT M . Since there are no IDL compilers for interactive languages such as S, R, etc., we have to create another mechanism. Fortunately, CORBAprovides one which is termed dynamic. The idea for the dynamic CORBA interfaces is that we store the IDL description of a server in an Interface Repository (IR). When a client attempts to invoke a method of a server, a generic mechanism fetches the description of the operation from the IRand puts the local arguments into that request in some manner and sends the request to the server. For its part,...