Remote Strategy Calls and Web Administrations.

Uploaded on:
Category: Fashion / Beauty
Making a SOAP Call. To execute a call to benefit PlaceOrder: POST/PlaceOrder HTTP/1.1 ... another SOAP message with the arrival information values, much like the ...
Slide 1

Remote Procedure Calls and Web Services Zachary G. Ives University of Pennsylvania CIS 455/555 – Internet and Web Systems March 10, 2014

Slide 2

Today Reminder HW2 Milestone 2 due this evening HW3 "pre-discharge" today

Slide 3

What Does MapReduce Do Well? What are its qualities? Shouldn\'t something be said about shortcomings?

Slide 4

MapReduce is a Particular Programming Model … But it\'s not particularly broad (however things like Pig Latin enhance it) Suppose we have self-ruling application segments that desire to convey We\'ve as of now seen a couple of techniques: Request/reaction from customer to server HTTP itself Asynchronous messages Router "tattle" conventions P2P "finger tables", and so on. Are there general instruments and standards? (Obviously!) … Let\'s first take a gander at what happens on the off chance that we require all together informing

Slide 5

Communication Mechanisms We\'ve as of now seen a couple: Request/reaction from customer to server HTTP itself Asynchronous messages Router "tattle" conventions P2P "finger tables", and so on. Are there general systems and standards? (Obviously!) … Let\'s first take a gander at what happens in the event that we require all together informing

Slide 6

Message-Queuing Model (1) Four blends for inexactly coupled correspondences utilizing lines. 2-26

Slide 7

Message-Queuing Model (2) Basic interface to a line in a message-lining framework.

Slide 8

General Architecture of a Message-Queuing System (1) The relationship between line level tending to and arrange level tending to.

Slide 9

General Architecture of a Message-Queuing System (2) The general association of a message-lining framework with switches. 2-29

Slide 10

Benefits of Message Queueing Allows both synchronous (blocking) and offbeat (surveying or occasion driven) correspondence Ensures messages are conveyed (or possibly intelligible) in the request got The premise of numerous value-based frameworks e.g., Microsoft Message Queue (MMQ), IBM MQseries, and so forth

Slide 11

Some Common Modes of Building Distributed Applications Data-serious: XQuery (get XML from various destinations, create new XML) Turing-complete practical programming dialect Good for Web Services; very little backing for I/O, and so on. MapReduce (worked over DHT or disseminated document framework) Single channel (guide), trailed by single accumulation (lessen) Languages over it: Sawzall, Pig Latin, Dryad, … Message passing/demand reaction: e.g., over a DHT, attachments, or message line Communication by means of offbeat messages Processing in message handler circle Function calls: Remote strategy call/remote technique summon

Slide 12

Fully Synchronous Request/Response: Remote Procedure Calls Remote methodology calls have been around always, including: COM+ CORBA Java RMI The fundamental thought: put a capacity somewhere else in the framework, bring in dispersed design however utilizing standard dialects, strategies A RPC API characterizes an organization for: Initiating an approach a specific server, by and large dependably Sending parameters ( marshaling ) to the server Receiving an arrival worth, which may require marshaling too And a RPC call is synchronous (i.e., it for the most part pieces)

Slide 13

A Remote Procedure Call Visualized server sits tight for req. capacity server is occupied RPC Server ask for RPC Client working customer squares time

Slide 14

How RPC Generally Works You compose an application with a progression of capacities One of these capacities, F , will be conveyed remotely You call a "stub generator" A guest stub copies the capacity F : Opens an association with the server Requests F , marshaling all parameters Receives F \'s return status and parameters A server stub imitates the guest: Receives a solicitation for F with parameters Unmarshals the parameters, summons F Takes F \'s return status (e.g., assurance flaw), return esteem, and marshals it back to the customer

Slide 15

Passing Value Parameters Steps required in doing remote calculation through RPC 2-8

Slide 16

RPC Components Generally, you have to compose: Your capacity, in a good dialect An interface definition , undifferentiated from a C header record, so other individuals can program for F without having its source Generally, programming will take the interface definition and create the proper stubs (In the instance of Java, RMIC knows enough about Java to run specifically on the source document) The server stubs will for the most part keep running in some sort of daemon procedure on the server Each capacity will require an internationally one of a kind name or GUID

Slide 17

Parameter Passing Can Be Tricky Because of References The circumstance when passing an item by reference or by worth. 2-18

Slide 18

What Are the Hard Problems with RPC? Esp. Between Language RPC? Determining distinctive information designs between dialects (e.g., Java versus Fortran clusters) Reliability, security Finding remote systems in any case Extensibility/practicality (Some of these might look commonplace from when we discussed information trade!)

Slide 19

Web Services Goal: give a foundation to associating segments, building applications in a path like hyperlinks between information It\'s another appropriated figuring stage for the Web Goal: Internet-scale, dialect autonomous, upwards-good where conceivable This one depends on numerous well known ideas Standard conventions: HTTP Standard marshaling positions: XML-based, XML Schemas All new information arrangements are XML-based

Slide 20

One Alternative: REST (Representational State Transfer) Not generally a standard – a style of improvement Data is spoken to in XML, e.g., with a construction Function call interface utilizes URIs Server is to be stateless And the HTTP ask for sort indicates the operation e.g., GET e.g., POST {body} adds the body to the administration

Slide 21

The "Standard" for Web Services: Three Parts "Wire"/informing conventions Data encodings, RPC calls or archive passing, and so forth. Portraying what goes on the wire Schemas for the information "Administration revelation" Means of discovering web administrations

Slide 22

The Protocol Stacks of Web Services High-level state move + msging charts between modules WS-AtomicTransaction, WS-Coordination Other augmentations Orchestration (WS-BPEL) SOAP Attachments WS-Addressing Message Sequencing WS-Security Service Capabilities (WS-Capability) SOAP, XML-RPC Directory (UDDI) Service Description (WSDL) XML Inspection XML Schema Wire Format Stack Description Stack Discovery Stack Enhanced + extended from a figure from IBM\'s "Web Services Insider",

Slide 23

Messaging Protocol: SOAP Simple Object Access Protocol: XML-based organization for passing parameters Has a SOAP header and body inside an envelope As a characterized HTTP restricting ( POST with substance sort of use/soap+xml ) A partner SOAP Attachments embodies other (MIME) information The header characterizes data about handling: encoding, marks, and so on. It\'s extensible, and there\'s an uncommon property called mustUnderstand that is appended to components that must be upheld by the callee The body characterizes the genuine application-characterized information

Slide 24

A SOAP Envelope <SOAP-ENV:Envelope xmlns:SOAP-ENV=" envelope" xmlns:xsd=""> <SOAP-ENV:Header> <t:Transaction xmlns:t="" SOAP-ENV:mustUnderstand="1"/> </SOAP-ENV:Header> <SOAP-ENV:Body> <m:PlaceOrder xmlns:m="www.somewhere/there"> <orderno xsi:type="xsd:string">12</orderno> </m:PlaceOrder> </SOAP-ENV:Body> </SOAP-ENV: Envelope>

Slide 25

Making a SOAP Call To execute a call to benefit PlaceOrder: POST/PlaceOrder HTTP/1.1 Host: Content-Type: application/soap+xml; charset="utf-8" Content-Length: nnn <SOAP-ENV:Envelope> … </SOAP-ENV:Envelope>

Slide 26

SOAP Return Values If effective, the SOAP reaction will for the most part be another SOAP message with the arrival information values, much like the solicitation If disappointment, the substance of the SOAP wrap will for the most part be a Fault message, along the lines of: <SOAP-ENV:Body> <SOAP-ENV:Fault xmlns="mynamespace"> <faultcode>SOAP-ENV:Client</faultcode> <faultstring>Could not parse message</faultstring> …

Slide 27

How Do We Declare Functions? WSDL is the interface definition dialect for web administrations Defines ideas of convention ties, ports, and administrations Generally depicts information sorts utilizing XML Schema As a part of CORBA, this was called an IDL In Java, the interface utilizes the same dialect as the Java code

Slide 28

A WSDL Service Port PortType Operation Binding

Slide 29

Web Service Terminology Service: the whole Web Service Port: maps an arrangement of port sorts to a vehicle official (a convention, every now and again SOAP, COM, CORBA, … ) Port Type: theoretical gathering of operations, i.e. a class Operation: the sort of operation – demand/reaction, one-way Input message and yield message; possibly likewise blame message Types: the XML Schema sort definitions

Slide 30

Example WSDL <service name="POService"> <port binding="my:POBinding"> <soap:address location="http://yyy:9000/POSvc"/> </port> </service> <binding xmlns:my="… " name="POBinding"> <soap:binding style="rpc" transport=""/> <operation name="POrder"> <soap:operation soapAction="POService/POBinding" style="rpc"/> <input name="POrder"> <soap:body use="literal" … namespace="POService" …/> </input> <output name="POrderResult"> <soap:body use="literal" … namespace

View more...