A Comparison of Jini and CORBA.ppt
《A Comparison of Jini and CORBA.ppt》由会员分享,可在线阅读,更多相关《A Comparison of Jini and CORBA.ppt(41页珍藏版)》请在麦多课文档分享上搜索。
1、A Comparison of Jini and CORBA,Andrew See Liyuan Yu Zhongying Wang Michael Collins,Outline,Introduction Motivation Overview Jini Background Design/Implementation CORBA Background Design/Implementation Comparisons Architectural Comparison Ease of use Performance Reusability,Motivation,Middleware is i
2、mportant 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 L
3、imited 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 & CORBA,Jini,Jini Background,Embedded hardware is network-centric, not disk-centric Networks are dynamic; so is Jini Object interface; not
4、network protocol Service: A network-accessible device that provides a useful function Client: Any user who requests services,Runtime Architecture,Federation of services No central authority Lookup Service Directory of currently available services Services can be searched by clients Execution of serv
5、ices is independent of Jini As backup, Jini also allows network protocol,How Jini Works,Separation 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, w
6、hich actually does the work Both local and remote objects share work,Separation of Interface & Implementation,Client is not required to know network protocol between proxy may communicate using RMI, CORBA, DCOM, etc.,Jini Program Design,Player One player for all Games Games Separate communication fr
7、om game specific rules Generalize common game tasks Add/remove a player Take a turn Update Player state,Design Games,Interface Game,Interface RemoteGame,Interface GameProxy,AbstractGame,BasicGameProxy,TurnBasedGame,GuessingGame,Hangman,Blackjack,HangmanProxy,BlackjackProxy,Design Players,Terminal an
8、d GUI based clients have same functionality.,Implementation,Server,Jini name service,Register,Lease,Remote Game,GameProxy,Player,Lookup,GameProxy,GameProxy,addPlayer, TakeTurn,addPlayer, TakeTurn,(local processing),Implementation Code samples,Creating the server-side object: Game impl = new Guessing
9、Game(); 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.),Pla
10、yer 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 c
11、ould be in the RemoteGame implementation, or the Game Proxy, or split between them.,CORBA,What 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 distrib
12、uted programs in different languages and different platforms to interact as though they were in a single programming language on one computer,Object Request Broker (ORB),A software component that mediates transfer of messages from a program to an object located on a remote host.,Network,Server,1,2,3
13、,execution,4,5,6,7,0,invocation,ORB,ORB,Client,0. Invocation ( with an object reference)1. Locate CORBA objects and marshal parameters2. Network Delay 3. Unmarshal parameters4. Method Execution5. Result marshal6. Network Delay 7. Result unmarshal,CORBA Object,CORBA Objects and IDL,Each CORBA object
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
2000 积分 0人已下载
下载 | 加入VIP,交流精品资源 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- ACOMPARISONOFJINIANDCORBAPPT
