Upload
molly-bird
View
218
Download
4
Tags:
Embed Size (px)
Citation preview
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 AGH2
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 AGH3
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 AGH4
Background: CCA and H2OCommon 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
ContainerProvider host
Deploy Lookup& use
Provider Client
<<create>>
B
A
Provider
<<create>>
A
B
Container
Lookup& use
Client
DeployProvider,
Client,or Reseller
Provider host
Traditional model
Proposed model
ContainerProvider host
Deploy Lookup& use
Provider Client
<<create>>
BB
AA
Provider
<<create>>
AA
BB
Container
Lookup& use
Client
DeployProvider,
Client,or Reseller
Provider host
Traditional model
Proposed model
Institute of Computer Science AGH5
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
Deploy
B
A
LegacyApp
DeployProvider
AClient
Repository
A BReseller
C
Deploy
Anativecode
ProviderClient
Repository
ABDeveloper
C
ProviderClient
B
A
...
Registration and Discovery e-mail,phone, ...JNDIUDDI LDAP DNS GIS ...
B
Publish Find
Provider
Institute of Computer Science AGH6
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-RPCWeb Services
SOAP clients
JXTA
RMIX
RMIXXSOAP
RMIXRPCX
RMIX JXTA
RMIXJRMPX
Java
Service
Institute of Computer Science AGH7
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
efficiency
H2O Kernel
H2O Kernel
H2O Kernel H2O Kernel
H2O Kernel
Institute of Computer Science AGH8
MOCCA Implementation in H2O
ComponentPlugletComponent
Pluglet
CCAComponent
ComponentPluglet
CCAComponent
BuilderPluglet
H2O Kernel
BuilderService
Invoke
Manage
Builder
CCACCA
Pluglet Pluglet
Builder Builder
CCACCA
Pluglet Pluglet
BuilderBuilder
CCACCA
Pluglet Pluglet
Builder
MoccaMainBuilder
MoccaMainBuilder
• 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 AGH9
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 ObjectRepresentation (IOR)
– Core of Babel object
– Array of function pointers
– Generated code in C
C
C++
f77
f90
Python
Java
Babel
C
C++
f77
f90
Python
Java
Babel
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 AGH10
Currently: Babel for Local Applications
• All Babel objects in one process
• Implemented in CCAFFEINE framework
• Existing multilanguage CCA components – see CCA tutorial
Javaapplication
Fortrannativelibrary
SIDL
C++nativelibrary
SIDL
Babel IOR
Babel IOR
Institute of Computer Science AGH11
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
Javaapplication
Fortrannativelibrary
SIDL
C++nativelibrary
SIDL
Babel IOR
RMIXlibrary
Babel IOR
Network
SIDL
RMIXlibrary
SIDL
Institute of Computer Science AGH12
sidl.io
sidl.rmi
Class Diagram
<<interface>>InstanceHandle
<<interface>>Invocation
<<interface>>ServerInfo
<<interface>>Response
RmixInstanceHandle
RmixSerializer RmixDeserializer
RmixServerInfo
RmixInvocation RmixResponse
<<interface>>Deserializer
<<interface>>Serializer
rmix
Institute of Computer Science AGH13
Client-side Invocation
Institute of Computer Science AGH14
Server-side Invocation
Institute of Computer Science AGH15
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 AGH16
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’2005 http://mathcs.emory.edu/dcl/h2o/papers/h2o_hips05.pdf
• H2O Project homepage: http://www.mathcs.emory.edu/dcl/h2o/• CCA Forum: http://www.cca-forum.org
– CCA Specification– Tutorial
• Babel: http://www.llnl.gov/CASC/components/• MOCCA homepage: http://www.icsr.agh.edu.pl/mambo/mocca
– Download binary and source distribution– README