A High-Level Toolkit for Development of Distributed
Download
Report
Transcript A High-Level Toolkit for Development of Distributed
On Using Ice Middleware
in the IARnet Framework
Oleg Sukhoroslov
Institute for Systems Analysis, RAS, Moscow
Distributed Computing Systems Laboratory
What is missing in IARnet
Security
encryption, data integrity, authentication,
authorization, session management …
Full-featured interface definition language
user-defined complex types, exceptions …
Advanced configuration and deployment
file-based service configuration, grid site model
IARnet2
Built-in security
Scalable site model, flexible configuration
Avoids unnecessary complexity
IARnet1:
Pluggable transports: CORBA, Web Services, Ice
IARnet2:
Based on a single middleware technology, Ice
Ice
(Internet Communications Engine)
Object middleware technology developed by ZeroC, Inc
Supports programming of servers and clients in C++, Java, C#,
Visual Basic, Python, PHP (client only), Ruby (client only)
Support for various operating systems and embedded devices
Available under GPL
Slice - full-featured interface definition language
Ice core - communication library, highly efficient protocol,
compression, TCP/UDP, thread pool for multi-threaded servers
IceSSL - dynamic SSL transport plug-in for the Ice core
IceBox - container for Ice services that are dynamically loaded as a
DLL, shared library, or Java class
IceGrid - sophisticated server configuration, deployment and
activation tool for management of complex server infrastructure
Glacier - firewall solution for Ice
Messaging service, persistence solution, patching service …
Web Services vs. Ice
Web Services
Ice
Object-oriented
development
- (WSRF?)
+
Interface definition
language
WSDL is too complex to write
manually
Slice is easy to write and read
Protocol
performance
SOAP is slow, wasteful of
bandwidth, puts load on CPU
Binary protocol, ~100x better
latency and throughput
Maturity
Large number of WS-* specs,
some are still “work in progress”
Stable, well-documented API and
protocol
Available
implementations
Many, but each vendor uses its
own proprietary API and tools.
Lack of WSRF implementations.
Single. Has well-documented
language mappings, so portability
can be achieved.
Standards and
Industry support
+
- Proprietary (but committed to
open source)
<?xml version="1.0"?>
<definitions name="StockQuote"
targetNamespace="http://example.com/stockquote.wsdl"
xmlns:tns="http://example.com/stockquote.wsdl"
xmlns:xsd1="http://example.com/stockquote.xsd"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<types>
<schema targetNamespace=“http://example.com/stockquote.xsd”
xmlns="http://www.w3.org/2000/10/XMLSchema">
<element name="TradePriceRequest">
<complexType>
<all>
<element name="tickerSymbol" type="string"/>
</all>
</complexType>
</element>
<element name="TradePrice">
<complexType>
<all>
<element name="price" type="float"/>
</all>
</complexType>
</element>
</schema>
</types>
<message name="GetLastTradePriceInput">
<part name="body" element="xsd1:TradePriceRequest"/>
</message>
<message name="GetLastTradePriceOutput">
<part name="body" element="xsd1:TradePrice"/>
</message>
<portType name="StockQuotePortType">
<operation name="GetLastTradePrice">
<input message="tns:GetLastTradePriceInput"/>
<output message="tns:GetLastTradePriceOutput"/>
</operation>
</portType>
<binding name="StockQuoteSoapBinding“ type="tns:StockQuotePortType">
<soap:binding style="document“ transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetLastTradePrice">
<soap:operation soapAction="http://example.com/GetLastTradePrice"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="StockQuoteService">
<documentation>My first service</documentation>
<port name="StockQuotePort" binding="tns:StockQuoteBinding">
<soap:address location="http://example.com/stockquote"/>
</port>
</service>
</definitions>
WSDL vs. Slice
// My first service
interface StockQuoteService
{
float GetLastTradePrice(string tickerSymbol);
};
Basic Concepts
IARnet2 Service – an Ice object, which
provides access to some scientific tool or
application
Described by means of Slice language
Implemented as an Ice servant
IARnet2 Client – an Ice application, which
accesses IARnet2 services on behalf of a
user or another service
IARnet2 Site
A collection of services, which are installed and managed
by some organization or person.
• Provides a unified interface for accessing service
• Can scale from a single computer to server pool
Site Interface
interface Site {
Session* createSession(string userId, string password)
throws PermissionDeniedException,
CannotCreateSessionException;
Session* createSessionFromSecureConnection()
throws PermissionDeniedException,
CannotCreateSessionException;
idempotent long getSessionTimeout();
};
Session Interface
interface Session {
Object* getService(string serviceId)
throws ServiceNotFoundException,
PermissionDeniedException;
idempotent void keepAlive();
void destroy();
};
Site Architecture
Site Deployment Modes
Simple VO Setup
Current Implementation (Java)
Site implementation
Based on IceBox for Java
Two permissions verifiers:
MD5PermissionsVerifier, SimpleSSLPermissionsVerifier
Client API
Web interface (embedded Jetty server)
Distributed site mode supports the use of IceGrid
Session creation
Keeping sessions alive
Obtaining service proxies
Backwards compatible with IARnet
Service Programming Model
Define service interface in Slice
(or start with an existing definition)
Compile Slice to Java code
Implement the service as a Java class
Deploy the service
Edit server configuration file (2 lines minimum)
Drop jar file into the server /lib directory
Client Programming Model
// create client session
ClientSession session = new ClientSessionImpl(communicator());
// create service reference
ServiceReference ref = ServiceReferenceFactory.create(
"[email protected]: ssl -h dcs.isa.ru -p 7070",
communicator());
// get service
StatelessCalculatorPrx calc =
session.getService(ref,StatelessCalculatorPrx.class);
// invoke service
double result = calc.add(1, 2);
Conclusion
The use of Ice made it possible to provide with a
minimal effort all the needed functionality and
ensure high performance
The programming model was improved, while
keeping it as simple as possible
IARnet2 site supports grid site model and can scale
from a single desktop to server pool
Working on top of existing Grid infrastructure:
Leverage existing PKI infrastructure and VO membership
services
Building IARnet2 services, which use Grid infrastructure for
submitting batch jobs and data movement
Thank you!
For more information:
Oleg Sukhoroslov, [email protected]
Basic IARnet2 Components