Outline SOAP in addition to REST From RPC to SOAP: RPC From RPC to SOAP:

Outline SOAP in addition to REST From RPC to SOAP: RPC From RPC to SOAP: www.phwiki.com

Outline SOAP in addition to REST From RPC to SOAP: RPC From RPC to SOAP:

Henderson, Khali, Group Editor has reference to this Academic Journal, PHwiki organized this Journal RESTINF 123 – Software architecturetdebeauv@uci.edu1OutlineSOAP in addition to RESTREST constraints in addition to gainsREST guidelines2SOAP in addition to RESTSimple Object Access ProtocolRepresentational State Transfer3

Bethany College Kansas US www.phwiki.com

This Particular University is Related to this Particular Journal

From RPC to SOAP: RPCPass remote procedure name in addition to argumentsExpect a return valueProcedure signature is implicitIf you change the signature, people have no way to know why it’s not working anymoreIt’s about (function) namesWhereas REST is about st in addition to ard verbs like GET, POST, etc.4From RPC to SOAP: SOAP1998: Simple Object Access Protocol2000: Web Service Description Language (WSDL) uses SOAP as underlying protocol, cf SOA slidesSOAP = XML RPC done “right”Long/verbose structured XML messagesVerbosity != metadata5SOAP message6POST /InStock HTTP/1.1Host: www.example.orgContent-Type: application/soap+xml; charset=utf-8Content-Length: 299SOAPAction: “http://www.w3.org/2003/05/soap-envelope” IBM

Metadata vs verbosity7There are two kinds of pain. The sort of pain that makes you strong, or useless pain that is only suffering.Metadata vs verbosity8Pay attention to the fine print metadata. It’s far more important than the selling price data itself.Amazon uses both REST in addition to SOAP Amazon has both SOAP in addition to REST interfaces to their web services, in addition to 85% of their usage is of the REST interface (2003)http://oreilly.com/pub/wlg/3005 9

REST in addition to SOAPThey happened concurrentlySOAP: 1998REST: 2000SOAP = envelope, REST = postcardSOAP derived from RPCREST is not a move against SOAPREST is very complexBut it looks simpler than SOAP10REST HistoryHypertext1945 memex (Vannevar Bush)1967 hypertext (Project Xanadu)Internet1969 ARPANET (army)1992: WWW = Internet + hypertext2000: REST = reverse-engineer/document the WWW architectural styleHTTP is not m in addition to atory as long as REST, but it helps11SOAP vs RESTSOAP is verbose: large overhead of metadata in addition to boilerplate textSOAPREST12 12345 GET http://www.acme.com/phonebook/UserDetails/12345

Solutions to SOAP’s verbosityMTOM: Message Transmission Optimization MechanismEncode/compress XML into binaryXOP: XML-binary Optimized PackagingTo encode/decode MTOMTLDR: Binary-encoded XML over HTTPBut HTTP = hypertext transfer protocol131415

REST constraintsRepresentational State Transfer16Reminder: Architectural styleSet of constraintsConstraints induce propertiesDesirable or undesirableDesign trade-offsREST = architectural style of the WWW17Resource = in as long as mation, data18We have great resources at our disposal.

REST is made of several stylesClient-ServerStatelessCacheLayeredCode on dem in addition to Uni as long as m InterfaceThese styles are not always inter-compatibleBut they are in the case of the WWW19Deriving REST from other styles20http://roy.gbiv.com/talks/200804-REST-ApacheCon.pdfNo style1 Client-serverCf week 2Separation of concerns: client display vs server logicDisplay is client-side: clients can have different UIsEach website has a serverSame client (browser) can access multiple servers21

2 Stateless interactionsAKA context-free interactionsStateless interaction does not mean “no data in the server”The server does not store any client-specific in as long as mation between two requestsState is client-side or in a database22Stateful example: SMTP23tagus: crista$ telnet smtp.ics.uci.edu 25Trying Connected to smtp.ics.uci.edu.Escape character is ‘^]’.220 david-tennant-v0.ics.uci.edu ESMTP mailer ready at Mon, 5 Apr 2010 17:15:01 -0700’HELO smtp.ics.uci.edu250 david-tennant-v0.ics.uci.edu Hello barbara-wright.ics.uci.edu [], pleased to meet youMAIL FROM:250 2.1.0 Sender okRCPT TO:250 2.1.5 Recipient okDATA354 Enter mail, end with “.” on a line by itselftest.250 2.0.0 o360F1Mo029280 Message accepted as long as deliveryQUIT221 2.0.0 david-tennant-v0.ics.uci.edu closing connectionConnection closed by as long as eign host.Gains from statelessnessImmune to server restart/migrationServer restart = lose all dataBut stateless = no data to lose!No server affinityClient requests can be processed by ANY server, not just one particular serverScalabilityServer never knows if/when client sends its next requestSo stateful servers timeout the sessions of clients with long inter-request timesStateless servers don’t have any memory management issues24

Henderson, Khali XChange Group Editor www.phwiki.com

Losses from statelessness Client is less efficientServer needs to pull data as long as every requestPulling data is straight as long as ward when this data is a static web page (most of the WWW in the 90s)How do you authenticate usersCookies (not good)External auth in addition to directory services253 CachingOptionalStore data locally so I don’t have to retrieve itIn clients, in servers, or in intermediaries (cf layered constraint)Reduces latencyImproves efficiency in addition to scalabilityBut degrades reliability (stale data)264 LayeredIntermediaries between client in addition to serverProxies, such as nginxCachesContent Delivery Network, such as AkamaiWeb accelerator, such as CloudFlarePros: ability to balance load (improves scalability), can reduce latency (when cache hits)Cons: can add latency (when cache misses)27

28Do you know what I like about people intermediaries They stack so neatly.Proxy as long as load balancing: nginx29Intermezzo: ISPsInternet Service Providers (ISP): COX, Comcast Verizon, UCIWhen a client requests content, it goes through:The client’s ISPIntermediary ISP 1Intermediary ISP 2The server’s ISPThe server delivers the contentMany hops = lots of delay30

REST vs Linked DataLinked data A data modelProposed by Berners-LeeREST An interaction modelProposed by Fielding49Taylor’s REST principlesAny in as long as mation is a resource, named by an URL. (uni as long as m interface)Resource representation is accompanied by metadata about the representation. (uni as long as m interface, code on dem in addition to )Interactions are context-free. (stateless)Small set of methods. Each method can be applied to any resource. The result of a method is a representation.Idempotent operations help caching. (cache)Intermediaries use metadata from requests or responses to filter, redirect, or modify representations. This is transparent to client in addition to server. (layered, cache)50For you to read/watchhttp://www.infoq.com/articles/rest-introductionhttp://rest.elkstein.org/https://groups.yahoo.com/neo/groups/rest-discuss/conversations/topics/5841https://www.youtube.com/watchv=e2PyeXRwhCEhttps://www.cloudflare.com/overview51

Henderson, Khali Group Editor

Henderson, Khali is from United States and they belong to XChange and they are from  Phoenix, United States got related to this Particular Journal. and Henderson, Khali deal with the subjects like Telecommunications

Journal Ratings by Bethany College Kansas

This Particular Journal got reviewed and rated by Bethany College Kansas and short form of this particular Institution is US and gave this Journal an Excellent Rating.