SlideShare a Scribd company logo
1 of 18
CoAP-Constrained
Application Protocol
By,
SHAIK SABAHAT NOWREEN
Introduction To CoAP
• The Constrained Application Protocol (CoAP) is a
specialized web transfer protocol for use with
constrained devices(such as microcontrollers) and
constrained networks in the Internet of Things.
• This protocol is designed for machine-to-machine (M2M)
applications such as smart energy and building
automation.
Architecture Of CoAP
• It is specified in RFC 7252.It is open IETF standard
• It is very efficient RESTful protocol.
• Easy to proxy to/from HTTP.
• It is Embedded web transfer protocol
• It uses asynchronous transaction model.
• UDP is binding with reliability and multicast support.
• GET, POST, PUT and DELETE methods are used.
• uses subset of MIME types and HTTP response codes.
• Uses built in discovery mechanism.
Architecture Of CoAP
• URI is supported.
• It uses small and simple 4 byte header.
• Supports binding to UDP, SMS and TCP.
• DTLS based PSK, RPK and certificate security is used.
CoAP Structure
• There are two different layers
that make CoAP protocol:
1)Messages
2)Request/Response.
• The Messages layer deals
with UDP and with
asynchronous messages.
• The Request/Response
layer manages
request/response interaction
based on request/response
messages.
CoAP Structure
• Message layer supports 4 types of messages:
1. Confirmable
2. Non-confirmable
3. Acknowledgment
4. Reset
• Message layer is meant for Re-transmitting lost packets.
Request/Response layer contains methods like
GET,PUT,POST and DELETE.
Common Terms in CoAP
• Client: The entity that sends a request and the destination of
the response
• Server: The entity that receives a request from a client and
sends back a response to the client
• Endpoint: An entity that participates in the CoAP protocol.
Usually, an Endpoint is identified with a host
• Sender: The entity that sends a message
• Recipient: The destination of a message
CoAP Messages Model
• This is the lowest layer of CoAP.
• This layer deals with UDP exchanging messages between
endpoints.
• Each CoAP message has a unique ID; this is useful to detect
message duplicates.
• The CoAP protocol uses two kinds of messages:
1. Confirmable message - this is a reliable message.
2. Non-confirmable message-this are unreliable messages.
CoAP Messages Model
• In CoAP, a reliable message is
obtained using a Confirmable
message (CON).
• A Confirmable message is
sent again and again until the
other party sends an
acknowledge message
(ACK). The ACK message
contains the same ID of the
confirmable message (CON).
CoAP Messages Model
• if the server has troubles
managing the incoming
request, it can send back a
Rest message (RST) instead
of the Acknowledge message
(ACK)
CoAP Messages Model
• The other message category is
the Non-confirmable (NON)
messages. These are messages
that don’t require an
Acknowledge by the server.
• They are unreliable messages or
in other words messages that do
not contain critical information
that must be delivered to the
server.
• To this category belongs
messages that contain values
read from sensors.
• Even if these messages are
unreliable, they have a unique ID.
CoAP Request/Response Model
• The CoAP Request/Response is the second layer in the
CoAP abstraction layer.
• The request is sent using a Confirmable (CON) or Non-
Confirmable (NON) message.
• There are several scenarios depending on if the server can
answer immediately to the client request or the answer if not
available.
CoAP Request/Response Model
• If the server can answer
immediately to the client
request, then if the request is
carried using a Confirmable
message (CON), the server
sends back to the client an
Acknowledge message
containing the response or the
error code.
• The Token is different from the
Message-ID and it is used to
match the request and the
response.
CoAP Request/Response Model
• If the server can’t answer to
the request coming from the
client immediately, then it
sends an Acknowledge
message with an empty
response.
• As soon as the response is
available, then the server
sends a new Confirmable
message to the client
containing the response.
• At this point, the client sends
back an Acknowledge
message:
CoAP Message Format
Where:
Ver: It is a 2 bit unsigned integer indicating the version
T: it is a 2 bit unsigned integer indicating the message type: 0 confirmable, 1
non-confirmable
TKL: Token Length is the token 4 bit length
Code: It is the code response (8 bit length)
Message ID: It is the message ID expressed with 16 bit
And so on.
CoAP Security Aspects
• CoAP uses UDP to transport
information. CoAP relies on UDP
security aspects to protect the
information.
• As HTTP uses TLS over TCP, CoAP
uses Datagram TLS over
UDP. DTLS supports RSA, AES,
and so on.
• Anyway, we should consider that in
some constrained devices some of
DTLS cipher suits may not be
available.
• It is important to notice that some
cipher suites introduces some
complexity and constrained devices
may not have resources enough to
manage it.
CoAP Vs. MQTT
• MQTT uses a publisher-
subscriber .
• MQTT uses a central broker to
dispatch messages coming
from the publisher to the
clients.
• MQTT is an event-oriented
protocol
• MQTT uses Asynchronous
messaging
• CoAP uses a request-response
paradigm
• CoAP is essentially a one-to-
one protocol very similar to
the HTTP protocol.
• while CoAP is more suitable
for state transfer.
• CoAP uses Asynchronous &
Synchronous messaging
CoAP protocol -Internet of Things(iot)

More Related Content

What's hot

Business models for business processes on IoT
Business models for business processes on IoTBusiness models for business processes on IoT
Business models for business processes on IoTFabMinds
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocolasimnawaz54
 
Issues in routing protocol
Issues in routing protocolIssues in routing protocol
Issues in routing protocolPradeep Kumar TS
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 
web communication protocols in IoT
web communication protocols in IoTweb communication protocols in IoT
web communication protocols in IoTFabMinds
 
Mac protocols of adhoc network
Mac protocols of adhoc networkMac protocols of adhoc network
Mac protocols of adhoc networkshashi712
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Chandra Meena
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocolasimnawaz54
 
IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11Keshav Maheshwari
 
ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking ConceptTushar Ranjan
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer NetworksIIIT Manipur
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)Kruti Niranjan
 
IOT Protocols
IOT  Protocols IOT  Protocols
IOT Protocols Nagesh Rao
 

What's hot (20)

Business models for business processes on IoT
Business models for business processes on IoTBusiness models for business processes on IoT
Business models for business processes on IoT
 
Address resolution protocol
Address resolution protocolAddress resolution protocol
Address resolution protocol
 
Issues in routing protocol
Issues in routing protocolIssues in routing protocol
Issues in routing protocol
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
web communication protocols in IoT
web communication protocols in IoTweb communication protocols in IoT
web communication protocols in IoT
 
Mac protocols of adhoc network
Mac protocols of adhoc networkMac protocols of adhoc network
Mac protocols of adhoc network
 
Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc Lecture 19 22. transport protocol for ad-hoc
Lecture 19 22. transport protocol for ad-hoc
 
MQTT and CoAP
MQTT and CoAPMQTT and CoAP
MQTT and CoAP
 
Protocols for IoT
Protocols for IoTProtocols for IoT
Protocols for IoT
 
Data link layer
Data link layer Data link layer
Data link layer
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
 
IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11IEEE standards 802.3.&802.11
IEEE standards 802.3.&802.11
 
ATM Networking Concept
ATM Networking ConceptATM Networking Concept
ATM Networking Concept
 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
 
6LoWPAN: An Open IoT Networking Protocol
6LoWPAN: An Open IoT Networking Protocol6LoWPAN: An Open IoT Networking Protocol
6LoWPAN: An Open IoT Networking Protocol
 
QOS (Quality of Services) - Computer Networks
 QOS (Quality of Services) - Computer Networks QOS (Quality of Services) - Computer Networks
QOS (Quality of Services) - Computer Networks
 
Ethernet
EthernetEthernet
Ethernet
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
 
CS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKSCS6551 COMPUTER NETWORKS
CS6551 COMPUTER NETWORKS
 
IOT Protocols
IOT  Protocols IOT  Protocols
IOT Protocols
 

Similar to CoAP protocol -Internet of Things(iot)

InternetOFThings_network_communicqtionCoAP_.pptx
InternetOFThings_network_communicqtionCoAP_.pptxInternetOFThings_network_communicqtionCoAP_.pptx
InternetOFThings_network_communicqtionCoAP_.pptx20CE112YASHPATEL
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01Zaigham Abbas
 
Comparison of mqtt and coap protocol
Comparison of mqtt and coap protocolComparison of mqtt and coap protocol
Comparison of mqtt and coap protocolYUSUF HUMAYUN
 
RabbitMQ and AMQP with .net client library
RabbitMQ and AMQP with .net client libraryRabbitMQ and AMQP with .net client library
RabbitMQ and AMQP with .net client libraryMohammed Shaban
 
The constrained application protocol (coap)
The constrained application protocol (coap)The constrained application protocol (coap)
The constrained application protocol (coap)Hamdamboy
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoTDamien Magoni
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applicationsOnline
 
Secure Socket Layer.ppt [ssl for websecurity]
Secure Socket Layer.ppt [ssl for websecurity]Secure Socket Layer.ppt [ssl for websecurity]
Secure Socket Layer.ppt [ssl for websecurity]shashankmharse1533
 
Extensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMExtensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMMalwinder Singh
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocolsNitesh Singh
 
Unit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITUnit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITDeepraj Bhujel
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoTdejanb
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2
 
Computer networks unit v
Computer networks    unit vComputer networks    unit v
Computer networks unit vJAIGANESH SEKAR
 
SMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSIDDARAMAIAHMC
 

Similar to CoAP protocol -Internet of Things(iot) (20)

InternetOFThings_network_communicqtionCoAP_.pptx
InternetOFThings_network_communicqtionCoAP_.pptxInternetOFThings_network_communicqtionCoAP_.pptx
InternetOFThings_network_communicqtionCoAP_.pptx
 
Fog & edge computing(coap )
Fog & edge computing(coap )Fog & edge computing(coap )
Fog & edge computing(coap )
 
CoAP Talk
CoAP TalkCoAP Talk
CoAP Talk
 
UNIT2_PPT.ppt
UNIT2_PPT.pptUNIT2_PPT.ppt
UNIT2_PPT.ppt
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 
Comparison of mqtt and coap protocol
Comparison of mqtt and coap protocolComparison of mqtt and coap protocol
Comparison of mqtt and coap protocol
 
RabbitMQ and AMQP with .net client library
RabbitMQ and AMQP with .net client libraryRabbitMQ and AMQP with .net client library
RabbitMQ and AMQP with .net client library
 
The constrained application protocol (coap)
The constrained application protocol (coap)The constrained application protocol (coap)
The constrained application protocol (coap)
 
Application Layer Protocols for the IoT
Application Layer Protocols for the IoTApplication Layer Protocols for the IoT
Application Layer Protocols for the IoT
 
SSL And TLS
SSL And TLS SSL And TLS
SSL And TLS
 
Tcpip services and applications
Tcpip services and applicationsTcpip services and applications
Tcpip services and applications
 
Secure Socket Layer.ppt [ssl for websecurity]
Secure Socket Layer.ppt [ssl for websecurity]Secure Socket Layer.ppt [ssl for websecurity]
Secure Socket Layer.ppt [ssl for websecurity]
 
Extensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCMExtensible Messaging and Presence Protocol (XMPP) with GCM
Extensible Messaging and Presence Protocol (XMPP) with GCM
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
 
Unit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - ITUnit 3 - Protocols and Client-Server Applications - IT
Unit 3 - Protocols and Client-Server Applications - IT
 
Messaging for IoT
Messaging for IoTMessaging for IoT
Messaging for IoT
 
Secure socket later
Secure socket laterSecure socket later
Secure socket later
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product Overview
 
Computer networks unit v
Computer networks    unit vComputer networks    unit v
Computer networks unit v
 
SMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer ProtocolSMTP Simple Mail Transfer Protocol
SMTP Simple Mail Transfer Protocol
 

Recently uploaded

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 

Recently uploaded (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

CoAP protocol -Internet of Things(iot)

  • 2. Introduction To CoAP • The Constrained Application Protocol (CoAP) is a specialized web transfer protocol for use with constrained devices(such as microcontrollers) and constrained networks in the Internet of Things. • This protocol is designed for machine-to-machine (M2M) applications such as smart energy and building automation.
  • 3. Architecture Of CoAP • It is specified in RFC 7252.It is open IETF standard • It is very efficient RESTful protocol. • Easy to proxy to/from HTTP. • It is Embedded web transfer protocol • It uses asynchronous transaction model. • UDP is binding with reliability and multicast support. • GET, POST, PUT and DELETE methods are used. • uses subset of MIME types and HTTP response codes. • Uses built in discovery mechanism.
  • 4. Architecture Of CoAP • URI is supported. • It uses small and simple 4 byte header. • Supports binding to UDP, SMS and TCP. • DTLS based PSK, RPK and certificate security is used.
  • 5. CoAP Structure • There are two different layers that make CoAP protocol: 1)Messages 2)Request/Response. • The Messages layer deals with UDP and with asynchronous messages. • The Request/Response layer manages request/response interaction based on request/response messages.
  • 6. CoAP Structure • Message layer supports 4 types of messages: 1. Confirmable 2. Non-confirmable 3. Acknowledgment 4. Reset • Message layer is meant for Re-transmitting lost packets. Request/Response layer contains methods like GET,PUT,POST and DELETE.
  • 7. Common Terms in CoAP • Client: The entity that sends a request and the destination of the response • Server: The entity that receives a request from a client and sends back a response to the client • Endpoint: An entity that participates in the CoAP protocol. Usually, an Endpoint is identified with a host • Sender: The entity that sends a message • Recipient: The destination of a message
  • 8. CoAP Messages Model • This is the lowest layer of CoAP. • This layer deals with UDP exchanging messages between endpoints. • Each CoAP message has a unique ID; this is useful to detect message duplicates. • The CoAP protocol uses two kinds of messages: 1. Confirmable message - this is a reliable message. 2. Non-confirmable message-this are unreliable messages.
  • 9. CoAP Messages Model • In CoAP, a reliable message is obtained using a Confirmable message (CON). • A Confirmable message is sent again and again until the other party sends an acknowledge message (ACK). The ACK message contains the same ID of the confirmable message (CON).
  • 10. CoAP Messages Model • if the server has troubles managing the incoming request, it can send back a Rest message (RST) instead of the Acknowledge message (ACK)
  • 11. CoAP Messages Model • The other message category is the Non-confirmable (NON) messages. These are messages that don’t require an Acknowledge by the server. • They are unreliable messages or in other words messages that do not contain critical information that must be delivered to the server. • To this category belongs messages that contain values read from sensors. • Even if these messages are unreliable, they have a unique ID.
  • 12. CoAP Request/Response Model • The CoAP Request/Response is the second layer in the CoAP abstraction layer. • The request is sent using a Confirmable (CON) or Non- Confirmable (NON) message. • There are several scenarios depending on if the server can answer immediately to the client request or the answer if not available.
  • 13. CoAP Request/Response Model • If the server can answer immediately to the client request, then if the request is carried using a Confirmable message (CON), the server sends back to the client an Acknowledge message containing the response or the error code. • The Token is different from the Message-ID and it is used to match the request and the response.
  • 14. CoAP Request/Response Model • If the server can’t answer to the request coming from the client immediately, then it sends an Acknowledge message with an empty response. • As soon as the response is available, then the server sends a new Confirmable message to the client containing the response. • At this point, the client sends back an Acknowledge message:
  • 15. CoAP Message Format Where: Ver: It is a 2 bit unsigned integer indicating the version T: it is a 2 bit unsigned integer indicating the message type: 0 confirmable, 1 non-confirmable TKL: Token Length is the token 4 bit length Code: It is the code response (8 bit length) Message ID: It is the message ID expressed with 16 bit And so on.
  • 16. CoAP Security Aspects • CoAP uses UDP to transport information. CoAP relies on UDP security aspects to protect the information. • As HTTP uses TLS over TCP, CoAP uses Datagram TLS over UDP. DTLS supports RSA, AES, and so on. • Anyway, we should consider that in some constrained devices some of DTLS cipher suits may not be available. • It is important to notice that some cipher suites introduces some complexity and constrained devices may not have resources enough to manage it.
  • 17. CoAP Vs. MQTT • MQTT uses a publisher- subscriber . • MQTT uses a central broker to dispatch messages coming from the publisher to the clients. • MQTT is an event-oriented protocol • MQTT uses Asynchronous messaging • CoAP uses a request-response paradigm • CoAP is essentially a one-to- one protocol very similar to the HTTP protocol. • while CoAP is more suitable for state transfer. • CoAP uses Asynchronous & Synchronous messaging