190 likes | 296 Vues
Learn about using Ice middleware in the IARnet framework for improved security, scalability, and flexibility in distributed computing systems. Explore features like encryption, session management, and pluggable transports.
E N D
On Using Ice Middlewarein the IARnet Framework Oleg Sukhoroslov Institute for Systems Analysis, RAS, Moscow Distributed Computing Systems Laboratory
What is missing in IARnet • Securityencryption, data integrity, authentication, authorization, session management … • Full-featured interface definition languageuser-defined complex types, exceptions … • Advanced configuration and deploymentfile-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 …
WSDL vs. Slice <?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:operationsoapAction="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> // 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(); };
Current Implementation (Java) • Site implementation • Based on IceBox for Java • Two permissions verifiers: MD5PermissionsVerifier, SimpleSSLPermissionsVerifier • Web interface (embedded Jetty server) • Distributed site mode supports the use of IceGrid • Client API • 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( "StatelessCalculator@DCS.ISA.RU: 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, os@isa.ru