DOC PREVIEW
UConn CSE 298/300 - A Comparison of Jini and CORBI

This preview shows page 1-2-3-19-20-39-40-41 out of 41 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 41 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

A Comparison of Jini and CORBAOutlineMotivationOverviewJiniJini BackgroundRuntime ArchitectureHow Jini WorksSeparation of Interface & ImplementationSlide 10Jini Program DesignDesign – GamesDesign – PlayersSlide 14ImplementationImplementation – Code samplesImplementation – Code samples (cont.)CORBAWhat is CORBA?Object Request Broker (ORB)CORBA Objects and IDLExample of IDLStub and SkeletonDesign of the Game Project with CORBATwo Games:Two Games (Cont.)Design Details--IDLDesign Details--UMLSlide 29Design Details-IDLDesign Details- UMLNotes for CORBA decentralized versionComparisonArchitectural ComparisonArchitectural Comparison – ExampleComparison – EventsEase of useSlide 38PerformanceSlide 40ReusabilityA Comparison of Jini and CORBAAndrew SeeLiyuan YuZhongying WangMichael CollinsOutlineIntroductionMotivationOverviewJiniBackgroundDesign/ImplementationCORBABackgroundDesign/ImplementationComparisonsArchitectural ComparisonEase of usePerformanceReusabilityMotivationMiddleware is important for distributed computingJini & CORBA are two solutionsJini & CORBA differ in subtle waysWe want to compare Jini and CORBA:ConceptualArchitectural ComparisonPracticalPerformance studyReusability of an example system.OverviewGame projectDevelop text based distributed game systemLimited time: no fancy graphicsFair comparison: easy to express in both Jini & CORBA  use strings onlyVariety of games in same network.Use name service of Jini & CORBAJiniJini BackgroundEmbedded hardware is network-centric, not disk-centricNetworks are dynamic; so is JiniObject interface; not network protocolService: A network-accessible device that provides a useful functionClient: Any user who requests servicesRuntime ArchitectureFederation of servicesNo central authorityLookup ServiceDirectory of currently available servicesServices can be searched by clientsExecution of services is independent of JiniAs backup, Jini also allows network protocolHow Jini WorksSeparation of Interface & ImplementationServices may grant varying access to clientsEntire service is downloaded and run locallyService object is a proxy to remote serverMethods are remote calls to service, which actually does the workBoth local and remote objects share workSeparation of Interface & ImplementationClient is not required to know network protocol between proxy & serviceService responsible for service object; may communicate using RMI, CORBA, DCOM, etc.Jini Program DesignPlayerOne player for all GamesGamesSeparate communication from game specific rulesGeneralize common game tasksAdd/remove a playerTake a turnUpdate Player stateDesign – Games InterfaceGameInterfaceRemoteGameInterfaceGameProxyAbstractGameBasicGameProxyTurnBasedGameGuessingGameHangman BlackjackHangmanProxy BlackjackProxyDesign – Players InterfacePlayerPlayerImpl(terminal based)GuiPlayer(GUI based)Terminal and GUI based clients have same functionality.ImplementationServerJininame serviceRegisterLeaseRemote GameGameProxyPlayerLookupGameProxyGameProxyaddPlayer,TakeTurnaddPlayer,TakeTurn(local processing)Implementation – Code samplesCreating the server-side object:Game impl = new GuessingGame();RemoteGame implProxy = (RemoteGame)exporter.export(impl);Creating the proxy:smartProxy = new BasicGameProxy(implProxy);Registering the proxy:ServiceItem item = new ServiceItem(null, smartProxy, attrs);…reg = registrar.register(item, Lease.FOREVER);Implementation – Code samples (cont.)Player taking a turn:Player:protected void takeTurn(String action){game.takeTurn(action,id); }GameProxy – this version just forwards to remote implementation:public void takeTurn(String action, Object id) throws RemoteException {impl.takeTurn(action,id); }…player.setGameData(data);The rules for the game could be in the RemoteGame implementation, or the Game Proxy, or split between them.CORBAWhat is CORBA?Common Object Request Broker Architecture (CORBA) specification defines a framework for object-oriented distributed applications..It is an open standard for heterogeneous computing.Allows distributed programs in different languages and different platforms to interact as though they were in a single programming language on one computerObject Request Broker (ORB)A software component that mediates transfer of messages from a program to an object located on a remote host.NetworkServer123execution45670invocationORBORBClient0. Invocation ( with an object reference)1. Locate CORBA objects and marshal parameters2. Network Delay 3. Unmarshal parameters4. Method Execution5. Result marshal6. Network Delay 7. Result unmarshalCORBA ObjectCORBA Objects and IDLEach CORBA object has a clearly defined interface specified in CORBA interface definition language (IDL). Distributed objects are identified by object references, which are typed by the IDL interfaces.The interface definition specifies the member functions available to the client without any assumption about the implementation of the object.Example of IDLstockMarket.idlmodule stockMarket{ interface StockServer { float getStockValue (in string stockName); void setStockValue (in string stockName, in long value); } …………..}No Implementation details in IDLStub and Skeleton“Glue” that connects language-independent IDL interface specifications to language –specific implementation Automatically generated by IDL compilerClientORBObjectObjectStubClientStubDesign of the Game Project with CORBACentralized Version:Nami ng Servi ceGame ServerPl ayer 1l ocate servi ceret urn server ref erencepl aypl ayPl ayer 2return server ref erenceregi ster Servi cepl ayl ocate servi ceTwo Games:Guess Game:Two Games (Cont.)HangMan:Design Details--IDLmodule GameApp{ interface Player { void displayMessage(in string m); string getPlayerID(); }; interface GuessPlayer: Player { }; interface HangmanPlayer: Player { void drawMan(in long numWrong); }; interface Server { void addPlayer(in Player p); void removePlayer(in string playerID); void startGame(in string playerID); void QuitGame(in string playerID); void takeTurn(in string playerID); }; interface GuessServer: Server { void takeTurn(in long number, in string playerID); }; interface HangmanServer: Server {


View Full Document

UConn CSE 298/300 - A Comparison of Jini and CORBI

Documents in this Course
Java Tool

Java Tool

58 pages

Load more
Download A Comparison of Jini and CORBI
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view A Comparison of Jini and CORBI and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view A Comparison of Jini and CORBI 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?