10
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java Algunos servicios CORBA. ServiceDescription Object life cycleDefines how CORBA objects are created, removed, moved, and copied NamingDefines how CORBA objects can have friendly symbolic names EventsDecouples the communication between distributed objects RelationshipsProvides arbitrary typed n-ary relationships between CORBA objects ExternalizationCoordinates the transformation of CORBA objects to and from external media TransactionsCoordinates atomic access to CORBA objects Concurrency ControlProvides a locking service for CORBA objects in order to ensure serializable access PropertySupports the association of name-value pairs with CORBA objects TraderSupports the finding of CORBA objects based on properties describing the service offered by the object

11
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java Implementaciones de CORBA para Java? Existen varios proveedores: The Java 2 ORBThe Java 2 ORB comes with Sun's Java 2 SDK. It is missing several features. VisiBroker for Java A popular Java ORB from Inprise Corporation. VisiBroker is also embedded in other products. For example, it is the ORB that is embedded in the Netscape Communicator browser. OrbixWebA popular Java ORB from Iona Technologies. WebSphereA popular application server with an ORB from IBM. Netscape Communicator Netscape browsers have a version of VisiBroker embedded in them. Applets can issue request on CORBA objects without downloading ORB classes into the browser. They are already there. Various free or shareware ORBs CORBA implementations for various languages are available for download on the web from various sources.

21
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java RMI vrs. CORBA (Comparando la Implementación) 1/4 CORBAJava/RMI Supports multiple inheritance at the interface level Every interface inherits from CORBA.Object Every server object implements java.rmi.Remote Uniquely identifies remote server objects through object references( objref ), which serves as the object handle at run-time. Uniquely identifies remote server objects with the ObjID, which serves as the object handle at run-time. Uniquely identifies a named implementation of the server object by its mapping to a name in the Implementation Repository Uniquely identifies a named implementation of the server object by its mapping to a URL in the Registry The remote server object reference generation is performed on the wire protocol by the Object Adapter The remote server object reference generation is performed by the call to the method UnicastRemoteObject.exportObject(this) The constructor implicitly performs common tasks like object registration, skeleton instantiation etc The RMIRegistry performs common tasks like object registration through the Naming class. UnicastRemoteObject.exportObject(this) method performs skeleton instantiation and it is implicitly called in the object constructor.

22
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java CORBAJava/RMI Uses the Internet Inter-ORB Protocol(IIOP) as its underlying remoting protocol Uses the Java Remote Method Protocol(JRMP) as its underlying remoting protocol (at least for now) When a client object needs to activate a server object, it binds to a naming or a trader service When a client object needs a server object reference, it has to do a lookup() on the remote server object's URL name. The object handle that the client uses is the Object Reference The mapping of Object Name to its Implementation is handled by the Implementation Repository The mapping of Object Name to its Implementation is handled by the RMIRegistry The type information for methods is held in the Interface Repository Any type information is held by the Object itself which can be queried using Reflection and Introspection The responsibility of locating an object implementation falls on the Object Request Broker (ORB) The responsibility of locating an object implementation falls on the Java Virtual Machine (JVM) RMI vrs. CORBA (Comparando la Implementación) 2/4

23
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java CORBAJava/RMI The responsibility of locating an object implementation falls on the Object Adapter (OA) - either the Basic Object Adapter (BOA) or the Portable Object Adapter (POA) The responsibility of activating an object implementation falls on the Java Virtual Machine (JVM) The client side stub is called a proxy or stub The server side stub is called a skeleton When passing parameters between the client and the remote server object, all interface types are passed by reference. All other objects are passed by value including highly complex data types When passing parameters between the client and the remote server object, all objects implementing interfaces extending java.rmi.Remote are passed by remote reference. All other objects are passed by value Does not attempt to perform general-purpose distributed garbage collection. Attempts to perform distributed garbage collection of remote server objects using the mechanisms bundled in the JVM RMI vrs. CORBA (Comparando la Implementación) 3/4

24
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java CORBAJava/RMI Complex types that will cross interface boundaries must be declared in the IDL Any Serializable Java object can be passed as a parameter across processes. Will run on any platform as long as there is a CORBA ORB implementation for that platform (like Inprise's VisiBroker) Will run on any platform as long as there is a Java Virtual Machine implementation for that platform (provided by a whole lot of companies in addition to JavaSoft and Microsoft) Since this is just a specification, diverse programming languages can be used to code these objects as long as there are ORB libraries you can use to code in that language Since it relies heavily on Java Object Serialization, these objects can only be coded in the Java language Exception handling is taken care of by Exception Objects. When a distributed object throws an exception object, the ORB tranparently serializes and marshals it across the wire. Allows throwing exceptions which are then serialized and marshaled across the wire. RMI vrs. CORBA (Comparando la Implementación) 4/4

25
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java RMI Pros y cons ProsCons Portable across many platformsTied only to platforms with Java support Can introduce new code to foreign JVMs Security threats with remote code execution, and limitations on functionality enforced by security restrictions Java developers may already have experience with RMI (available since JDK1.02) Learning curve for developers that have no RMI experience is comparable with CORBA Existing systems may already use RMI - the cost and time to convert to a new technology may be prohibitive Can only operate with Java systems - no support for legacy systems written in C++, Ada, Fortran, Cobol, and others (including future languages).

26
Juan Pablo Carvallo V., Parallel and Distributed Computing Using Java CORBA Pros y cons ProsCons Services can be written in many different languages, executed on many different platforms, and accessed by any language with an interface definition language (IDL) mapping. Describing services require the use of IDL which must be learned. Implementing or using services require an IDL mapping to your required language - writing one for a language that isn't supported would take a large amount of work. With IDL, the interface is clearly separated from implementation, and developers can create different implementations based on the same interface. IDL to language mapping tools create code stubs based on the interface - some tools may not integrate new changes with existing code. CORBA supports primitive data types, and a wide range of data structures, as parameters CORBA does not support the transfer of objects, or code. CORBA is ideally suited to use with legacy systems, and to ensure that applications written now will be accessible in the future. The future is uncertain - if CORBA fails to achieve sufficient adoption by industry, then CORBA implementations become the legacy systems. CORBA is an easy way to link objects and systems together Some training is still required, and CORBA specifications are still in a state of flux.