Jeevan Patil ECE 761 - pudn.comread.pudn.com/downloads145/ebook/633770/presentation.pdf2/17/00...
Transcript of Jeevan Patil ECE 761 - pudn.comread.pudn.com/downloads145/ebook/633770/presentation.pdf2/17/00...
2/17/00 Jeevan Patil
Jeevan PatilECE 761
2/17/00 Jeevan Patil
CORBA in 4 Hours !
Basic ConceptsThe OriginAdvantages of JavaAdvantages of CORBABeansServer & Client Side Details
2/17/00 Jeevan Patil
What I/U get out of this Static versus DynamicExample ProgramApplication versus AppletPortable CORBADynamic CORBAMinimum CORBA packagesJini
2/17/00 Jeevan Patil
Wrapping it Up
Available CORBA implementationsComparison with HTTP/CGI, Servlets ,RMI,DCOMBooksSources
? Recap & Conclusion? INTERACTIVE !? Mutually Helpful, Job!
2/17/00 Jeevan Patil
The OriginSpecification from the OMG(Object Management Group) tosupport distributed object oriented applications800 Companies, 89MiddlewareKnow Java , RMI !An application based on CORBA (Common ObjectResource Broker Architecture)is a collection of independentsoftware components or CORBA objectsProvides a communication infrastructure independent of theunderlying networkObject is made transactional,secure, lockable, persistent
2/17/00 Jeevan Patil
How CORBA Works
2/17/00 Jeevan Patil
Object Request Broker (ORB): Central,communication infrastructure necessary to identify andlocate objects, handle connection management and deliverdataIn order to make a request the client can communicate withthe ORB Core through the IDL stub or through theDynamic Invocation Interface (DII)The stub represents the mapping between the languageof implementation of the client and the ORB core
The ORB Core then transfers the request to the objectimplementation which receives the request as an up-callthrough either an IDL skeleton, or a dynamic skeleton
2/17/00 Jeevan Patil
The communication between the object implementationand the ORB core is effected by the Object Adapter(OA). It handles services such as generation andinterpretation of object references, method invocation,security of interactions, object and implementationactivation and deactivation, mapping referencescorresponding to object implementations and registrationof implementationsIt uses the policies specified in order to activate the Object.It needs the Object’s operating environment and locationwhich is stored in the IR.
2/17/00 Jeevan Patil
IDL /ORBClients dont need to know how the server is implementedRemote invocations are handled by the ORBAn object interface is provided by a IDL(Interfacedefinition language) fileAn IDL file specifies the list of operations which can beinvoked remotelyPortable across languages, tools, operating systems andnetworksIt is the Stub and Skeleton that connect a client of aparticular object to its implementation through the ORB
2/17/00 Jeevan Patil
Client SideClient SideStubs provide static interfaces to object services(client has one stubper interface)
~ Local Call , local Proxy for a remote objectStub includes code for Marshalling- encode, decode operation & parameters
into flattened message formats to be sent to the server.
DII(Dynamic Invocation Interface) lets you discover methodsat runtime
Interface Repository API’s allow to obtain and modifydescriptions of all interfaces, their parameters and methods.ORB Interface API’s to access local services - reference to a string
2/17/00 Jeevan Patil
Server SideSkeletons provide static interface to each service exportedby each server
DSI(Dynamic Skeleton Interface) handles dynamicinvocations ,finds target object,method from incoming msg.(Vs. Specially created skeleton)
Object Adapter provides run-time environment forinstantiating server objects, passing requests to them,assigning object ID’s. It registers objects with IR
OA (Object Adapter) - POA - CORBA 3
ORB Interface
2/17/00 Jeevan Patil
Currently IDL specified methods can be written in andinvoked from C, C++, Java, Ada, Smalltalk, Cobol( bindings)Interface repository contains the definitions of all theinterfaces(metadata that lets component discover each otherdynamically)Object Request Broker bus that makes, receivesresponses from the objects
2/17/00 Jeevan Patil
Orb versus RPC
With RPC when a specific function is called thedata is different.For Orb its a method within an Object(Polymorphism)
Using an ORB object a Client can transparentlyinvoke a method on a server independently of theprogramming language, location, OS etc.Just the name Client Server - interchangeable!
2/17/00 Jeevan Patil
Object Request Broker
Application Objects
Common Facilities
Common Object Common Object ServicesServices
DistributedDocuments
LicensingStartupTimeRelationshipQueryTransactions
EventsExternalization
Trader
Security
CollectionConcurrency
PropertiesLifeCyclePersistance
Naming
Horizontal Common Facilities
InformationManagement
SystemsManagement
Task
Management
Vertical Common Facilities
2/17/00 Jeevan Patil
CORBA Services : system-level services foraugmenting, complementing ORB functionality
Naming: Locate by name, federated naming contextsExternalization :getting data into/out of a component usingstream like mechanism
Persistence :Single interface for storing components onRDBMS, ODBMS etc.
Events : components register interest in events
Life Cycle : creating, deleting components on bus
Transactions :Two phase commit co-ordination
Query Service : Superset of SQL
Properties Service : properties can be associated withcomponents at runtime(date)
Concurrency Control : obtain locks on threads
2/17/00 Jeevan Patil
Relationships : Association between independent componentsCollection : generate and manipulate collectionsTime : synchronising timeSecurity : authentication, ACL, confidentiality,
non-repudiationLicensing : metering use of componentsTrader : Yellow Pages : Allows services to publicize themselvesand others to bid for them
CORBA Facilities :Firewall, mobile agents, data interchange, workflow, business object
framework , internationalization
2/17/00 Jeevan Patil
Advantages of CORBAStatic and Dynamic Method Invocations -Compile time - strong type-checking
Multiple High Level Languages- Invoke methods using HLL of u’r choice
MetaData, Self Describing-in IR, real-time info regarding functions
Local Remote transparency-Portability the KEYWORD
Security, TransactionsCoexistence with existing systemsPolymorphic Messaging :Function on an object (different objects)
2/17/00 Jeevan Patil
Internet InterOrb Protocol IIOP
TCPIP with some CORBA defined messages exchangesthat define a common protocol
ESIOP (Environment Specific Inter OrbProtocols)
2/17/00 Jeevan Patil
CORBA IDL can be used to wrap existing code -written in any languages with language interfaces since -it maintains a clear separation between the interfaceand the implementationImplementational Differences and Differences in Security -
Concept of DomainsBridges :Intermediate - elements of interaction are transformed directly
between the internal form of one domain and the other.Mediated - Interacting elements of one domain are
transformed at the boundary of each domain between theinternal form specific to this domain and some other formmutually agreed on by the domains.
If the mediation is internal to one execution environmentTCP/IP) -"full bridge", else otherwise if the executionenvironment of one ORB is different from the commonprotocol we say that each ORB is a "half bridge
2/17/00 Jeevan Patil
HTTP with CGI - (BASHING)Slow new process per request - servlets/ ORB basedobjects -nonstandard extensionsCumbersome
ASP -server side scripts which invokes & instantiatesobjects via HTTP(submit button) - intermediate http,webserver
Stateless - Cookies ?Not Suitable for client/server applications.
Object WEB: All applications built and packaged ascomponents
2/17/00 Jeevan Patil
Object Web Server
Web Client
Tier 1Web Server
Tier 2 Tier 3
Get HTML
Get Applet
Appletinvokes obj
Browser
loadsApplet
HTTP
Server
CORBA
Server
Generatenew obj
OR
appletinteracts
DBMS
Lotus Notes
TP Monitors
2/17/00 Jeevan Patil
Object Web with JavaBeansThe new Webpages would be more dynamic than the current
ones : More look and feel of real objects including places
containing people, things and other places. Dynamicity would
be provided by ensembling JavaBeans within pages.
Server Component - CORBA server side object including
features of components such as declarative transactions
and security
2/17/00 Jeevan Patil
TP MonitorsObject Transaction Monitor(OTM) Component co-ordinator
TP monitors(Transaction Processing ) built on top of ORB.Helps the many application instances on the various serversco-ordinate, balance the workload and ensure databaseintegrity.Restarts pools of ObjectsDistributes LoadsCo-ordinates multi-component transactionsVisualise an application so heavily used that it requiresmultiple database and application servers to support a largeuser population.
IBM Component BrokerBEA's Tuxedo/Iceberg
2/17/00 Jeevan Patil
Advantage of using Java
Mobile agents - client/server dynamically gains intelligenceObject webBytecodes help in agenting framework for distributedobjects which move from node to nodeUsing a Javabeans based component model
visual assembly tools to create CORBA beansmultithreading, garbage collection, error management -robust distributed objects
2/17/00 Jeevan Patil
The Gang of Four & Standardisation
Netscape bundling Visibroker for Java ORB with every browser.Oracle with Corba/java as the platform for network computingarchitecture.Javasoft including rmi-iiop compatibility with corbaIBM/Lotus building VisualAge to target corba and LotusNotesIntergalactic Client/Server -
Number of clients per applicationNumber of Servers per applicationGeographyMiddlewareClient/Server ArchitectureTransactional UpdatesMobile AgentsMultimedia
2/17/00 Jeevan Patil
Big Three ORB's comply with OMG standards of Java/IDLMapping
Borland/Visigenic's -Visibroker
Iona's OrbixWeb
Javasoft's JavaIDL
So the big deal is that same stub bytecodes should run on all
ORB's supposedly a new property also lets you dynamically
swap ORB's -(Visibroker)!
Standards include - Java to IDL , IDL to Java Mapping and
EJB
2/17/00 Jeevan Patil
Static vs. Dynamic InvocationsThe Server cannot find the difference because-
client accesses an object reference and invokes the method.
STATIC INVOCATIONS
Static interface directly generated in form of Stubs by
IDL compiler - perfect for programs that know at compile
time what operations they need to invoke. Stub interface :
Easier to Program (Method is called by invoking Name)
Self Documenting - easy to understand the code
2/17/00 Jeevan Patil
At run-time, the dynamic type of the actual argument isused to compute the instantiation of any implicitly-boundtype parameters.
Provides robust type checking by compiler at build time.
DYNAMIC INVOCATIONS :Allows dynamic construction of object invocationInterface details are filled in by consulting with theinterface repository and or other run-time sources
CORBA is strongly typed like Java, C++Each datatype is predefined as part of the programminglanguage and all constants or variables defined for a givenprogram must be described with one of the data types Certain operations may be allowable only with certain datatypes.
2/17/00 Jeevan Patil
Count IDL1) Define server interface using IDLmodule Counter {interface Count {
attribute long sum;long increment;
};};
Language independant IDL definitions for server interfaces - Count.idlCount interface is within a CORBA module called counter.A module is equivalent to a package in JAVA.Names should be unique within a module.
2/17/00 Jeevan Patil
2) Bind them to the IR3) Run IDL through language precompiler which generates :
a) Client Stubs for IDL generated methodsb) Server Skeletonsc) Language Specific example class for your implementation
idl2java count.idl -no_Comments -no_tienot to generate extra delegation classes
Delegation :Idea of a method using another object's method to do the real workThe top layer method never has to change while it's implementation canchange at will.Alternative to using inheritance for implementation purposes. One can useinheritance to define an interface and delegation to implement the interface.
2/17/00 Jeevan Patil
Count.idl
idl2java
_st_CountCountHelper CountHolder _CountImpl
BaseCountInterface
_example
_Count
Precompiler
CORBA IDL
2/17/00 Jeevan Patil
Idl2java produces a Package Counter that contains 5 Javaclasses and one interface
1 ]Counter._CountImplBase :Server side skeleton2 ]Counter._st_Count :Class that implements the Java
Stub (Servant - services the client’s requests)3 ]Counter.CountHelper :Class that provides useful
helper functions for Count Clients. Eg. Compilerautomatically generates code for a narrow function that letsclients cast CORBA object reference to a CORBA type.
2/17/00 Jeevan Patil
4 ]Counter.CountHolder :Class that is used by Clients andServers to pass objects of type Count as out & inout parameters insidemethod invocation.
Java natively supports in parameters
5 ]Counter.Count interface :Maps the Count interface to the JavaInterface
package Counter;public interface Count extends org.omg.CORBA.Object{public int sum();public void sum(int _val);public int increment();}
2/17/00 Jeevan Patil
6 ]Counter._example_Count :Example class for Count object implementation .It contains
constructorsand example methods for sum attribute and implement method
that was defined in count.idl.
package Counter;public class_example_Count extends Counter.CountImplBase{public _example_count(java.lang.String name){super(name);}public _example_Count();{super();}
2/17/00 Jeevan Patil
public int increment(){//implement operation}public void sum(int sum){// implement attribute writer}
public void sum(){//implement attribute writer}}
2/17/00 Jeevan Patil
Server side of Count :Each Corba server has a class that initializes ORB environmentand start objects - ORBCountServer implements this main function and those interfaces defined in
the IDL.The best way is to modify and use the exampleCount program.CountImpl.java: The count implementation
class CountImpl extends Counter._CountImplBase{private int sum;//ConstructorCountImpl(String name){super(name);/* Each instance of CountImpl creates a persistentlynamed object ;If invoked without a name a transient object will be
created */
2/17/00 Jeevan Patil
System.out.println("Count Object Created");sum = 0;
//get sumpublic int sum(){return sum;}
//set sumpublic void sum(int val){sum = val;}
//increment methodpublic int increment(){sum++;return sum;}
2/17/00 Jeevan Patil
CountServer class is the second class that must beimplemented-The class that provides the main function on the server side.
It does the following things :
a) Initialize the ORBb) Initialize the BOAc) Create a CountImpl Objectd) Export the ORB to the newly created objecte) wait for incoming requests
2/17/00 Jeevan Patil
//CountServer.java : The Count Server main program
class CountServer
{
static public void main(String[] args)
{
try
{
//Initialize the ORB - returns a org.omg.CORBA.ORB object
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);//Initialize the BOA
org.omg.CORBA.BOA boa = orb.BOA_init();
2/17/00 Jeevan Patil
//Create the Count objectCountImpl count = new CountImpl("My Count")l
//Export to the ORB the newly created objectboa.obj_is_ready(count);
//Ready to service requestsboa.impl_is_ready();}catch(org.omg.CORBA.SystemException e){System.err.println(e);}
Note that there is no forever looping- provided by BOA & CORBA
2/17/00 Jeevan Patil
RECAP OF STEPS
1) Define interface using IDL
2) Bind interface definition to the IR
3) Run IDL through idl2java
4) Add Servant implementation code(use example file)
5) Compile
6) Register objects with IR
7) instantiate objects on server
8) Implement the client
9) Compile client
2/17/00 Jeevan Patil
CountServer ORB BOA
BOA_init
ORB.init
Obj_is_ready
Impl_is_ready
CountImpl
Wait for Client request
1
2
3
4
5
2/17/00 Jeevan Patil
CountProxy
CountClient
CountImplCountH
elper
ORB.init
bind
increment
Sum(0)Sum(0)
Incr.
ORB
1
2
3
45
67
Stop timer
Start timer
Print results
2/17/00 Jeevan Patil
Client Side//CountClient.java Static Client - Only one class
class CountiClient{public static void main(String args[]){try{//Initialize the ORBSystem.out.println(“Initializing the ORB”);org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(args,null);//Bind to the count Object
2/17/00 Jeevan Patil
System.out.println(“Binding to the Count Object”);Counter.Count counter =
Counter.CountHelper.bind(orb,”MyCount”);//Set sum to 0counter.sum((int) 0);//Start timelong startTime = System.currentTimeMillis();//Increment 1000 timesfor(int i=0 ; i <1000;i++){counter.increment();}//Calculate stop timelong stopTime = System.currentTimeMillis();
2/17/00 Jeevan Patil
System.out.println(“Avg ping =“+((stopTime -startTime)/1000f) +”msecs”);
System.out.println(“Sum=“+counter.sum());}catch(org.omg.CORBA.SystemException e){System.err.println(“System.out.println”);System.err.println(e);}}}
2/17/00 Jeevan Patil
CORBA Exceptions
Client/Server environments contain many movingparts; any can go wrong anytime
Java comes to the rescue - try-throw -catch
Running the program on a NT 4.0, 120MHzPentium showed surprised results
Local pings : 3.9 ms, Remote 3.6 ms
JVM - CPU intensive!
2/17/00 Jeevan Patil
AppletsSame ping program written -appletMethods :
init : loading applet first timestart : Returns to the pagepaint ...Action ....handleEvent ....stop : Move off pagedestroy :Kills threads, releases resources
2/17/00 Jeevan Patil
Changing IDL Interface
Stubs hardcoded to work with interfaces
Change of idl/interfaces -> refreshing of stubs on all clients
Publish a new interface continuing with old one - DCOM
download stub alongwith applet. ->applet clients
CORBA DII - clients generate requests on the fly- no stubs
Flexibility vs. Performance
2/17/00 Jeevan Patil
Run button - > ActionNetscape using Visibroker 2.5IIOP Gatekeeper - configure applet security rights acrossfirewallsResults!
Java Applet is around 3-4 times slower thancorresponding applicationWhy -> Netscape’s50 times faster than HTTP/CGI equivalent
2/17/00 Jeevan Patil
Comparison of Java & C++Borland Visibroker C++ & JavaJava Client invokes C++ Server objectsC++ Client invokes Java Objects
module Counter{interface Count{attribute long sum;long increment;};};
2/17/00 Jeevan Patil
Idl2cpp -src_suffix cpp -no_tienot to generate delegation code stubbssuffix : cpp
Generates the Following Files :a) Count_s.cpp - Server Skeleton
b) Count_s.hh - Server-side header file
c) Count_c.cpp - Contains Count that serves as proxy on client forCount
d) Count_c.hh - client header field
2/17/00 Jeevan Patil
Count_s.hhClass _sk_Counter{public :class _sk_Count:public Counter::Count{virtual CORBA::Long sum() = 0;virtual void sum(CORBA:: Long val) = 0;virtual CORBA::Long increment() = 0;//Skeleton Operations implemented automatically};};
2/17/00 Jeevan Patil
Serverside -Countimp.h
//countimp.h#include <count_S.hh>class CountImpl:public _sk_Counter::_sk_Count{private: long sum;public:CountImpl(const char *object_name=NULL);CORBA::Long sum();void sum(CORBA::Long val);CORBA::Long increment();};
2/17/00 Jeevan Patil
Count Server Impl Code
//server.cpp Count Server,Visibroker for C++
# include “countimp.h”
int main(int argc,char* const* argv)
{try
{//initialize the ORB
CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv);
2/17/00 Jeevan Patil
//Initialize the BOACORBA::BOA_ptr boa = orb->BOA_init(argc,argv);//Create the Count objectCounter::Count_ptr count = new CountImpl(“MyCount”);//Export the newly created objectboa->obj_is_ready(count);//Ready to service requestsboa->impl_is_ready();}catch(const CORBA::Exception& e){cerr << e<< endl;}return (0);}
2/17/00 Jeevan Patil
Local Versus Remote Pings
Local : 2.3 msecs Remote : 3.9 msecs
For Java we had the Local taking more time thanthe remote!
JVM - CPU-intensive
C++ ORB’s 41% faster than Java counterparts, butslightly slower for remote
2/17/00 Jeevan Patil
C++ vs. Java
C++ Client to Java Server
Local : 3.6 Remote : 3.4
Java Client to C++ Server
Local :5.7 Remote : 4.3
Java Servers slightly faster than C++ counterparts whencompared to serving C++ clients
When fine tuned Java ORB ~ C++ ORB in speed! Eg.Visibroker
2/17/00 Jeevan Patil
Dynamic Corba
Dynamic Invocations and CallbacksAny client can construct a remote methodcall on the fly and then invoke it
2/17/00 Jeevan Patil
Portable CountAll Visibroker(whatever) specific code replaced by generalcodeCorba Naming Service does not introduce its own stringbased conventionsCan work with existing naming conventions - URL’s,domain names,JDNI,Unix, NT filesWhite Pages -objects find others by namename to object association - Name BindingNaming Context - Namespace -name uniqueClient can navigate hierarchy to searchSequence of Names form a compound name “/” OR “\”
2/17/00 Jeevan Patil
Named Component - structure with two attributes :identifier - Object’s name stringkind - String in which descriptive attribute
Two interfaces that implement :Naming Context
resolve,list, destroy,bind,unbind etc.Binding Iterator
next_one , next_n , destroy
2/17/00 Jeevan Patil
Name Server
ServerClient
Client
ORB
ORB
ORBInvoke Service
Bind(name,object)
NameSpace<name_1,object_1><name_2,object_2><name_3,object_3>
Resolve
(name)
1
2
4
5
3
2/17/00 Jeevan Patil
OMG trying to standardize the bootstrap port (900)to obtain the initial naming context via IIOP.OMG working on Interoperable Naming Service(IBM,Sun,Netscape,Oracle, Visigenic)- URL basednaming system
Naming System Details
2/17/00 Jeevan Patil
PDCL
Wayne State
Engineering
Parsec
Resolve Initial References
(Obtain the initial naming Context)returns an Object
Narrow it or typecast it to themore derived naming contextmaybe a filetype etc.(Univer,Building,Laboratory attribute)
Bind New Context
Bind
Naming Context
Corba Object
2/17/00 Jeevan Patil
POA specific code
Import org.omg.CosNaming.*;
//Get a reference to the Naming service
org.omg.CORBA.Object nameServiceObj =
orb.resolve_initial_references(“NameService”);
//Narrow the Object
org.omg.CosNaming.NamingContext nameService =org.omg.CosNaming.NamingContextHelper.narrow(nameServiceObj);
2/17/00 Jeevan Patil
//Locate countName relative to initial contextnameComponent[] countName ={newNameComponent(“countName”,””)};CounterPortable.Count counter =
CounterPortable.CountHelper.narrow(nameService.resolve(countName));
BOA was underspecified,Vendors introduced inconsistenciesBirth of POA - > Only that part of code which interfaces with
the OA has to be modifiedSlightly faster than visigenic specific code !Remote faster than static
2/17/00 Jeevan Patil
Dynamic Count
Clients needed precompiled stub to invoke operations on theserver object
Applets can download stub’s bytecodes at runtime
But they still need a stub to get on to the server
DII (Dynamic Invocation Interface)to the rescue
Pick a object at runtime & dynamically
invoke its methods
2/17/00 Jeevan Patil
IDL stubs are interfaces through which a client can requestCORBA services.
IDL stubs map client requests from the client's language toIDL, the language CORBA understands.
Clients can lookup objects by name -Naming Service/attributes - Trading Services (Yellow Pages of CORBA)
Trader augment IR - list of values that server object expects
Servers dont differentiate between DII or precompiled stubs
2/17/00 Jeevan Patil
StepsObtain Interface Name : From Object by introspection(get_interface())Method Description from IR : 10 Methods for interactingwith the IR --- lookup_name , describeCreate the argument list (implementing the self definingdata structure Named Value List NVList)Create the request object which contains methodname,arg,return valueInvoke the requestImmediate, Poll Response, No result needed
2/17/00 Jeevan Patil
Results15 times the time to prepare and invoke(60 )
Multiple lookups against IR
When to use what-Frequent calls - unchanged server - StubsInfrequent - DIIDiscovering stubs at runtime - DIIWithin Browser - Use downloadable applet and staticstub
2/17/00 Jeevan Patil
CallBack
CallBack allows clients to be servers and let servers callclients
CallBack messages may appear in client applet at any time
Clients can include events generated by remote Servers
Coordinator uses callback to start/stop clients, collectstatistics
2/17/00 Jeevan Patil
Minimum CORBA packages
Package org.omg.CORBA
org.omg.CORBA.DynAnyPackageorg.omg.CORBA.ORBPackage
Package org.omg.CORBA.portable
Package org.omg.CORBA.TypeCodePackage
Package org.omg.CosNamingPackageorg.omg.CosNaming.NamingContextPackage
2/17/00 Jeevan Patil
Package org.omg.CORBAMapping of the CORBA APIs to the Java languageORB behind the scene’sFew ORB methods
connect() disconnect() init() init(String [] args, Properties props) init(Applet app, Properties props) list_initial_services() resolve_initial_references(String name) object_to_string(Object obj) string_to_object(String str)
2/17/00 Jeevan Patil
ExceptionsIn IDL are similar to JavaTry { } catch
SystemServer-side system exceptions, such as resource exhaustion oractivation failure. Communication system exceptions, for example, losing contactwith the object, host down, or cannot talk to ORB daemon (orbd). Client-side system exceptions, -> invalid operand type or anythingthat occurs before a request is sent or comes back.User Defined
Throws - > Raises
2/17/00 Jeevan Patil
All IDL operations can throw exceptions
Clients should be enabled to catch them
Developers cannot rely on compiler to notify them of a systemexception , because CORBA system exceptions are descendants ofjava.lang.RuntimeException.
CORBA user exceptions are subtypes of java.lang.Exception through
org.omg.CORBA.UserException:
java.lang.Exception
|
+--org.omg.CORBA.UserException
|
+-- Stocks.BadSymbol
|
+--//etc.
2/17/00 Jeevan Patil
Packageorg.omg.CORBA.DynAnyPackage
Provides the exceptions used with the DynAny interface(InvalidValue, Invalid,
InvalidSeq, and TypeMismatch).
2/17/00 Jeevan Patil
Package org.omg.CORBA.ORBPackage
Provides the exception InvalidName, which is thrown by themethodORB.resolve_initial_references and the exceptionInconsistentTypeCode,which is thrown by the Dynamic Any creation methods inthe ORB class.
2/17/00 Jeevan Patil
Package org.omg.CORBA.portable
Provides a portability layer, that is, a set of ORB APIs thatmakes it possiblefor code generated by one vendor to run on another vendor'sORB
Stubs and other code, generated either from IDL orinterfaces written in the Java can call into these ORB APIs.
2/17/00 Jeevan Patil
Package org.omg.CORBA.TypeCodePackage
Provides the user-defined exceptions BadKind and Bounds,which arethrown by methods in in the class TypeCode
2/17/00 Jeevan Patil
Package org.omg.CosNaming
Provides the naming service for Java IDL.The package and all its classes and interfaces weregenerated by running thetool idltojava on the file nameservice.idl, which is amodule written inOMG IDL.
2/17/00 Jeevan Patil
Packageorg.omg.CosNaming.NamingContextPackage
Provides the exceptions used in the packageorg.omg.CosNaming(AlreadyBound, CannotProceed, InvalidName, NotEmpty,andNotFound) and also the Helper and Holder classes for thoseexceptions.
2/17/00 Jeevan Patil
Comparison of CORBA and Jini:
CORBA allows specification of Objects which canbe distributed. The concentration is on distributedobjects rather than services It is language - independent using an IDL forspecification of interfaces.MaturePrevalent - Not many Jini Applications in Market??
2/17/00 Jeevan Patil
Corba ImplementationsMico - C++,linux, fast, stable,Free
JacORB - Java, source code,Linux,FreeDCOM -Microsoft, ActiveX,not CORBA compliant
Java-RMI - java specific
OmniORB- ATT - C++, Free
Borland/Visigenic’s Visibroker C++,Java,documentation, IIOP firewallOrbacus- (Omnibroker) - C++, Java,
NT,linux,Windows, Free
2/17/00 Jeevan Patil
Review of Today’s Lecture
JavaSoft- free, minimalist, documentationNo Interface Repository so no dynamic invocationsNaming Service Volatile -server terminationNo add on services like security,firewall, loadbalancing,persistence, thread pooling
Adopted CORBA as its distributed Object model runningRMI API’s on top of CORBA/IIOPIt includes CORBA/IIOP ORB as part of the JDK 1.2core,delivers EJB on top of JTS(Java Transaction Service-Java implementation of OTS)Orbixweb’s IONA - great portability,
2/17/00 Jeevan Patil
DCOMCOM on the wirerunning Object Remote Procedure Call (ORPC) on top ofDCE’s RPC and interacts with COM’s runtime services.Windows!Since COM specification is at binary levelit allows DCOM server components to be written acrossmultiple languages.Platform should support COM
2/17/00 Jeevan Patil
RMI
Relies on Java Remote Method ProtocolJava Object SerializationPortable across machines
RMIRegistry
2/17/00 Jeevan Patil
CORBA Competitors
Legacy Middleware : Java Sockets, CGI/HTTP, andServlets
non-CORBA ORB’s - RMI, DCOM
Features:
Abstraction Level: Higher the better, lesser work forapplication, eg. Naming conventions, marshalling etc.Sockets lowest - servelets, CGI bad too
OS Support : DCOM - NT, 9*
All Java Implementation - DCOM- C,C++
2/17/00 Jeevan Patil
Parameter Support : IN/OUT - bad in HTTP/CGI, Servlets,SocketsMaintaining state across invocations - CGI worst , Servletssockets - badDynamic Discovery and MetaData support :
CORBA Best: DCOM good - others very bad /Unique Object(introspection)Performance : CORBA, DCOM, RMI good, Sockets - best,HTTP - 300 times, Servlets 20Dynamic Invocations : DCOM, CORBAconstructing methods on the fly.Wire Level Security - Sockets(SSL), HTTP(SHTTP),DCOM - NT Domain Security, RMI -(SSL), downloading
2/17/00 Jeevan Patil
Wire-level Transactions:
DCOM,CORBA(automatic propagation )
URL-based Naming: Bad for DCOM, RMI
Multilingual Object Invocations : Worst for RMI, Servlets
Intergalactic Scaling : IIOP helps for objects across
multivendor ORB’s
2/17/00 Jeevan Patil
BooksCORBA Fundamentals and Programming Jon Siegel et al., John Wiley& Sons
Instant CORBA Robert Orfali, John Wiley & Sons
Java Programming With CORBA Andreas Vogel and Keith Duddy,
Provides background about Java and CORBA. It gives an overview onJava ORBs, details to the various IDL to Java mappings (VisiBroker,OrbixWeb, Joe) and on the CORBA Naming Service and CORBAObject Trading Service.
The CORBA Reference Guide : Understanding the Common ObjectRequest Broker Architecture Alan Pope
2/17/00 Jeevan Patil
Books Client/Server Programming With Java and CORBA
Dan Harkey and Robert Orfali, CORBA - A Guide to Common Object Request Broker Architecture
Ron Ben-Natan, McGraw-Hill,CORBA Design Patterns
Raphael C. Malveau and Thomas J. Mowbray, John Wiley & Sons? CORBA Distributed Objects, using Orbix Sean Bakerp CORBA for Dummies John Schettino, Liz O'Hara
2/17/00 Jeevan Patil
SourcesClient/Server Programming With Java and CORBA
Dan Harkey and Robert Orfali,www.omg.orghttp://www.cs.indiana.edu/hyplan/kksiazek/tuto.htmlhttp://developer.netscape.com/viewsource/dreyfus_corba.htmlhttp://www.cs.umbc.edu/~thurston/orbarch.htm#OBREFhttp://www.cerfnet.com/~mpcline/Corba-FAQ/http://chctraining.com/Training/corba.htmhttp://www.expersoft.com/Resources/DistTech/dtlib.htmhttp://www.cs.uofs.edu/~ms1/corba/corbapr.htmlhttp://www.cs.wustl.edu/~schmidt/tutorials-corba.htmlhttp://www.ececs.uc.edu/~urajasek/research/corba.htmlhttp://www.execpc.com/~gopalan/misc/compare.html DCOM,CORBA & RMI
http://nenya.ms.mff.cuni.cz/thegroup/COMP/ OmniORB, Orbacus, Orbixwww.google.com ; ) www.deja.com ; )
2/17/00 Jeevan Patil
Recap and Conclusion
CORBA is the BEST
Explore the world of CORBA !
2/17/00 Jeevan Patil
Recap
Slides -http://www.pdcl.eng.wayne.edu/~jeevan/bookmarks/research.html ppt,pdf and psCORBA - Common Object Request BrokerArchitecture - 89’ - OMGAdded IIOP over TCP/IPAdded Comparisons of existing implementations
2/17/00 Jeevan Patil
Physical
ORB
Application
Presentation
Session
Transport
Network
Data Link
ORB
Stub SkeletonStub Skeleton
Client ImplSurrogate
Request
Response
InterORB communication showingTCPIP layers vs. CORBA’s IIOP
2/17/00 Jeevan Patil
IIOPSurrogate - Proxy
Objref of a service in B is mapped to A thru surrogate
Client side, Server Side
Lingo translation
Externalization - stream out, Internalization - stream inobject state
Surrogate - Single -does all translations - hard to impl.
Different for all objects
GIOP - General InterOrb Protocol
2/17/00 Jeevan Patil
Physical
NetworkAccess
Transport
Network
Data Link
Session
Presentation
Application
Internet
Host-to-Host
Process
IIOP
Stubs/SkelGIOP
CORBA’s
interoperability toOSI andDOD(Department ofDefense) protocol
2/17/00 Jeevan Patil
Network
Data Link
Physical
Network
Data Link
Physical
SessionTransport
SessionTransport
ApplicationPresentation
ApplicationPresentation
CORBA
IIOPBridge
Gateway
Router
Bridge
IIOP and Network Bridges
2/17/00 Jeevan Patil
CORBA IDL
ESIOPGIOP
RPC over OSIIIOPTCP/IP
ObjectRequestSemanticsXfer andmsgSyntax
Transport
InterORB Architecture
2/17/00 Jeevan Patil
PDCLIR
“mencius”ParsecClient
Implementation “on ernie”
DirectInteraction