Docsity

Grid Computing - Distributed System - Lecture Notes | CS 696, Study notes of Computer Science

Partial preview of the text

Download Grid Computing - Distributed System - Lecture Notes | CS 696 and more Study notes Computer Science in PDF only on Docsity!

CS 696

Introduction to Grid Computing:

Lecture #14: ZSI

Mary Thomas San Diego State Tuesday, 20-Mar-

What is ZSI?

 Zolaris Soap Interface

 Focus is on parsing/generating SOAP

messages

 Intended to be used by other client/server

systems:

 provides limited dispatching capabilities

 3 primary functional aspects:

 SOAP Message Handling  Client-Server (invocation/dispatch)  Wsdl2py: web service development using WSDL

ZSI: Diverse Uses

 pyGridWare/pyGSI/pyGlobus:  http://dev.globus.org/wiki/Python_Core  Clarens: http://clarens.sourceforge.net/  Amazon:  http://developer.amazonwebservices.com/connect/kbcateg ory.jspa?categoryID=  Portals: Plone/Zope:  http://plone.org/documentation/how-to/import-soap-client- object  Mod_python (Apacher Web Server)  http://www.modpython.org/  Cheshire search engine:  http://www.cheshire3.org/

ZSI Capabilities

CORE  Data Conversions  Typcode classes: TC.TypeCode, TC.Any, TC.SimpleType  Basic Message Handling - ParsedSOAP  Serializing Data: SoapWriter module  Fetching remote data: resolvers module  Fault & Utilities modules  Client/Server:  client module  dispatch module  Web Services development:  Wsdl2py  Creates set of client (or server) codes from a WSDL document

ZSI Installation - Test code

 Since the most useful documentation and

How-To examples are the unit test codes,

you should study up on unit testing in python.

 Test directories:

 ZSI-2.0/tests - ZSI TC modules/SOAP  ZSI-2.0/tests/wsdl2py - Web service clients based on auto-generated code based on WSDL  ZSI-2.0//samples/Echo: client and server example  Warning: *** this example does not work ****

Unit Testing: a word

 Based on Erich Gamma's JUnit & Kent Beck's Smalltalk testing framework.  Test classes subclass the TestCase class of the unittest module, part of Python 2.x or greater  Test-case methods: individual test methods take no parameters, return no values  TestSuite : A test suite is a composite test consisting of a number of TestCases.  No use of try-catch --> if exception, this is a failure: let unittest catch them  You can set up ‘good’ and ‘bad’ test cases

ZSI Core Capabilities

 Data Conversions

 Typcode classes: TC.TypeCode, TC.Any, TC.SimpleType

 Basic Message Handling - ParsedSOAP

 Serializing Data: SoapWriter module

 Fetching remote data: resolvers module

 Fault & Utilities modules

 Client/Server: client and dispatch modules

ZSI TypeCode Classes

 Converts data between SOAP and Python

 ZSI supports Python numeric and string types

 All typecodes have prefix TC.

 Serialization control: fine grain

 pname: parameter name of XML element  All typcodes take pname arg  Can be a list: (namespace-URI, localname) or string  aname: attribute name: values override pname

Maps to SOAP Datatypes

SOAPpy Datatypes: SOAPpy.Types class anyType voidType stringType untypedType IDType NCNameType NameType ENTITYType IDREFType languageType NMTOKENType QNameType tokenType normalizedStringType CDATAType booleanType decimalType floatType doubleType durationType timeDurationType dateTimeType recurringInstantType timeInstantType timePeriodType timeType dateType gYearMonthType gYearType centuryType yearType gMonthDayType recurringDateType gMonthType monthType gDayType recurringDayType hexBinaryType base64BinaryType base64Type binaryType anyURIType uriType uriReferenceType NOTATIONType ENTITIESType IDREFSType NMTOKENSType integerType nonPositiveIntegerType non_Positive_IntegerType negativeIntegerType negative_IntegerType longType intType shortType byteType nonNegativeIntegerType non_Negative_IntegerType unsignedLongType unsignedIntType unsignedShortType unsignedByteType positiveIntegerType positive_IntegerType compoundType structType headerType bodyType arrayType typedArrayType faultType SOAPException RequiredHeaderMismatch MethodNotFound AuthorizationFailed MethodFailed

ZSI.parse: SOAP Message Handling

 ParsedSOAP: convert the text to a DOM tree and parse SOAP elements.  Instance data:  reader -- the DOM reader  dom -- the DOM object  ns_cache -- dictionary (by id(node)) of namespace dictionaries  id_cache -- dictionary (by XML ID attr) of elements  envelope -- the node holding the SOAP Envelope  header -- the node holding the SOAP Header (or None)  body -- the node holding the SOAP Body  body_root -- the serialization root in the SOAP Body  data_elements -- list of non-root elements in the SOAP Body  trailer_elements -- list of elements following the SOAP body

ZSI Core Capabilities

 Data Conversions

 Typcode classes: TC.TypeCode, TC.Any, TC.SimpleType

 Basic Message Handling - ParsedSOAP

 Serializing Data: SoapWriter module

 Fetching remote data: resolvers module

 Fault &Utilities modules

 Client/Server: client and dispatch modules

ZSI Core Capabilities

 Data Conversions

 Typcode classes: TC.TypeCode, TC.Any, TC.SimpleType

 Basic Message Handling - ParsedSOAP

 Serializing Data: SoapWriter module

 Fetching remote data: resolvers module

 Fault &Utilities modules

 Client/Server: client and dispatch modules

resolvers module: fetch data

 SOAP message parsing

 Class NetworkResolver

 A resolver that support strings and XML.

 Class MIMEResolver

 Multi-part MIME resolver -- SOAP attachments.