1 / 27

RMI CORBA

RMI CORBA. Matt. RMI VS CORBA. J2EE. Sample Application. RMI-IIOP. Tools. New rmic compiler Converts Java Interfaces to IDL Generates IIOP Stubs and tie classes New idlj compiler Maps IDL to Java Generates IIOP Stubs and tie classes. tie class. RMI Java Server. stub class.

deva
Download Presentation

RMI CORBA

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RMICORBA Matt

  2. RMI VS CORBA

  3. J2EE

  4. Sample Application

  5. RMI-IIOP

  6. Tools • New rmic compiler • Converts Java Interfaces to IDL • Generates IIOP Stubs and tie classes • New idlj compiler • Maps IDL to Java • Generates IIOP Stubs and tie classes

  7. tie class RMI Java Server stub class rmic -iiop Complier IIOP RMI Java Client RMI to RMI-IIOP RMI Implementation

  8. RMI to RMI-IIOP • Converting Server • Extend your implementation class from PortableRemoteObject rather than UnicastRemoteObject: • Use JNDI naming service rather than rmiregistry. • Converting Client • Use JNDI naming service to locate object • Use PortableRemoteObject.narrow() method rather than Java type cast.

  9. IDL to RMI-IIOP • Write Java IDL • Use idlj compiler • Generates Java Mappings • Generates stubs and skeletons • Implement Server • Run Server and register with JNDI service • Develop Client and test

  10. RMI-IIOP • With RMI and CORBA, programmers face a cruel choice: they must decide between RMI, with its easy programming features, and CORBA, with its broad interoperability. • With RMI-IIOP, programmers can create applications in RMI that include CORBA connections • RMI over IIOP (RMI-IIOP hereafter), developed jointly by IBM and Sun, is a new version of RMI (Remote Method Invocation) for IIOP (Internet Inter-ORB Protocol) that combines RMI's easy programming features with CORBA's interoperability. • RMI and CORBA have developed independently as distributed-objects programming models. RMI, a foundation of the EJB and Jini technologies, was introduced as a Java-based, easy-to-use programming model for distributed objects. CORBA (the Common Object Request Broker Architecture), defined by the OMG (Object Management Group), is a well-known distributed-object programming model that supports a number of languages. The IIOP protocol connects CORBA products from different vendors, ensuring interoperability among them. RMI-IIOP is, in a sense, a marriage of RMI and CORBA.

  11. RMI-IIOP • 與J2EE 1.3相容的server都有RMI-IIOP實作功能,可以協助處理各種網路問題

  12. Before RMI-IIOP

  13. It used to be difficult to choose between RMI (JRMP) and CORBA when starting a new project. If you selected RMI (JRMP), you got easy programming, but lost interoperability across multiple languages. • If you selected CORBA, you got interoperability, but faced a more daunting programming task. Please connect the two

  14. Java RMI clients can access RMI/IIOP objects through ordinary RMI interfaces. CORBA clients need equivalent interfaces in IDL.

  15. Java RMI clients can access RMI/IIOP objects implemented as CORBA objects through ordinary RMI interfaces. CORBA clients and RMI/IIOP object implementations need equivalent interfaces in IDL.

  16. Example of interoperability scenario between different vendors of EJB containers.

  17. RMI/IIOP architecture.

  18. RMI

  19. RMI Architecture

  20. Java IDL

  21. CORBA

  22. CORBA • CORBA (Common Object Request Broker Architecture) 是在1992年由OMG(Open Management Group) 組織提出的。那時的分佈式應用環境都採用Client/Server架構,CORBA的應用很大程度的提高了分佈式應用軟體的開發效率。 • CORBA的IDL採用類C++的定義,是公開的規範 • IIOP是Internet CORBA互換性的通訊協定 • Object Request Broker (ORB)是CORBA之間網路傳遞的基礎,ORB負責找到服務方法的物件,負責處理參數傳遞與傳回結果

  23. CORBA • IDL用來發展與整合CORBA物件的服務,IDL是一個可攜型的規格語言。使用IDL編譯器可以產生前面所提到的Stub和Skeleton程式碼,並且可以對應許多高階程式語言(如:Java、Smalltalk、C++等等) • 有了IDL,CORBA應用程式可以是由不同程式語言撰寫的 • IDL與Java結合

More Related