Institute of Computer Science AGH Towards Multilanguage and Multiprotocol Interoperability: Experiments with Babel and RMIX Maciej Malawski, Daniel Harężlak, Marian Bubak Institute of Computer Science AGH, Kraków, Poland ACC CYFRONET AGH, Kraków, Poland
Institute of Computer Science AGH 2 Outline Motivation: multiple languages and protocols in Grids Background: MOCCA = H2O + CCA RMIX multiprotocol library BABEL multilanguage interoperability tool Combining RMIX and Babel
Institute of Computer Science AGH 3 Motivation Grids are heterogeneous Multiple programming languages – in single application –Java for middleware –C for system programming –FORTRAN for computing –Python for scripting Multiple protocols – in single application –High speed local networks (Myrinet) –TCP/SSL/TLS in WAN –SOAP for loosely coupled message exchange –Overlay P2P networks for traversing private network boundaries (NATs) Context: MOCCA component framework
Institute of Computer Science AGH 4 Background: CCA and H2O Common Component Architecture (CCA) Component standard for HPC Uses and provides ports described in SIDL Support for scientific data types Existing tightly coupled (CCAFFEINE) and loosely coupled, distributed (XCAT) frameworks H2O Distributed resource sharing platform Providers setup H2O kernel (container) Allowed parties can deploy pluglets (components) Separation of roles: decoupling –Providers from deployers –Providers from each other RMIX: efficient multiprotocol RMI extension
Institute of Computer Science AGH 5 Example Scenarios of H2O 1. Provider = deployer e.g. resource = legacy application 2. Reseller:= developer = deployer e.g. computational service offered within a grid system 3. Client = deployer e.g. client runs custom distributed application on shared resources
Institute of Computer Science AGH 6 RMIX Communication Substrate Extensible framework Remote Method Invocations paradigm Pluggable protocol providers Multiple protocols supported –JRMPX, ONC-RPC, SOAP Request-Response and Asynchronous calls Combines simplicity, flexibility, and performance ONC-RPC Web Services SOAP clients JXTA RMIX RMIX XSOAP RMIX RPCX RMIX JXTA RMIX JRMPX Java Service
Institute of Computer Science AGH 7 RMIX: Multiple Protocols Protocol switching Protocol negotiation Various protocol stacks for different situations –SOAP: interoperability –SSL: security –ARPC, custom (Myrinet, Quadrics): efficiency Pluggable transport layer: support for JXTA P2P network Harness Kernel Internet security firewall efficiency H2O Kernel
Institute of Computer Science AGH 8 MOCCA Implementation in H2O Each component running in separate pluglet –Facilitated deployment and security Thanks to H2O kernel security mechanisms, multiple components may run without interfering Using RMIX for communication – efficiency, multiprotocol interoperability Flexibility and multiple scenarios – as in H2O MOCCA_Light: pure Java implementation - need for supporting multilanguage components
Institute of Computer Science AGH 9 Multilanguage Solution - Babel SIDL – Scientific Interface Definition Language –Standard for CCA Components –Supports arrays and complex types –Focus on interfaces Babel: –SIDL parser –Code generator –Runtime library Intermediate Object Representation (IOR) –Core of Babel object –Array of function pointers –Generated code in C package example version 1.2 { class Hello { string hello( in string hello); } // user defined non-static methods: /** * Method: hello[] */ public java.lang.String hello_Impl ( /*in*/ java.lang.String hello ) { // DO-NOT-DELETE splicer.begin(example.Hello.hello) // Insert-Code-Here {example.Hello.hello} (hello) return Server says: + hello; // DO-NOT-DELETE splicer.end(example.Hello.hello) } /** * Method: hello[] */ char* example_Hello_hello( /*in*/ example_Hello self, /*in*/ const char* hello);
Institute of Computer Science AGH 10 Currently: Babel for Local Applications All Babel objects in one process Implemented in CCAFFEINE framework Existing multilanguage CCA components – see CCA tutorial Java application Fortran native library SIDL C++ native library SIDL Babel IOR
Institute of Computer Science AGH 11 Our Solution Babel + RMIX Implementation of Babel RMI extensions – generic mechanism of method invocation (reflection) – Dynamic loading of communication library – No need for code generation and compilation Java application Fortran native library SIDL C++ native library SIDL Babel IOR RMIX library Babel IOR Network SIDL RMIX library SIDL
Institute of Computer Science AGH 12 sidl.iosidl.rmi Class Diagram > InstanceHandle > Invocation > ServerInfo > Response RmixInstanceHandleRmixSerializerRmixDeserializerRmixServerInfoRmixInvocationRmixResponse > Deserializer > Serializer rmix
Institute of Computer Science AGH 13 Client-side Invocation
Institute of Computer Science AGH 14 Server-side Invocation
Institute of Computer Science AGH 15 Conclusions Combining Babel with RMIX will offer distributed application flexibility Now: beginning of implementation phase Applicable to MOCCA framework, but the solution is general –Interfacing legacy systems –Interfacing Web services More interoperability? – multiple component standards...
Institute of Computer Science AGH 16 References Maciej Malawski, Dawid Kurzyniec, and Vaidy Sunderam. MOCCA – towards a distributed CCA framework for metacomputing, 10th International Workshop on High-Level Parallel Programming Models and Supportive Environments (HIPS2005) at IPDPS H2O Project homepage: CCA Forum: –CCA Specification –Tutorial Babel: MOCCA homepage: –Download binary and source distribution –README