SlideShare a Scribd company logo
1 of 46
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

Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservices
Kunal Hire
 

What's hot (20)

AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기AWS Aurora 100% 활용하기
AWS Aurora 100% 활용하기
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
 
Using Ansible at Scale to Manage a Public Cloud
Using Ansible at Scale to Manage a Public CloudUsing Ansible at Scale to Manage a Public Cloud
Using Ansible at Scale to Manage a Public Cloud
 
Api gateway in microservices
Api gateway in microservicesApi gateway in microservices
Api gateway in microservices
 
Building an Active-Active IBM MQ System
Building an Active-Active IBM MQ SystemBuilding an Active-Active IBM MQ System
Building an Active-Active IBM MQ System
 
[Konveyor] migrate and modernize your application portfolio to kubernetes wit...
[Konveyor] migrate and modernize your application portfolio to kubernetes wit...[Konveyor] migrate and modernize your application portfolio to kubernetes wit...
[Konveyor] migrate and modernize your application portfolio to kubernetes wit...
 
414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration
 
GCP Best Practices for SRE Team
GCP Best Practices for SRE TeamGCP Best Practices for SRE Team
GCP Best Practices for SRE Team
 
Seamless scaling of Kubernetes nodes
Seamless scaling of Kubernetes nodesSeamless scaling of Kubernetes nodes
Seamless scaling of Kubernetes nodes
 
ClearPass Guest 6.4 User Guide
ClearPass Guest 6.4 User GuideClearPass Guest 6.4 User Guide
ClearPass Guest 6.4 User Guide
 
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
Chassis and AppFactory: Accelerate Development of Cloud-Native Microservices ...
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQIntroduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
 
REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!REST in Peace. Long live gRPC!
REST in Peace. Long live gRPC!
 
Kafka 101
Kafka 101Kafka 101
Kafka 101
 
From distributed caches to in-memory data grids
From distributed caches to in-memory data gridsFrom distributed caches to in-memory data grids
From distributed caches to in-memory data grids
 
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
관계형 데이터베이스의 새로운 패러다임 Amazon Aurora :: 김상필 :: AWS Summit Seoul 2016
 
Manage Pulsar Cluster Lifecycles with Kubernetes Operators - Pulsar Summit NA...
Manage Pulsar Cluster Lifecycles with Kubernetes Operators - Pulsar Summit NA...Manage Pulsar Cluster Lifecycles with Kubernetes Operators - Pulsar Summit NA...
Manage Pulsar Cluster Lifecycles with Kubernetes Operators - Pulsar Summit NA...
 
Bye Bye Batch, Hallo Events: Der Kafka-Weg von SIEMENS in die Cloud
Bye Bye Batch, Hallo Events: Der Kafka-Weg von SIEMENS in die CloudBye Bye Batch, Hallo Events: Der Kafka-Weg von SIEMENS in die Cloud
Bye Bye Batch, Hallo Events: Der Kafka-Weg von SIEMENS in die Cloud
 
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
M2M, IOT, Device Managment: COAP/LWM2M to rule them all?
 
Amazon simple storage service (amazon s3)
Amazon simple storage service (amazon s3)Amazon simple storage service (amazon s3)
Amazon simple storage service (amazon s3)
 

Similar to APIs at the Edge

Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
Charles Gibbons
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
Charles Gibbons
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
Charles Gibbons
 

Similar to APIs at the Edge (20)

The new (is it really ) api stack
The new (is it really ) api stackThe new (is it really ) api stack
The new (is it really ) api stack
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
Internet of Things: Protocols for M2M
Internet of Things: Protocols for M2MInternet of Things: Protocols for M2M
Internet of Things: Protocols for M2M
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
WebRTC Seminar Report
WebRTC  Seminar ReportWebRTC  Seminar Report
WebRTC Seminar Report
 
WebRTC
WebRTCWebRTC
WebRTC
 
WebRTC in action
WebRTC in actionWebRTC in action
WebRTC in action
 
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
Industry 4.0: Building the Unified Namespace with Confluent, HiveMQ and Spark...
 
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
M2M Protocols for Constrained Environments in the Context of IoT: A Compariso...
 
Using Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M usersUsing Kubernetes to make cellular data plans cheaper for 50M users
Using Kubernetes to make cellular data plans cheaper for 50M users
 
WebRTC presentation
WebRTC presentationWebRTC presentation
WebRTC presentation
 
KrakenD API Gateway
KrakenD API GatewayKrakenD API Gateway
KrakenD API Gateway
 
Locationless data science on a modern secure edge
Locationless data science on a modern secure edgeLocationless data science on a modern secure edge
Locationless data science on a modern secure edge
 
Chapter04
Chapter04Chapter04
Chapter04
 
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
Dataplane networking acceleration with OpenDataplane / Максим Уваров (Linaro)
 
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, GoogleBringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
Bringing Learnings from Googley Microservices with gRPC - Varun Talwar, Google
 
Architecting Low Latency Applications Alberto Gonzalez
Architecting Low Latency Applications Alberto GonzalezArchitecting Low Latency Applications Alberto Gonzalez
Architecting Low Latency Applications Alberto Gonzalez
 

More from Red Hat

Certificate complexity
Certificate complexityCertificate complexity
Certificate complexity
Red Hat
 
Lucamaf1 2949-db--winter2013-accomplishment
Lucamaf1 2949-db--winter2013-accomplishmentLucamaf1 2949-db--winter2013-accomplishment
Lucamaf1 2949-db--winter2013-accomplishment
Red Hat
 
certificate game theory
certificate game theorycertificate game theory
certificate game theory
Red Hat
 
statement of accomplishment - heterogeneous parallel programming
statement of accomplishment - heterogeneous parallel programmingstatement of accomplishment - heterogeneous parallel programming
statement of accomplishment - heterogeneous parallel programming
Red Hat
 
MS thesis
MS thesisMS thesis
MS thesis
Red Hat
 

More from Red Hat (20)

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

Recently uploaded

Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 
Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...
Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...
Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 

Recently uploaded (20)

Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
Abortion Clinic In Stanger ](+27832195400*)[ 🏥 Safe Abortion Pills In Stanger...
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Rustenburg [(+27832195400*)] 🏥 Women's Abortion Clinic i...
 
Abortion Pill Prices Polokwane ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Polokwane ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Polokwane ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Polokwane ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...
Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...
Abortion Pill Prices Jane Furse ](+27832195400*)[🏥Women's Abortion Clinic in ...
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
Abortion Pill Prices Aliwal North ](+27832195400*)[ 🏥 Women's Abortion Clinic...
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 

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

  1. 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
  2. https://stlpartners.com/articles/edge-computing/digital-health-at-the-edge/
  3. https://web.dev/performance-http2/
  4. https://web.dev/performance-http2/
  5. https://en.wikipedia.org/wiki/Representational_state_transfer
  6. https://en.wikipedia.org/wiki/Representational_state_transfer
  7. https://www.amqp.org/about/examples
  8. https://thrift-tutorial.readthedocs.io/en/latest/thrift-stack.html
  9. https://medium.com/the-developer-journal/10-most-amazing-use-cases-of-websockets-go-real-time-166b71e0e711