170 likes | 319 Views
ELF Developers Forum. Kick-off meeting - 5 November 2004. Introduction to the forum. Sam Easterby-Smith - CETIS se5@bolton.ac.uk. Aims and objectives. Fostering the ELF developer community A chance to learn from each others experiences Cut across the current boundaries
E N D
ELF Developers Forum • Kick-off meeting - 5 November 2004
Introduction to the forum • Sam Easterby-Smith - CETIS • se5@bolton.ac.uk
Aims and objectives Fostering the ELF developer community A chance to learn from each others experiences Cut across the current boundaries Enabling “orchestration” of the various services Lots of plugging and festing Contributing to developing the ELF itself
Who’s framework is it anyway? • ELF / IE / GRID / eResearch • JISC / DEST / Industry Canada / ADL / etc
Why Webservices? • Scott Wilson / Sam Easterby-Smith
Why services? • “Layers of abstraction” • “Breaking down monoliths” • “Enabling the pick-and-mix MLE” • “Fostering pedagogic diversity”
Why not? Trying to simplify complexity... Reinventing things which aren’t broken... It’s not all there yet... Lack of maturity… 5 missing pieces of SOA - Brent Sleeper Security Orchestration Legacy support Reliability Semantics But Scott will talk about that...
How?There’s more than one way to do it • SOAP - the oo way • REST - the resource-oriented way • XML-RPC - another way • WSDL - protocol independent description of an interface (either way!!) • WS-I (a profile of SOAP/WSDL)
REST(a style not a standard) • “Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use.” • Roy Thomas Fielding PhD • Web-ish - delivery of interlinked resources • While REST is not a standard, it does use standards: • HTTP/URL/XML/HTML/GIF/JPEG/etc
REST examples • The web itself • or Atom: <?xml version="1.0" encoding="iso-8859-1"?> <feed version="0.3" xmlns="http://purl.org/atom/ns#"> <link rel="next" type='application/x.atom+xml' title="Next 20 Entries" href="http://.."/> <link rel="prev" type='application/x.atom+xml' title="Previous 20 Entries" href="http://.."/> <link rel="comments" type='application/x.atom+xml' title="Last 20 Comments" href="http://.."/> <link rel='service.post' type='application/x.atom+xml" title="Create a new post on intertwingly.net" href=".."/> <entry> <id>http://example.org/blog/1630.atom</id> <link rel="alternate" type="text/html" href="http://example.org/blog/1630.html" /> <link rel="service.post" type='application/x.atom+xml' href="/blog/1630.atom-new-comment" title="Add a comment."/>
SOAP • Simple Object Access Protocol • (no-longer an acronym) • “SOAP Version 1.2 (SOAP) is a lightweight protocol intended for exchanging structured information in a decentralized, distributed environment. It uses XML technologies to define an extensible messaging framework providing a message construct that can be exchanged over a variety of underlying protocols. The framework has been designed to be independent of any particular programming model and other implementation specific semantics.”
Soap Example • POST /InStock HTTP/1.1 • Host: www.stock.org • Content-Type: application/soap+xml; charset=utf-8 • Content-Length: nnn • <?xml version="1.0"?> • <soap:Envelope • xmlns:soap="http://www.w3.org/2001/12/soap-envelope" • soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> • <soap:Body xmlns:m="http://www.stock.org/stock"> • <m:GetStockPrice> • <m:StockName>IBM</m:StockName> • </m:GetStockPrice> • </soap:Body> • </soap:Envelope> Request HTTP/1.1 200 OK Content-Type: application/soap; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.stock.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope> Response
WSDLWeb Services Description Language • Platform/protocol/style/etc independent (not just SOAP!) • Describes the API - or available calls and other gubbins associated with a given service. • Well supported by many programming languages (Greatly speeds implementation…)
WSDL Example... <wsdl:import namespace="http://www.imsglobal.org/specs/imsPDPAbstractSyncv1p0.wsdl" location="imsPDPAbstractSyncv1p0.wsdl"/> <wsdl:binding name="PDPServiceSyncSoap" type="abs:PDPServiceSync"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <!-- > createLearnerByProxy() > IN: > <none>; > OUT: > LearnerId, -> iaf:IdentifierDType --> <wsdl:operation name="createLearnerByProxy"> <soap:operation soapAction="http://www.imsglobal.org/soap/pdp/createLearnerByProxy" style="document"/> <wsdl:input> <soap:body use="literal" parts="parameters"/> <soap:header message="abs:createLearnerByProxyRequest" part="headerInfoRequest" use="literal" wsdl:required="true"/> </wsdl:input> <wsdl:output> <soap:body use="literal" parts="response"/> <soap:header message="abs:createLearnerByProxyResponse" part="headerInfoResponse" use="literal" wsdl:required="true"/> </wsdl:output> </wsdl:operation>
XML-RPC • “Remote Procedure Calls” • A bit like SOAP (and closely related) • Simple encoding of parameters into XML
XML-RPC example • use Frontier::Client; • $server = Frontier::Client->new(url => 'http://betty.userland.com/RPC2'); • $name = $server->call('examples.getStateName', 41); • print "$name\n"; <methodCall> <methodName>sample.sumAndDifference</methodName> <params> <param><value><int>5</int></value></param> <param><value><int>3</int></value></param> </params> </methodCall>
WS-I • A tidied-up profile of SOAP and WSDL • Adds constraints which may or may not be useful… • Then there are the other ws-complicated things: