SlideShare a Scribd company logo
Version 1.0
APIs at the
Edge
APIs in the wild or how do APIs behave when left at the edge? Will they survive the
adversities out there?
Luca Ferrari
EMEA Edge Solution
Architect @ Red Hat
1
Version 1.0
Agenda
Edge definition
Edge challenges
Application pattern solutions
Protocol alternatives
Comparison
Energy analysis on PI [WIP]
Silver bullet
2
What and why
edge?
3
Definition
Edge computing is a distributed application
architecture that places computational resources
(eg, CPU and storage) close to the source of the
data.
By doing so, it offers the advantages of low
latency, high performance, and security for a wide
range of applications. 4
Why?
โ€œ Around 10% of enterprise-generated data is created and processed outside
a traditional centralized data center or cloud. By 2025, Gartner predicts this
figure will reach 75%โ€
5
In everyday life โ€ฆ
โž” 5g connected ambulance to stream video and
sensor data from the ambulance directly to the
hospital
โž” Intelligent analysis at the edge of the patient
condition by leveraging patient models
โž” Allow for remote diagnostics through streaming of
advanced tools feed
6
Connected ambulance
Edge challenges
7
Challenges
1
Unreliable
connection
2
Unreliable
power source
3
Data sync not
always possible
4
Reduced
computing
resources
5
Legacy
protocols
6
Secure by
design
requirement
7
Low latency
requirement
8
High volume
of data
8
Problem
BrianzAcque self-service Case dellโ€™acqua water kiosks dispense high-quality
still and sparkling water, purchased using a rechargeable payment card. To
present relevant, real-time information to consumers at each Case dellโ€™acqua
location, BrianzAcque needed to integrate live data from its aqueducts and
water purification plants such as pH, calcium, chromium, nickel, mercury, and
manganese levelsโ€”and create a central management system. Additionally,
kiosks must be able to read citizensโ€™ payment cards to identify users and
process purchases.
Solution
The technology in the kiosks is based on the Arduino interactive electronic
platform. Container platform is distributed outside of the datacenter to adapt
to IoT needs, which provides portability across deployments and devices.
1. Achieved real-time delivery of water quality data
2. Improved operational efficiency and costs
3. Established robust security to meet industry regulations
Field example
9
Field example
10
Problem
Manage 1 billion ConnectedDrive requests per week
Stay competitive in the autonomous vehicle market & transform from a โ€œcar
makerโ€ to โ€œmobility providerโ€
Offer customers new connected services
Invest in autonomous driving by using data
Solution
High-performance AI Platform for autonomous driving to analyze massive
amounts of global test fleet data in the cloud
Cloud-native platform lets developers focus on building apps
ConnectedDrive backend runs on Container Platform
1. 12 million connected cars
2. 1 billion request per week
Patterns
11
Pattern solutions
Typical policies or patterns applied at the REST level to solve edge challenges:
1. Persist measurements locally when disconnected
2. Filter and aggregate to reduce bandwidth usage
3. Cache query results and authentication on Edge side
4. Automatic device registration
5. โ€ฆ
12
Talking to edge
13
Stack
14
REST
COAP
MQTT
Thrift
Websockets
AMQP
gRPC
HTTP
HTTP/2
HTTP/2 improvements:
โ Binary encoding (vs plain text)
โ Request response multiplexing (vs multiple TCP
connections)
โ Stream prioritization
โ TLS by default
โ Server Push
โ Header compression
15
http://www.http2demo.io/
HTTP
HTTP/3 [proposal]
HTTP/3 major difference:
โ HTTP/3 uses QUIC, a multiplexed transport
protocol built on UDP
16
https://cloudflare-quic.com/
REST
01
No official standard
Defining features:
โ— Client server model
โ— Stateless
โ— Cacheable
โ— Uniform interface
โ— Transparent layering
17
REST
01
No official standard
Defining features:
โ— Client server model
โ— Stateless
โ— Cacheable
โ— Uniform interface
โ— Transparent layering
18
REST
01
Used everywhere, mobile applications included
Easiest way to try:
https://learning.postman.com/docs/developer/ech
o-api/
Typical output format:
JSON but can transfer binary
19
COAP
02
CoAP is a lightweight M2M protocol from the IETF CoRE
(Constrained RESTful Environments) Working Group.
Constrained Application Protocol (CoAP):
โ Runs on UDP (optional DTLS)
โ Very similar to HTTP (support many of the request/response
codes)
โ Possible multicast
โ Low protocol overhead (binary protocol)
20
COAP
02
Used mainly for IoT and M2M communications, found
in WSN. Not widely used as it is relatively young
Easiest way to try:
https://coap.me/
21
gRPC
03
gRPC is a cross-platform open source high
performance Remote Procedure Call (RPC) framework.
gRPC was initially created by Google.
gRPC Remote Procedure Call:
โ Uses HTTP/2 protocol
โ Uses Protocol Buffers to describe the interfaces
โ Strict message specification (less doubt about
implementation)
22
gRPC
03
Typically used in connecting services in a microservices
oriented architecture, or connecting mobile device
clients to backend services.
Try out with:
https://blog.postman.com/testing-grpc-apis-with-
postman/
23
MQTT
04
MQTT is a M2M communication protocols, introduced
in 1999.
MQTT client publishes messages to an MQTT broker,
which are subscribed by other clients or may be
retained for the future subscription. Clients can
subscribe to multiple topics and receives every
message published to the each topic.
Message Queuing Telemetry Transport Protocol:
โ it is a publish/subscribe messaging
โ it is a binary protocol
โ It offers 3 levels of QoS
24
MQTT
04
Typically used in IoT enterprise and home solutions
Easiest way to try:
http://www.hivemq.com/demos/websocket-client/
25
AMQP
05
AMQP is a lightweight M2M protocol, designed
for reliability, security, provisioning and interoperability.
Latest spec version is 1.0
Advanced Message Queuing Protocol:
โ supports both request/response and publish/subscribe
โ Binary protocol
โ exchanges messages in various ways: directly, in fanout
form, by topic, or based on headers
26
AMQP
05
Java environment, enterprise messaging, but also
sometimes IoT scenarios
Easiest way to try:
http://tryrabbitmq.com/
27
Thrift
06
Thrift is an Interface Definition Language and binary communication
protocol developed at Facebook for "scalable cross-language services
development". Open Source Apache project.
Apache Thrift:
โ Similar to gRPC and inherently similar advantages
โ Binary format
โ It can use TCP and HTTP
28
Thrift
06
29
Still used widely at Facebook and in general for all
those use cases where gRPC is used
Websockets
07
WebSocket provides full-duplex communication
channels over a single TCP connection. It is using
HTTP as underlying protocol, with HTTP Upgrade
message.
WebSockets:
โ Provides full duplex communication
โ Allow for stream of messages
โ Enabled by default on most browsers
30
Websockets
07
31
Relevant in IoT scenarios for these main reasons:
โ allow to encapsulate protocols such as MQTT
without the need for middleware
โ It is a real time protocol
โ It uses a pub/sub framework based on HTTP
Typically used when real time feeds are needed:
video/chats, real time location, real time updates
Easiest way to try:
https://www.piesocket.com/websocket-tester
Showdown
32
Metrics
1. Information efficiency (protocol overhead)
2. Support for prioritization and traffic control
3. Security measures and standards
4. Performance (latency & TPS) [WIP]
5. Developer experience & adoption
33
Protocol overhead
34
โ Assumption of a very simple message to
simulate Edge scenario (1KB)
โ Will be using default or typical header size
for all protocols
โ Since grpc runs on HTTP/2 further
optimizations might be achieved
Lower is better
Security
35
โ REST and HTTP offer almost any form of variation in terms of AuthN and AuthZ and
communication encryption
โ MQTT supports secure communication over TLS and supports AuthZ as well (port 8883
typically)
โ AMQP supports secure communication over TLS and supports AuthZ too (port 5671)
โ Websockets can use secure communication over port 443 HTTPS
โ Grpc implements secure communication by default based on HTTP/2 with multiple AuthN
methods
โ Coap adopts Datagram TLS over UDP for secure communication
Traffic control
36
โ REST offers no flow control, but HTTP/2 introduces flow control functionality
โ gRPC can take advantage of the above features
โ Flow control is possible with AMQP (in Apache ArtemisMQ both Consumer and
Producer flow control measures are available), QoS is supported as well
โ Flow control is available with the latest version of MQTT (v5), 3 level of QoS are
supported
โ No flow control with Thrift, Coap or Websockets
Performance
37
Higher is better Lower is better
DX & adoption
โ Interest is growing for MQTT at the edge
โ grpc interest mostly related to cyberattacks
โ Amqp mostly related and associated to java world
โ Websockets mostly associated with javascript
โ Both grpc and thrift have support across all major
programming languages
โ Both mqtt and amqp require a broker making DX harder
38
Subjective scoring
Give me the
answer!
39
Sorry no silver bullet here, just a clickbait
Given the current environment and
volatility around Iot and Edge markets
no predictions can be made, but โ€ฆ
40
Sorry no silver bullet here, just a clickbait
Seems like MQTT is winning over in the
IoT and Edge space.
If otherwise you prefer request /
response model your answer might be
gRPC
41
Few words from
my co-host โ€ฆ
42
Quick intro
43
Links
44
Links
45
Thank you &
to our collaborator
Honeypot.io
46

More Related Content

What's hot (11)

PDF
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
The Linux Foundation
ย 
PDF
DevConf 2014 Kernel Networking Walkthrough
Thomas Graf
ย 
PPTX
Deep Dive into Apache Kafka
confluent
ย 
PPTX
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Amit Aggarwal
ย 
PDF
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Lightbend
ย 
PDF
High-Performance Networking Using eBPF, XDP, and io_uring
ScyllaDB
ย 
PDF
The Linux Kernel Implementation of Pipes and FIFOs
Divye Kapoor
ย 
PPTX
Intro to entomophagy and human evolution
Julie Lesnik
ย 
PDF
DPDK in Containers Hands-on Lab
Michelle Holley
ย 
PPT
XPages Performance
Ulrich Krause
ย 
PDF
Fun with Network Interfaces
Kernel TLV
ย 
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
The Linux Foundation
ย 
DevConf 2014 Kernel Networking Walkthrough
Thomas Graf
ย 
Deep Dive into Apache Kafka
confluent
ย 
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Amit Aggarwal
ย 
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Lightbend
ย 
High-Performance Networking Using eBPF, XDP, and io_uring
ScyllaDB
ย 
The Linux Kernel Implementation of Pipes and FIFOs
Divye Kapoor
ย 
Intro to entomophagy and human evolution
Julie Lesnik
ย 
DPDK in Containers Hands-on Lab
Michelle Holley
ย 
XPages Performance
Ulrich Krause
ย 
Fun with Network Interfaces
Kernel TLV
ย 

Similar to APIs at the Edge (20)

PPTX
The new (is it really ) api stack
Red Hat
ย 
PPTX
Protocols for internet of things
Charles Gibbons
ย 
PPTX
Internet of Things: Protocols for M2M
Charles Gibbons
ย 
PPTX
Protocols for internet of things
Charles Gibbons
ย 
PPTX
Protocols for internet of things
Charles Gibbons
ย 
PPTX
Protocols for internet of things
Charles Gibbons
ย 
PPTX
Protocols for internet of things
Charles Gibbons
ย 
PPTX
this is a power point presentation on chat application
mdprince1262
ย 
PPTX
WebRTC Seminar Report
srinivasa teja
ย 
PPTX
WebRTC
Vijay Dhama
ย 
PDF
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
confluent
ย 
PPTX
WebRTC in action
Tho Q Luong Luong
ย 
PDF
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
confluent
ย 
PPTX
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
Edielson P. Frigieri
ย 
PDF
Using Kubernetes to make cellular data plans cheaper for 50M users
Mirantis
ย 
PPTX
WebRTC presentation
Veselin Pizurica
ย 
PDF
KrakenD API Gateway
Albert Lombarte
ย 
PDF
Locationless data science on a modern secure edge
John Archer
ย 
PPTX
Chapter04
Muhammad Ahad
ย 
PDF
Dataplane networking acceleration with OpenDataplane / ะœะฐะบัะธะผ ะฃะฒะฐั€ะพะฒ (Linaro)
Ontico
ย 
The new (is it really ) api stack
Red Hat
ย 
Protocols for internet of things
Charles Gibbons
ย 
Internet of Things: Protocols for M2M
Charles Gibbons
ย 
Protocols for internet of things
Charles Gibbons
ย 
Protocols for internet of things
Charles Gibbons
ย 
Protocols for internet of things
Charles Gibbons
ย 
Protocols for internet of things
Charles Gibbons
ย 
this is a power point presentation on chat application
mdprince1262
ย 
WebRTC Seminar Report
srinivasa teja
ย 
WebRTC
Vijay Dhama
ย 
From Stream to Screen: Real-Time Data Streaming to Web Frontends with Conflue...
confluent
ย 
WebRTC in action
Tho Q Luong Luong
ย 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
confluent
ย 
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
Edielson P. Frigieri
ย 
Using Kubernetes to make cellular data plans cheaper for 50M users
Mirantis
ย 
WebRTC presentation
Veselin Pizurica
ย 
KrakenD API Gateway
Albert Lombarte
ย 
Locationless data science on a modern secure edge
John Archer
ย 
Chapter04
Muhammad Ahad
ย 
Dataplane networking acceleration with OpenDataplane / ะœะฐะบัะธะผ ะฃะฒะฐั€ะพะฒ (Linaro)
Ontico
ย 
Ad

More from Red Hat (20)

PDF
Meetup 2023 - Gateway API.pdf
Red Hat
ย 
PDF
Meetup 2022 - APIs with Quarkus.pdf
Red Hat
ย 
PDF
Meetup 2022 - API Gateway landscape.pdf
Red Hat
ย 
PDF
Opa in the api management world
Red Hat
ย 
PDF
How easy (or hard) it is to monitor your graph ql service performance
Red Hat
ย 
PDF
Covid impact on digital identity
Red Hat
ย 
PPTX
How do async ap is survive in a rest world
Red Hat
ย 
PDF
The case for a unified way of speaking to things
Red Hat
ย 
PDF
What is the best approach to tdd
Red Hat
ย 
PDF
Leverage event streaming framework to build intelligent applications
Red Hat
ย 
PDF
Using Streaming APIs in Production
Red Hat
ย 
PDF
The independence facts
Red Hat
ย 
PDF
Api observability
Red Hat
ย 
PPTX
Api service mesh and microservice tooling
Red Hat
ย 
PDF
Api design best practice
Red Hat
ย 
PDF
Certificate complexity
Red Hat
ย 
PDF
Lucamaf1 2949-db--winter2013-accomplishment
Red Hat
ย 
PDF
certificate game theory
Red Hat
ย 
PDF
statement of accomplishment - heterogeneous parallel programming
Red Hat
ย 
DOC
MS thesis
Red Hat
ย 
Meetup 2023 - Gateway API.pdf
Red Hat
ย 
Meetup 2022 - APIs with Quarkus.pdf
Red Hat
ย 
Meetup 2022 - API Gateway landscape.pdf
Red Hat
ย 
Opa in the api management world
Red Hat
ย 
How easy (or hard) it is to monitor your graph ql service performance
Red Hat
ย 
Covid impact on digital identity
Red Hat
ย 
How do async ap is survive in a rest world
Red Hat
ย 
The case for a unified way of speaking to things
Red Hat
ย 
What is the best approach to tdd
Red Hat
ย 
Leverage event streaming framework to build intelligent applications
Red Hat
ย 
Using Streaming APIs in Production
Red Hat
ย 
The independence facts
Red Hat
ย 
Api observability
Red Hat
ย 
Api service mesh and microservice tooling
Red Hat
ย 
Api design best practice
Red Hat
ย 
Certificate complexity
Red Hat
ย 
Lucamaf1 2949-db--winter2013-accomplishment
Red Hat
ย 
certificate game theory
Red Hat
ย 
statement of accomplishment - heterogeneous parallel programming
Red Hat
ย 
MS thesis
Red Hat
ย 
Ad

Recently uploaded (20)

PPTX
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
PPTX
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
ย 
PDF
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
ย 
PDF
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
ย 
PDF
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
ย 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
ย 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
ย 
PPTX
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
ย 
PDF
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
ย 
PDF
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
ย 
PDF
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
ย 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
ย 
PDF
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
ย 
PDF
Troubleshooting Virtual Threads in Java!
Tier1 app
ย 
PPTX
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
PDF
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
ย 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romรฉn Rodrรญguez-Gil
ย 
PPTX
Presentation about variables and constant.pptx
kr2589474
ย 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
ย 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
ย 
ChessBase 18.02 Crack + Serial Key Free Download
cracked shares
ย 
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
ย 
How to Download and Install ADT (ABAP Development Tools) for Eclipse IDE | SA...
SAP Vista, an A L T Z E N Company
ย 
ChatPharo: an Open Architecture for Understanding How to Talk Live to LLMs
ESUG
ย 
Why Are More Businesses Choosing Partners Over Freelancers for Salesforce.pdf
Cymetrix Software
ย 
Brief History of Python by Learning Python in three hours
adanechb21
ย 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
ย 
Chess King 25.0.0.2500 With Crack Full Free Download
cracked shares
ย 
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
ย 
MiniTool Power Data Recovery Crack New Pre Activated Version Latest 2025
imang66g
ย 
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
ย 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
ย 
How Agentic AI Networks are Revolutionizing Collaborative AI Ecosystems in 2025
ronakdubey419
ย 
Troubleshooting Virtual Threads in Java!
Tier1 app
ย 
Cutting Optimization Pro 5.18.2 Crack With Free Download
cracked shares
ย 
Enhancing Security in VAST: Towards Static Vulnerability Scanning
ESUG
ย 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romรฉn Rodrรญguez-Gil
ย 
Presentation about variables and constant.pptx
kr2589474
ย 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
ย 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
ย 

APIs at the Edge

  • 1. Version 1.0 APIs at the Edge APIs in the wild or how do APIs behave when left at the edge? Will they survive the adversities out there? Luca Ferrari EMEA Edge Solution Architect @ Red Hat 1
  • 2. Version 1.0 Agenda Edge definition Edge challenges Application pattern solutions Protocol alternatives Comparison Energy analysis on PI [WIP] Silver bullet 2
  • 4. Definition Edge computing is a distributed application architecture that places computational resources (eg, CPU and storage) close to the source of the data. By doing so, it offers the advantages of low latency, high performance, and security for a wide range of applications. 4
  • 5. Why? โ€œ Around 10% of enterprise-generated data is created and processed outside a traditional centralized data center or cloud. By 2025, Gartner predicts this figure will reach 75%โ€ 5
  • 6. In everyday life โ€ฆ โž” 5g connected ambulance to stream video and sensor data from the ambulance directly to the hospital โž” Intelligent analysis at the edge of the patient condition by leveraging patient models โž” Allow for remote diagnostics through streaming of advanced tools feed 6 Connected ambulance
  • 8. Challenges 1 Unreliable connection 2 Unreliable power source 3 Data sync not always possible 4 Reduced computing resources 5 Legacy protocols 6 Secure by design requirement 7 Low latency requirement 8 High volume of data 8
  • 9. Problem BrianzAcque self-service Case dellโ€™acqua water kiosks dispense high-quality still and sparkling water, purchased using a rechargeable payment card. To present relevant, real-time information to consumers at each Case dellโ€™acqua location, BrianzAcque needed to integrate live data from its aqueducts and water purification plants such as pH, calcium, chromium, nickel, mercury, and manganese levelsโ€”and create a central management system. Additionally, kiosks must be able to read citizensโ€™ payment cards to identify users and process purchases. Solution The technology in the kiosks is based on the Arduino interactive electronic platform. Container platform is distributed outside of the datacenter to adapt to IoT needs, which provides portability across deployments and devices. 1. Achieved real-time delivery of water quality data 2. Improved operational efficiency and costs 3. Established robust security to meet industry regulations Field example 9
  • 10. Field example 10 Problem Manage 1 billion ConnectedDrive requests per week Stay competitive in the autonomous vehicle market & transform from a โ€œcar makerโ€ to โ€œmobility providerโ€ Offer customers new connected services Invest in autonomous driving by using data Solution High-performance AI Platform for autonomous driving to analyze massive amounts of global test fleet data in the cloud Cloud-native platform lets developers focus on building apps ConnectedDrive backend runs on Container Platform 1. 12 million connected cars 2. 1 billion request per week
  • 12. Pattern solutions Typical policies or patterns applied at the REST level to solve edge challenges: 1. Persist measurements locally when disconnected 2. Filter and aggregate to reduce bandwidth usage 3. Cache query results and authentication on Edge side 4. Automatic device registration 5. โ€ฆ 12
  • 15. HTTP HTTP/2 HTTP/2 improvements: โ Binary encoding (vs plain text) โ Request response multiplexing (vs multiple TCP connections) โ Stream prioritization โ TLS by default โ Server Push โ Header compression 15 http://www.http2demo.io/
  • 16. HTTP HTTP/3 [proposal] HTTP/3 major difference: โ HTTP/3 uses QUIC, a multiplexed transport protocol built on UDP 16 https://cloudflare-quic.com/
  • 17. REST 01 No official standard Defining features: โ— Client server model โ— Stateless โ— Cacheable โ— Uniform interface โ— Transparent layering 17
  • 18. REST 01 No official standard Defining features: โ— Client server model โ— Stateless โ— Cacheable โ— Uniform interface โ— Transparent layering 18
  • 19. REST 01 Used everywhere, mobile applications included Easiest way to try: https://learning.postman.com/docs/developer/ech o-api/ Typical output format: JSON but can transfer binary 19
  • 20. COAP 02 CoAP is a lightweight M2M protocol from the IETF CoRE (Constrained RESTful Environments) Working Group. Constrained Application Protocol (CoAP): โ Runs on UDP (optional DTLS) โ Very similar to HTTP (support many of the request/response codes) โ Possible multicast โ Low protocol overhead (binary protocol) 20
  • 21. COAP 02 Used mainly for IoT and M2M communications, found in WSN. Not widely used as it is relatively young Easiest way to try: https://coap.me/ 21
  • 22. gRPC 03 gRPC is a cross-platform open source high performance Remote Procedure Call (RPC) framework. gRPC was initially created by Google. gRPC Remote Procedure Call: โ Uses HTTP/2 protocol โ Uses Protocol Buffers to describe the interfaces โ Strict message specification (less doubt about implementation) 22
  • 23. gRPC 03 Typically used in connecting services in a microservices oriented architecture, or connecting mobile device clients to backend services. Try out with: https://blog.postman.com/testing-grpc-apis-with- postman/ 23
  • 24. MQTT 04 MQTT is a M2M communication protocols, introduced in 1999. MQTT client publishes messages to an MQTT broker, which are subscribed by other clients or may be retained for the future subscription. Clients can subscribe to multiple topics and receives every message published to the each topic. Message Queuing Telemetry Transport Protocol: โ it is a publish/subscribe messaging โ it is a binary protocol โ It offers 3 levels of QoS 24
  • 25. MQTT 04 Typically used in IoT enterprise and home solutions Easiest way to try: http://www.hivemq.com/demos/websocket-client/ 25
  • 26. AMQP 05 AMQP is a lightweight M2M protocol, designed for reliability, security, provisioning and interoperability. Latest spec version is 1.0 Advanced Message Queuing Protocol: โ supports both request/response and publish/subscribe โ Binary protocol โ exchanges messages in various ways: directly, in fanout form, by topic, or based on headers 26
  • 27. AMQP 05 Java environment, enterprise messaging, but also sometimes IoT scenarios Easiest way to try: http://tryrabbitmq.com/ 27
  • 28. Thrift 06 Thrift is an Interface Definition Language and binary communication protocol developed at Facebook for "scalable cross-language services development". Open Source Apache project. Apache Thrift: โ Similar to gRPC and inherently similar advantages โ Binary format โ It can use TCP and HTTP 28
  • 29. Thrift 06 29 Still used widely at Facebook and in general for all those use cases where gRPC is used
  • 30. Websockets 07 WebSocket provides full-duplex communication channels over a single TCP connection. It is using HTTP as underlying protocol, with HTTP Upgrade message. WebSockets: โ Provides full duplex communication โ Allow for stream of messages โ Enabled by default on most browsers 30
  • 31. Websockets 07 31 Relevant in IoT scenarios for these main reasons: โ allow to encapsulate protocols such as MQTT without the need for middleware โ It is a real time protocol โ It uses a pub/sub framework based on HTTP Typically used when real time feeds are needed: video/chats, real time location, real time updates Easiest way to try: https://www.piesocket.com/websocket-tester
  • 33. Metrics 1. Information efficiency (protocol overhead) 2. Support for prioritization and traffic control 3. Security measures and standards 4. Performance (latency & TPS) [WIP] 5. Developer experience & adoption 33
  • 34. Protocol overhead 34 โ Assumption of a very simple message to simulate Edge scenario (1KB) โ Will be using default or typical header size for all protocols โ Since grpc runs on HTTP/2 further optimizations might be achieved Lower is better
  • 35. Security 35 โ REST and HTTP offer almost any form of variation in terms of AuthN and AuthZ and communication encryption โ MQTT supports secure communication over TLS and supports AuthZ as well (port 8883 typically) โ AMQP supports secure communication over TLS and supports AuthZ too (port 5671) โ Websockets can use secure communication over port 443 HTTPS โ Grpc implements secure communication by default based on HTTP/2 with multiple AuthN methods โ Coap adopts Datagram TLS over UDP for secure communication
  • 36. Traffic control 36 โ REST offers no flow control, but HTTP/2 introduces flow control functionality โ gRPC can take advantage of the above features โ Flow control is possible with AMQP (in Apache ArtemisMQ both Consumer and Producer flow control measures are available), QoS is supported as well โ Flow control is available with the latest version of MQTT (v5), 3 level of QoS are supported โ No flow control with Thrift, Coap or Websockets
  • 38. DX & adoption โ Interest is growing for MQTT at the edge โ grpc interest mostly related to cyberattacks โ Amqp mostly related and associated to java world โ Websockets mostly associated with javascript โ Both grpc and thrift have support across all major programming languages โ Both mqtt and amqp require a broker making DX harder 38 Subjective scoring
  • 40. Sorry no silver bullet here, just a clickbait Given the current environment and volatility around Iot and Edge markets no predictions can be made, but โ€ฆ 40
  • 41. Sorry no silver bullet here, just a clickbait Seems like MQTT is winning over in the IoT and Edge space. If otherwise you prefer request / response model your answer might be gRPC 41
  • 42. Few words from my co-host โ€ฆ 42
  • 46. Thank you & to our collaborator Honeypot.io 46

Editor's Notes

  • #5: https://enterprisersproject.com/article/2019/7/edge-computing-explained-plain-english https://www.gartner.com/smarterwithgartner/what-edge-computing-means-for-infrastructure-and-operations-leaders
  • #7: https://stlpartners.com/articles/edge-computing/digital-health-at-the-edge/
  • #16: https://web.dev/performance-http2/
  • #17: https://web.dev/performance-http2/
  • #18: https://en.wikipedia.org/wiki/Representational_state_transfer
  • #19: https://en.wikipedia.org/wiki/Representational_state_transfer
  • #28: https://www.amqp.org/about/examples
  • #29: https://thrift-tutorial.readthedocs.io/en/latest/thrift-stack.html
  • #32: https://medium.com/the-developer-journal/10-most-amazing-use-cases-of-websockets-go-real-time-166b71e0e711