29
12.3 COMMUNICATIONS NOV-09-2015 BY: RUSHITHA METTU JYOTHSNA NATARAJAN BHAVANA PALLEPATI ANUJA P.PARAMESHWARAN

12.3 COMMUNICATIONS NOV-09-2015 BY: RUSHITHA METTU JYOTHSNA NATARAJAN BHAVANA PALLEPATI ANUJA P.PARAMESHWARAN

Embed Size (px)

Citation preview

12.3 COMMUNICATIONS

NOV-09-2015

BY: RUSHITHA METTUJYOTHSNA NATARAJANBHAVANA PALLEPATIANUJA P.PARAMESHWARAN

HYPERTEXT TRANSFER PROTOCOL (HTTP)

• Communication in the web between clients and server is based on HTTP

• HTTP is stateless– No open connection– Server does not maintain information of clients

• Protocol: Client sends request message to server and waits for response message

HTTP Connections

• Based on TCP• Client-Server communicate as follows:– Clients sets TCP connection to server– Sends request message using connection– Server sends response using same connection

HTTP Connections…

• Non-persistent: – For each request-response pair a connection is setup – Multiple such connections can be setup at same time

between client and server– Drawback: High Cost

• Persistent:– Several request-response pairs use same connection– Efficiency can be improved by using pipelining of

requests.

HTTP Methods

Operations DescriptionHEAD Request to return to the header of document. The

header contains metadata like timestamp etc.

GET Request to return a document from the server to the client

PUT Request to store a document at the server. Often a name for the document can also be passed.

POST Provide data that are to be added to a document

DELETE Request to the server to delete a document.

The following methods are the request messages sent from client to server:

HTTP Messages

• Request message consists of three parts:

– Operation: The operation client wants the server to perform like HEAD, PUT etc.

– Reference: The document on which the operation will be performed

– Version: The version of HTTP client is expecting

OPERATION REFERENCE VERSIONOPERATION

HTTP Messages…

• Response message consists of three parts:

– Version: Refers to HTTP Version– Status code: Three-digit status code indicating

status of request– Textual Phrase: Brief description of status code

VERSION STATUS CODE TEXTUAL PHRASE

HTTP Messages…

• Commonly used status codesSTATUS CODE TEXTUAL PHRASE

400 Bad Request

403 Forbidden

404 Not Found

405 Method not allowed

200 Request honored

Simple Object Access Protocol• HTTP is the standard communication protocol for

traditional Web based distributed systems, the Simple Object Access Protocol (SOAP) forms the standard for communication with Web services.

• SOAP has made HTTP even more important than it already was: Its main purpose is to provide a relatively simple means to let different parties who may know very little of each other be able to communicate.

• In other words , the protocol is designed with the assumption that two communicating parties have very little common knowledge.

SOAP-XML

• SOAP messages are largely based on XML. Recall that XML is a meta-markup language, meaning that an XML description includes the definition of the elements.

• Used to describe a document. In practice, this means that the definition of the syntax as used for a message is part of that message. Providing this syntax allows a receiver to parse very different types of messages.

• Of course, the meaning of a message is still left undefined, and thus also what actions to take when a message comes in. If the receiver cannot make any sense out of the contents of a message no progress can be made.

SOAP-Message

• A SOAP message generally consists of two parts, which are jointly put inside what is called a SOAP envelope.

• The body contains the actual message, whereas the header is optional, containing information relevant for nodes along the path from sender to receiver.

• Typically, such nodes consist of the various processes in a multi-tiered implementation of a Web service. Everything in the envelope is expressed in XML, that is, the header and the body.

Contd..

• Strange as it may seem, a SOAP envelope does not contain the address of the recipient. Instead, SOAP explicitly assumes that the recipient is specified by the protocol that is used to transfer messages.

• To this end, SOAP specifies bindings to underlying transfer protocols.

• At present, two such bindings exist: one to HTTP and one to SMTP, the Internet mail-transfer protocol. So, for example, when a SOAP message is bound to HTTP, the recipient will be specified in the form of a URL, whereas a binding to SMTP will specify the recipient in the form of an email address.

SOAP-INTERACTIONS• These two different types of bindings also indicate two

different styles of interactions. • The first, most common one is the conversational exchange

style . In this style, two parties essentially exchange structured documents. For example, such a document may contain a complete purchase order as one would fill in when electronically booking a flight.

• The response to such an order could be a confirmation document, now containing an order number, flight information. A seat reservation, and perhaps also a bar code that needs to be scanned when boarding .

• In this case, the SOAP message will identify explicitly the procedure to be called, and also provide a list of parameter values as input to that call. Likewise, the response will be a formal message containing the response to the call.

Performance• RPC (Remote procedure call)-style exchange is supported by a

binding to HTTP, whereas a conversational style message will be bound to either SMTP or HTTP. However, in practice, most SOAP messages are sent over HTTP.

• An important observation is that, although XML makes it much easier to use a general parser because syntax definitions are now part of a message, the XML syntax itself is extremely verbose.

• As a result, parsing XML messages in practice often introduces a serious performance bottleneck. In this respect, it is somewhat surprising that improving XML performance receives-relatively little attention, although solutions are under way.

• Discovering what this SOAP message conveys requires some searching, and it is not hard to imagine that obscurity, in general may come as a natural by-product of using XML.

Research Topic: Internet of things (IoT)

Understanding The Protocols Behind IoT:

• IoT is a novel paradigm that is rapidly gaining ground in the scenario of modern wireless telecommunications.

• New wave About intelligent, connected devices• Vision statements differ by big information players:

“Internet of Everything””latest wave of the Internet—connecting physical objects… to provide better safety, comfort and efficiency.”

“A completely new world-wide Web, one comprised of the messages that digitally empowered devices would send to one another. It is the same Internet, but not the same Web.”

Understanding The Protocols Behind IoT:

“Industrial Internet” “the convergence of machine and intelligent data… to create brilliant machines.”

“Your Systems. Working as One.”

UNIFIED VISION: IoT and the intelligent systems it enables will fundamentally change our world.

Protocol overview:

• Devices must communicate with each other (D2D). • Device data then must be collected and sent to the server

infrastructure (D2S). • That server infrastructure has to share device data (S2S),

possibly providing it back to devices, to analyze programs, or to people.

MQTT:• Message Queue Telemetry Transport• Targets device data collection• Main purpose remote monitoring• Goal: To collect data from many devices and transport that data to

the IT infrastructure. It targets large networks of small devices that need to be monitored or controlled from the cloud.

• Architecture: hub-and-spoke architecture• All the devices connect to a data concentrator server, like IBM’s

new MessageSight appliance. • Don’t want to lose data so the protocol works on top of TCP,

which provides a simple, reliable stream.• Since the IT infrastructure uses the data, the entire system is

designed to easily transport data into enterprise technologies like ActiveMQ and enterprise service buses (ESBs).

Example of MQTT:

• Example: Enables applications like monitoring a huge oil pipeline for leaks or vandalism.

• Those thousands of sensors must be concentrated into a single location for analysis.

• When the system finds a problem, it can take action to correct that problem.

• Other Applications: Power usage monitoring, lighting control, and even intelligent gardening.

• They share a need for collecting data from many sources and making it available to the IT infrastructure.

XMPP”

• Extensible Messaging and Presence Protocol.• “Jabber”• Was developed for instant messaging (IM) to

connect people to other people via text messages.• XMPP uses the XML text format as its native type,

making person-to-person communications natural.• Runs over TCP direct OR over HTTP which is over TCP• In IoT context: allows easy way to address a device.• Not designed to be fast

XMPP contd..

• Most implementations: polling or checking updates by demand

• Use:• XMPP provides a great way, for instance, to

connect your home thermostat to a Web server so you can access it from your phone.

• Its strengths in addressing, security, and scalability make it ideal for consumer-oriented IoT applications.

DDS:

• Data Distribution Service• Targets devices that directly use device data.• It distributes data to other devices • Main purpose: to connect devices to other devices.• It is a data-centric middleware standard with roots

in high-performance defense, industrial, and embedded applications.

• DDS can efficiently deliver millions of messages per second to many simultaneous receivers.

DDS contd…

• Devices need to communicate with many other devices in complex ways, so TCP’s simple and reliable point-to-point streams are far too restrictive. Instead, DDS offers detailed quality-of-service (QoS) control, multicast, configurable reliability, and pervasive redundancy.

• DDS offers powerful ways to filter and select exactly which data goes where, and “where” can be thousands of simultaneous destinations.

• Model: DDS implements direct device-to-device “bus” communication with a relational data model.

• High-performance integrated device systems use DDS.

DDS contd…

• It is the only technology that delivers the flexibility, reliability, and speed necessary to build complex, real-time applications.

• Applications: military systems, wind farms, hospital integration, medical imaging, asset-tracking systems, and automotive test and safety.

• DDS connects devices together into working, distributed applications at physics speeds.

AMQP:

• Advanced Message Queuing Protocol• All about queues• It sends transactional messages between servers.• As a message-centric middleware that arose from the

banking industry, it can process thousands of reliable queued transactions.

• AMQP is focused on not losing messages. • Communications from the publishers to exchanges and

from queues to subscribers use TCP, which provides strictly reliable point-to-point connection.

AMQP contd….

• Endpoints must acknowledge acceptance of each message

• AMQP middleware focuses on tracking all messages and ensuring each is delivered as intended, regardless of failures or reboots

• AMQP is mostly used in business messaging.• “Devices” mobile handsets communicating

with back-office data centers.

Conclusion:

• The IoT needs many protocols. • The fundamental goals of all four protocols

differ, the architectures differ, and the capabilities differ.

• All of these protocols are critical to the (rapid) evolution of the IoT.

• The Internet of Things is a big place, with room for many protocols.

References:

1. Atzori, Luigi, Antonio Iera, and Giacomo Morabito. "The internet of things: A survey." Computer networks 54, no. 15 (2010): 2787-2805.

2. Gubbi, Jayavardhana, Rajkumar Buyya, Slaven Marusic, and Marimuthu Palaniswami. "Internet of Things (IoT): A vision, architectural elements, and future directions." Future Generation Computer Systems 29, no. 7 (2013): 1645-1660.

3. Understanding the protocols of IoT-2013, oct 9- Stan Schneider

4. http://www.vs.inf.ethz.ch/res/show.html?what=iot