SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
Internal
Building Real-time Push APIs Using Kafka
as the Customer Facing Interface
Javier Moreno Molina
Javier Moreno Molina
Building Real-time Push APIs Using Kafka as the Customer
Facing Interface
Internal
3
Mercedes-Benz Connectivity Services
- Introduction
- Event-Driven APIs
- Push vs. Pull
- An Event-Driven API Ecosystem
- Conclusion & Outlook
- Q & A
Outline
Mercedes-Benz Connectivity Services 4
JAVIER MORENO MOLINA
Solutions Architect | since 2018
Mercedes-Benz Connectivity Services GmbH
- Focus on DevOps, Platform & Infrastructure
- Interest on Distributed Systems and
Communication
About me.
Internal
Mercedes-Benz Connectivity Services 5
We develop, operate and offer connectivity services that provide various
vehicle data points & vehicle indicators.
Introduction
Mercedes-Benz Connectivity Services GmbH
WHO WE ARE
As a connectivity and data
service provider in the
automotive sector,
Mercedes-Benz Connectivity
Services GmbH
offers innovative data-based
product solutions.
WHAT WE OFFER
We create digital solutions
based on real-time data from
measuring points and signals
of connected Mercedes-Benz
vehicles worldwide. This data
is used to generate added
value for products and
processes in companies from
a wide range of industries.
HOW WE HELP
We help our customers to
increase their process
quality and efficiency,
improve customer
experiences, act more
sustainably or develop new
business models.
WHO WE SERVE
•car & van fleet operators
and their service providers •
•car rental companies•
•leasing companies•
•insurance companies•
•neutral servers•
• pp & software developers•
Internal
Mercedes-Benz Connectivity Services 6
Our history: coming from a fleet management portal to an API with
flexible data packages for cars and vans.
Introduction
2015 – 2016 IDEATION
- Fleet management
product: portal for fleet
managers and app for
drivers, as well as portal
for dealers
- Target groups: small
and middle size
companies, leasing
companies, rentals,
dealers
2017 GO LIVE CONNECT
BUSINESS
- 3 services: vehicle
management, tracking
and driver´s log
- 2 customer frontends
and 1 web based portal
2018 GO LIVE CONNECT
BUSINESS-API
- Request of middle size
and large customers to
consume the portal
services additionally via
an API
- Pull API Partner concept
enabled
2019 ADAPTION OF TARGET
GROUPS AND STRATEGY
- The demand for APIs is
growing continuously
- the services at that time
were not flexible
enough to meet the
requirements of our
customers
- Push API is found to be
more attractive for
customers
2020 CONNECT YOUR
BUSINESS API
- 12 service packages with
several data signals and
data points cover wide
range of use cases
- Service packages can be
activated on a vehicle-
level
- Target group: Third party
providers to enrich their
own products & large
customers to manage
their own fleet
Internal
Mercedes-Benz Connectivity Services 7
Our connect your business API is highly recognized within the industry
and was selected #1 at the 2023 DEVIES Awards & 2022 API Awards.
Introduction
With the connect your business API, we aim to create a holistic ecosystem around the connected car
together with various partners. The API enables third party providers to enrich own products and
business models with Mercedes-Benz vehicle data, without the need for a retrofit solution. This network
of partners will be the cornerstone for the development of many new databased solutions in the future.
The awards were both presented during the world’s largest
developer and microservices conferences & expos in California.
The Advisory Board to the Awards has selected our technology
based on three criteria:
1. attracting notable attention and awareness in the API & software
industry,
2. general regard & use by the developer & engineering community,
3. being a technical leader in its sector for innovation.
Internal
Mercedes-Benz Connectivity Services 8
We know that secure and responsible handling of data is the basis for the acceptance of connected driving. We
therefore pursue new technical developments with three clear principles in mind and integrate them into our
products (privacy-by-design):
Privacy is a high priority for us.
Introduction
1
2
3
Transparency: The customer must know when which data is collected and for which purpose. In the
sales information, the Mercedes me App, the Operator's Manual and the Terms of Use, we inform the
customer comprehensively about the data processing. Where possible, even directly in the vehicle.
Self-determination: The customer decides which services he actually uses and which data he wants to
share either by consent, contract or by touching a button.
Data security: The high safety requirements of our customers apply equally to the data security of the
connected vehicle. Mercedes-Benz protects customer data against manipulation and misuse. With
regard to IT technological progress, we continuously develop data security.
Internal
9
Mercedes-Benz Connectivity Services
Event-Driven APIs
Internal
Mercedes-Benz Connectivity Services 10
APIs are everywhere today and have been for a while.
Most of them are Request-Based (REST).
Many IoT use cases demand Event-Based communication:
- Real-Time Data Delivery
- Delivery on relevant ocurrence
However, there is no clear or standard way to offer event-driven
interfaces as it occurs in REST.
IoT and Event Driven APIs
Event-Driven APIs
Internal
Mercedes-Benz Connectivity Services 11
Event Driven APIs challenges
Event-Driven APIs
SPECIFICATIONS
- There are widely accepted
Interface Specifications for REST
- OpenAPI
- RAML
- No clear specification standard
for event-based interfaces
- AsyncAPI?
COMMUNICATION COMPLEXITY
- Uncertainty and variability of
- Data Volume
- Message Rate
- Wrong coordination may destroy
use case feasibility
- Superfluous data processing
- Latency
ROLE OF CONSUMER DEPENDABILITY
- Availability
- REST: From request to
response
- Unavailable consumers may
impact the service provider
- Security and Access
- REST: authorizing at request
time
- Difficult after data processing
Internal
12
Mercedes-Benz Connectivity Services
Push vs. Pull
Internal
Mercedes-Benz Connectivity Services 13
Push Examples: Webhooks
Push vs. Pull
HETEROGENEITY
- No Standards
- Payload Ownership
- Assumptions on
consumer capacity
OPERATIONAL COMPLEXITY
- Failures on consumer
side need specific
actions on sender side
- Retries
- Replays
SCALABILITY
- HTTP Post requests
typically blocking
- Retry management
HTTP
WEBHOOK SERVER
ON CONSUMER
INFRASTRUCTURE
SECURITY
- More difficult to
enforce from client
side
Internal
Mercedes-Benz Connectivity Services 14
- Throughput limitations (routing, dequeuing, etc.)
- Delivery Guarantees limitations (exactly once not possible at a system level)
- Messages availability based on delivery status:
- A retention policy is anyway required in case consumers are not available for a long time
- No replays possible
Push Examples: MQTT/AMQP
Push vs. Pull
Internal
Mercedes-Benz Connectivity Services 15
Push vs. Pull
Push vs. Pull
Intuitively we think of event-driven APIs as Push APIs, but … can a Pull-based system be a good option in
some scenarios?
PULL
• Requires polling
• Allows freedom in consumption rate
• Optimal throughput
PUSH
• Optimal bandwidth & latency
• Limitations on Delivery Guarantees
• Assumptions on Customer side
Internal
Mercedes-Benz Connectivity Services 16
What about Kafka?
Push vs. Pull
Kafka offers a Push API-like experience:
- Publish/Subscribe
- „Data Sending“
… but is a Pull-based implementation.
1 2 3
EFFICIENT LONG POLLING
Kafka client hides polling logic.
STATELESS MESSAGE MANAGEMENT
Messages managed by log size or
retention not consumption state.
CLIENT INITIATED COMMUNICATION
Data Consumers get messages matching
their needs.
No unavailable consumers overhead.
Internal
Mercedes-Benz Connectivity Services 17
B2B Context
Push vs. Pull
Bandwidth Utilization
Mitigated by long polling
Not relevant in Server to Server communication
Smart Broker/Dumb Client Paradox: dumb clients are not easier to implement for the customer
- Availability: Unavailable consumers have no operational burden (consume no resources)
- vs. retry strategy and storage and memory size increase
- Rate: Consumption is optimized to the available consumer resources
- vs. broker can overload the client
- Delivery: Consumer can decide on itself if a message delivery is successful or not and go back
in time or request message replays if it detects any data loss.
- vs. delivery ends with client acknowledgement. Support is difficult for any failure in the
triggered logic after ack
Internal
18
Mercedes-Benz Connectivity Services
An Event-Driven API Ecosystem
Internal
Mercedes-Benz Connectivity Services 19
Complete the REST API Puzzle
An Event-Driven API Ecosystem
AUTHENTICATION
OpenID Connect
DOCUMENTATION
OpenAPI
AUTHORIZATION
OAuth
Internal
Mercedes-Benz Connectivity Services 20
Authentication
STANDARDS
REST APIs already have well-
established standards, such as
OpenID Connect.
SASL OAUTHBEARER
Kafka supports OAUTHBEARER SASL
authentication mechanism:
OAuth 2.0 bearer tokens can be
used for client authentication.
COMMON AUTHENTICATION
Most Event Driven APIs will also
contain REST APIs.
Using OAUTHBEARER there is no
need for additional authentication
mechanisms.
No production ready OAuth 2.0 token management implementation in Kafka.
We set up a repository with client code samples for OAuth consumers:
- Available at: https://github.com/mercedes-benz/kafka-integration-samples
- Currently on golang, C# and Python
Internal
Mercedes-Benz Connectivity Services 21
Authorization
An Event-Driven API Ecosystem
KAFKA ACLS
Once authenticated, Kafka ACLs
can be used to define permissions
CONTENT AUTHORIZATION
Only based on Topic
CONCURRENT CONSUMERS
Can be controlled based on Group
Resources:
- Cluster
- Topic
- Group
- Transactional ID
- Delegation token
Cannot authorize for specific messages inside a topic.
Every specific data access policy requires a topic.
Number of required topics must be analyzed.
Consumer may only join to in ACLs allowed Consumer Groups.
For a consumer group, the maximum number of effective clients is the
number of topic partitions. If more are created they will remain idle.
Internal
Mercedes-Benz Connectivity Services 22
There are many specifications for REST APIs documentation like OpenAPI, RAML, etc. with OpenAPI 3.0
being currently the most popular option.
OpenAPI belongs to The Linux Foundation.
We already use OpenAPI to document our REST APIs.
AsyncAPI is also a Linux Foundation initiative to specify asynchronous APIs.
It is compatible with OpenAPI schemas.
https://developer.mercedes-benz.com/products/connect_your_business/specifications/push_api
Event API Documentation - AsyncAPI
An Event-Driven API Ecosystem
Internal
23
Mercedes-Benz Connectivity Services
Conclusion & Outlook
Internal
Mercedes-Benz Connectivity Services 24
Recap & Outlook
Conclusion & Outlook
Event Driven APIs are still far from the maturity and adoption of REST APIs.
1
Push-Based implementations are complex, specially when there are many consumers that are not
under your control and in scenarios that require high througput.
2
A complete Event Driven API ecosystem can be built on top of Kafka, with REST API similar
authentication (OpenID Connect/OAuth 2.0) and Documentation (AsyncAPI).
3
Last-mile B2C delivery is in many cases not suitable for Pull-based approach, even with Kafka
optimizations.
4
Pull-based can be a good option, in particular in B2B contexts. Kafka is already inside most real-
time data architectures.
5
Internal
Mercedes-Benz Connectivity Services
WE ARE
HIRING!
OPEN
POSITIONS
:
- SOLUTION ARCHITECT
- SOFTWARE DEVELOPMENT ENGINEER
- SITE RELIABILITY ENGINEER
- TEST ENGINEER
J O I N O U R T E A M
APPLY NOW
www.connectivity.mercedes-benz.com
25
Conclusion & Outlook
Internal
Mercedes-Benz Connectivity Services 26
Q & A
Thank you … Questions?

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Overview of Amazon Web Services
Overview of Amazon Web ServicesOverview of Amazon Web Services
Overview of Amazon Web Services
 
Apache Flink: Real-World Use Cases for Streaming Analytics
Apache Flink: Real-World Use Cases for Streaming AnalyticsApache Flink: Real-World Use Cases for Streaming Analytics
Apache Flink: Real-World Use Cases for Streaming Analytics
 
Red Hat OpenShift - a foundation for successful digital transformation
Red Hat OpenShift - a foundation for successful digital transformationRed Hat OpenShift - a foundation for successful digital transformation
Red Hat OpenShift - a foundation for successful digital transformation
 
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
 
Apache Kafka® Use Cases for Financial Services
Apache Kafka® Use Cases for Financial ServicesApache Kafka® Use Cases for Financial Services
Apache Kafka® Use Cases for Financial Services
 
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
 
RabbitMQ & Kafka
RabbitMQ & KafkaRabbitMQ & Kafka
RabbitMQ & Kafka
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Developing Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache KafkaDeveloping Real-Time Data Pipelines with Apache Kafka
Developing Real-Time Data Pipelines with Apache Kafka
 
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes EverythingThe Rise Of Event Streaming – Why Apache Kafka Changes Everything
The Rise Of Event Streaming – Why Apache Kafka Changes Everything
 
The NixOS project and deploying systems declaratively
The NixOS project and deploying systems declarativelyThe NixOS project and deploying systems declaratively
The NixOS project and deploying systems declaratively
 
Kubernetes Basics
Kubernetes BasicsKubernetes Basics
Kubernetes Basics
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
Docker swarm
Docker swarmDocker swarm
Docker swarm
 
Intro to Kapacitor for Alerting and Anomaly Detection
Intro to Kapacitor for Alerting and Anomaly DetectionIntro to Kapacitor for Alerting and Anomaly Detection
Intro to Kapacitor for Alerting and Anomaly Detection
 
Cloud Native Application Development
Cloud Native Application DevelopmentCloud Native Application Development
Cloud Native Application Development
 
Kafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced ProducersKafka Tutorial: Advanced Producers
Kafka Tutorial: Advanced Producers
 
Apache Kafka® and API Management
Apache Kafka® and API ManagementApache Kafka® and API Management
Apache Kafka® and API Management
 
Secure Kafka at scale in true multi-tenant environment ( Vishnu Balusu & Asho...
Secure Kafka at scale in true multi-tenant environment ( Vishnu Balusu & Asho...Secure Kafka at scale in true multi-tenant environment ( Vishnu Balusu & Asho...
Secure Kafka at scale in true multi-tenant environment ( Vishnu Balusu & Asho...
 

Similar a Building Real-time Push APIs Using Kafka as the Customer Facing Interface with Javier Moreno Molina

Cscc cloud-customer-architecture-for-e commerce
Cscc cloud-customer-architecture-for-e commerceCscc cloud-customer-architecture-for-e commerce
Cscc cloud-customer-architecture-for-e commerce
r_arorabms
 

Similar a Building Real-time Push APIs Using Kafka as the Customer Facing Interface with Javier Moreno Molina (20)

Forecast key1 0615_ak_evening
Forecast key1 0615_ak_eveningForecast key1 0615_ak_evening
Forecast key1 0615_ak_evening
 
Apidays Paris 2023 - Accelerating and Securing Transversal Processes Automati...
Apidays Paris 2023 - Accelerating and Securing Transversal Processes Automati...Apidays Paris 2023 - Accelerating and Securing Transversal Processes Automati...
Apidays Paris 2023 - Accelerating and Securing Transversal Processes Automati...
 
Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture Introduction to Event-Driven Architecture
Introduction to Event-Driven Architecture
 
OEM - запчасти на проводе
OEM - запчасти на проводеOEM - запчасти на проводе
OEM - запчасти на проводе
 
CARE initiative technical prospectus
CARE initiative technical prospectusCARE initiative technical prospectus
CARE initiative technical prospectus
 
Indonesian e-Commerce requires Scalability, Reliability and Security to Achi...
Indonesian e-Commerce requires Scalability,  Reliability and Security to Achi...Indonesian e-Commerce requires Scalability,  Reliability and Security to Achi...
Indonesian e-Commerce requires Scalability, Reliability and Security to Achi...
 
Sonoa Cloud Services for Elasticity and Mobility
Sonoa Cloud Services for Elasticity and MobilitySonoa Cloud Services for Elasticity and Mobility
Sonoa Cloud Services for Elasticity and Mobility
 
IBM APM for Hybrid Applications
IBM APM for Hybrid ApplicationsIBM APM for Hybrid Applications
IBM APM for Hybrid Applications
 
ICC Data and Device management
ICC Data and Device managementICC Data and Device management
ICC Data and Device management
 
Cloud Options for a Modern Architecture
Cloud Options for a Modern ArchitectureCloud Options for a Modern Architecture
Cloud Options for a Modern Architecture
 
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
 
At 306 Case Study The Newest Shipping Systems Its All About Rapid Informa...
At 306   Case Study   The Newest Shipping Systems Its All About Rapid Informa...At 306   Case Study   The Newest Shipping Systems Its All About Rapid Informa...
At 306 Case Study The Newest Shipping Systems Its All About Rapid Informa...
 
Gaining Instant Insight Into Your Critical SaaS Apps With Collective Intellig...
Gaining Instant Insight Into Your Critical SaaS Apps With Collective Intellig...Gaining Instant Insight Into Your Critical SaaS Apps With Collective Intellig...
Gaining Instant Insight Into Your Critical SaaS Apps With Collective Intellig...
 
Supply chain for next generation
Supply chain for next generationSupply chain for next generation
Supply chain for next generation
 
Build end-to-end solutions with BlueMix, Avi Vizel & Ziv Dai, IBM
Build end-to-end solutions with BlueMix, Avi Vizel & Ziv Dai, IBMBuild end-to-end solutions with BlueMix, Avi Vizel & Ziv Dai, IBM
Build end-to-end solutions with BlueMix, Avi Vizel & Ziv Dai, IBM
 
Cloud Modernization and Data as a Service Option
Cloud Modernization and Data as a Service OptionCloud Modernization and Data as a Service Option
Cloud Modernization and Data as a Service Option
 
A Breif On Cloud computing
A Breif On Cloud computingA Breif On Cloud computing
A Breif On Cloud computing
 
Bmc joe goldberg
Bmc joe goldbergBmc joe goldberg
Bmc joe goldberg
 
LeadMaster Cloud Computing Presentation
LeadMaster Cloud Computing PresentationLeadMaster Cloud Computing Presentation
LeadMaster Cloud Computing Presentation
 
Cscc cloud-customer-architecture-for-e commerce
Cscc cloud-customer-architecture-for-e commerceCscc cloud-customer-architecture-for-e commerce
Cscc cloud-customer-architecture-for-e commerce
 

Más de HostedbyConfluent

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
HostedbyConfluent
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
HostedbyConfluent
 

Más de HostedbyConfluent (20)

Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Renaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit LondonRenaming a Kafka Topic | Kafka Summit London
Renaming a Kafka Topic | Kafka Summit London
 
Evolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at TrendyolEvolution of NRT Data Ingestion Pipeline at Trendyol
Evolution of NRT Data Ingestion Pipeline at Trendyol
 
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking TechniquesEnsuring Kafka Service Resilience: A Dive into Health-Checking Techniques
Ensuring Kafka Service Resilience: A Dive into Health-Checking Techniques
 
Exactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and KafkaExactly-once Stream Processing with Arroyo and Kafka
Exactly-once Stream Processing with Arroyo and Kafka
 
Fish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit LondonFish Plays Pokemon | Kafka Summit London
Fish Plays Pokemon | Kafka Summit London
 
Tiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit LondonTiered Storage 101 | Kafla Summit London
Tiered Storage 101 | Kafla Summit London
 
Building a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And WhyBuilding a Self-Service Stream Processing Portal: How And Why
Building a Self-Service Stream Processing Portal: How And Why
 
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
From the Trenches: Improving Kafka Connect Source Connector Ingestion from 7 ...
 
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
Future with Zero Down-Time: End-to-end Resiliency with Chaos Engineering and ...
 
Navigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka ClustersNavigating Private Network Connectivity Options for Kafka Clusters
Navigating Private Network Connectivity Options for Kafka Clusters
 
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data PlatformApache Flink: Building a Company-wide Self-service Streaming Data Platform
Apache Flink: Building a Company-wide Self-service Streaming Data Platform
 
Explaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy PubExplaining How Real-Time GenAI Works in a Noisy Pub
Explaining How Real-Time GenAI Works in a Noisy Pub
 
TL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit LondonTL;DR Kafka Metrics | Kafka Summit London
TL;DR Kafka Metrics | Kafka Summit London
 
A Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSLA Window Into Your Kafka Streams Tasks | KSL
A Window Into Your Kafka Streams Tasks | KSL
 
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing PerformanceMastering Kafka Producer Configs: A Guide to Optimizing Performance
Mastering Kafka Producer Configs: A Guide to Optimizing Performance
 
Data Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and BeyondData Contracts Management: Schema Registry and Beyond
Data Contracts Management: Schema Registry and Beyond
 
Code-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink AppsCode-First Approach: Crafting Efficient Flink Apps
Code-First Approach: Crafting Efficient Flink Apps
 
Debezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC EcosystemDebezium vs. the World: An Overview of the CDC Ecosystem
Debezium vs. the World: An Overview of the CDC Ecosystem
 
Beyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local DisksBeyond Tiered Storage: Serverless Kafka with No Local Disks
Beyond Tiered Storage: Serverless Kafka with No Local Disks
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Building Real-time Push APIs Using Kafka as the Customer Facing Interface with Javier Moreno Molina

  • 1. Internal Building Real-time Push APIs Using Kafka as the Customer Facing Interface Javier Moreno Molina
  • 2. Javier Moreno Molina Building Real-time Push APIs Using Kafka as the Customer Facing Interface
  • 3. Internal 3 Mercedes-Benz Connectivity Services - Introduction - Event-Driven APIs - Push vs. Pull - An Event-Driven API Ecosystem - Conclusion & Outlook - Q & A Outline
  • 4. Mercedes-Benz Connectivity Services 4 JAVIER MORENO MOLINA Solutions Architect | since 2018 Mercedes-Benz Connectivity Services GmbH - Focus on DevOps, Platform & Infrastructure - Interest on Distributed Systems and Communication About me.
  • 5. Internal Mercedes-Benz Connectivity Services 5 We develop, operate and offer connectivity services that provide various vehicle data points & vehicle indicators. Introduction Mercedes-Benz Connectivity Services GmbH WHO WE ARE As a connectivity and data service provider in the automotive sector, Mercedes-Benz Connectivity Services GmbH offers innovative data-based product solutions. WHAT WE OFFER We create digital solutions based on real-time data from measuring points and signals of connected Mercedes-Benz vehicles worldwide. This data is used to generate added value for products and processes in companies from a wide range of industries. HOW WE HELP We help our customers to increase their process quality and efficiency, improve customer experiences, act more sustainably or develop new business models. WHO WE SERVE •car & van fleet operators and their service providers • •car rental companies• •leasing companies• •insurance companies• •neutral servers• • pp & software developers•
  • 6. Internal Mercedes-Benz Connectivity Services 6 Our history: coming from a fleet management portal to an API with flexible data packages for cars and vans. Introduction 2015 – 2016 IDEATION - Fleet management product: portal for fleet managers and app for drivers, as well as portal for dealers - Target groups: small and middle size companies, leasing companies, rentals, dealers 2017 GO LIVE CONNECT BUSINESS - 3 services: vehicle management, tracking and driver´s log - 2 customer frontends and 1 web based portal 2018 GO LIVE CONNECT BUSINESS-API - Request of middle size and large customers to consume the portal services additionally via an API - Pull API Partner concept enabled 2019 ADAPTION OF TARGET GROUPS AND STRATEGY - The demand for APIs is growing continuously - the services at that time were not flexible enough to meet the requirements of our customers - Push API is found to be more attractive for customers 2020 CONNECT YOUR BUSINESS API - 12 service packages with several data signals and data points cover wide range of use cases - Service packages can be activated on a vehicle- level - Target group: Third party providers to enrich their own products & large customers to manage their own fleet
  • 7. Internal Mercedes-Benz Connectivity Services 7 Our connect your business API is highly recognized within the industry and was selected #1 at the 2023 DEVIES Awards & 2022 API Awards. Introduction With the connect your business API, we aim to create a holistic ecosystem around the connected car together with various partners. The API enables third party providers to enrich own products and business models with Mercedes-Benz vehicle data, without the need for a retrofit solution. This network of partners will be the cornerstone for the development of many new databased solutions in the future. The awards were both presented during the world’s largest developer and microservices conferences & expos in California. The Advisory Board to the Awards has selected our technology based on three criteria: 1. attracting notable attention and awareness in the API & software industry, 2. general regard & use by the developer & engineering community, 3. being a technical leader in its sector for innovation.
  • 8. Internal Mercedes-Benz Connectivity Services 8 We know that secure and responsible handling of data is the basis for the acceptance of connected driving. We therefore pursue new technical developments with three clear principles in mind and integrate them into our products (privacy-by-design): Privacy is a high priority for us. Introduction 1 2 3 Transparency: The customer must know when which data is collected and for which purpose. In the sales information, the Mercedes me App, the Operator's Manual and the Terms of Use, we inform the customer comprehensively about the data processing. Where possible, even directly in the vehicle. Self-determination: The customer decides which services he actually uses and which data he wants to share either by consent, contract or by touching a button. Data security: The high safety requirements of our customers apply equally to the data security of the connected vehicle. Mercedes-Benz protects customer data against manipulation and misuse. With regard to IT technological progress, we continuously develop data security.
  • 10. Internal Mercedes-Benz Connectivity Services 10 APIs are everywhere today and have been for a while. Most of them are Request-Based (REST). Many IoT use cases demand Event-Based communication: - Real-Time Data Delivery - Delivery on relevant ocurrence However, there is no clear or standard way to offer event-driven interfaces as it occurs in REST. IoT and Event Driven APIs Event-Driven APIs
  • 11. Internal Mercedes-Benz Connectivity Services 11 Event Driven APIs challenges Event-Driven APIs SPECIFICATIONS - There are widely accepted Interface Specifications for REST - OpenAPI - RAML - No clear specification standard for event-based interfaces - AsyncAPI? COMMUNICATION COMPLEXITY - Uncertainty and variability of - Data Volume - Message Rate - Wrong coordination may destroy use case feasibility - Superfluous data processing - Latency ROLE OF CONSUMER DEPENDABILITY - Availability - REST: From request to response - Unavailable consumers may impact the service provider - Security and Access - REST: authorizing at request time - Difficult after data processing
  • 13. Internal Mercedes-Benz Connectivity Services 13 Push Examples: Webhooks Push vs. Pull HETEROGENEITY - No Standards - Payload Ownership - Assumptions on consumer capacity OPERATIONAL COMPLEXITY - Failures on consumer side need specific actions on sender side - Retries - Replays SCALABILITY - HTTP Post requests typically blocking - Retry management HTTP WEBHOOK SERVER ON CONSUMER INFRASTRUCTURE SECURITY - More difficult to enforce from client side
  • 14. Internal Mercedes-Benz Connectivity Services 14 - Throughput limitations (routing, dequeuing, etc.) - Delivery Guarantees limitations (exactly once not possible at a system level) - Messages availability based on delivery status: - A retention policy is anyway required in case consumers are not available for a long time - No replays possible Push Examples: MQTT/AMQP Push vs. Pull
  • 15. Internal Mercedes-Benz Connectivity Services 15 Push vs. Pull Push vs. Pull Intuitively we think of event-driven APIs as Push APIs, but … can a Pull-based system be a good option in some scenarios? PULL • Requires polling • Allows freedom in consumption rate • Optimal throughput PUSH • Optimal bandwidth & latency • Limitations on Delivery Guarantees • Assumptions on Customer side
  • 16. Internal Mercedes-Benz Connectivity Services 16 What about Kafka? Push vs. Pull Kafka offers a Push API-like experience: - Publish/Subscribe - „Data Sending“ … but is a Pull-based implementation. 1 2 3 EFFICIENT LONG POLLING Kafka client hides polling logic. STATELESS MESSAGE MANAGEMENT Messages managed by log size or retention not consumption state. CLIENT INITIATED COMMUNICATION Data Consumers get messages matching their needs. No unavailable consumers overhead.
  • 17. Internal Mercedes-Benz Connectivity Services 17 B2B Context Push vs. Pull Bandwidth Utilization Mitigated by long polling Not relevant in Server to Server communication Smart Broker/Dumb Client Paradox: dumb clients are not easier to implement for the customer - Availability: Unavailable consumers have no operational burden (consume no resources) - vs. retry strategy and storage and memory size increase - Rate: Consumption is optimized to the available consumer resources - vs. broker can overload the client - Delivery: Consumer can decide on itself if a message delivery is successful or not and go back in time or request message replays if it detects any data loss. - vs. delivery ends with client acknowledgement. Support is difficult for any failure in the triggered logic after ack
  • 19. Internal Mercedes-Benz Connectivity Services 19 Complete the REST API Puzzle An Event-Driven API Ecosystem AUTHENTICATION OpenID Connect DOCUMENTATION OpenAPI AUTHORIZATION OAuth
  • 20. Internal Mercedes-Benz Connectivity Services 20 Authentication STANDARDS REST APIs already have well- established standards, such as OpenID Connect. SASL OAUTHBEARER Kafka supports OAUTHBEARER SASL authentication mechanism: OAuth 2.0 bearer tokens can be used for client authentication. COMMON AUTHENTICATION Most Event Driven APIs will also contain REST APIs. Using OAUTHBEARER there is no need for additional authentication mechanisms. No production ready OAuth 2.0 token management implementation in Kafka. We set up a repository with client code samples for OAuth consumers: - Available at: https://github.com/mercedes-benz/kafka-integration-samples - Currently on golang, C# and Python
  • 21. Internal Mercedes-Benz Connectivity Services 21 Authorization An Event-Driven API Ecosystem KAFKA ACLS Once authenticated, Kafka ACLs can be used to define permissions CONTENT AUTHORIZATION Only based on Topic CONCURRENT CONSUMERS Can be controlled based on Group Resources: - Cluster - Topic - Group - Transactional ID - Delegation token Cannot authorize for specific messages inside a topic. Every specific data access policy requires a topic. Number of required topics must be analyzed. Consumer may only join to in ACLs allowed Consumer Groups. For a consumer group, the maximum number of effective clients is the number of topic partitions. If more are created they will remain idle.
  • 22. Internal Mercedes-Benz Connectivity Services 22 There are many specifications for REST APIs documentation like OpenAPI, RAML, etc. with OpenAPI 3.0 being currently the most popular option. OpenAPI belongs to The Linux Foundation. We already use OpenAPI to document our REST APIs. AsyncAPI is also a Linux Foundation initiative to specify asynchronous APIs. It is compatible with OpenAPI schemas. https://developer.mercedes-benz.com/products/connect_your_business/specifications/push_api Event API Documentation - AsyncAPI An Event-Driven API Ecosystem
  • 24. Internal Mercedes-Benz Connectivity Services 24 Recap & Outlook Conclusion & Outlook Event Driven APIs are still far from the maturity and adoption of REST APIs. 1 Push-Based implementations are complex, specially when there are many consumers that are not under your control and in scenarios that require high througput. 2 A complete Event Driven API ecosystem can be built on top of Kafka, with REST API similar authentication (OpenID Connect/OAuth 2.0) and Documentation (AsyncAPI). 3 Last-mile B2C delivery is in many cases not suitable for Pull-based approach, even with Kafka optimizations. 4 Pull-based can be a good option, in particular in B2B contexts. Kafka is already inside most real- time data architectures. 5
  • 25. Internal Mercedes-Benz Connectivity Services WE ARE HIRING! OPEN POSITIONS : - SOLUTION ARCHITECT - SOFTWARE DEVELOPMENT ENGINEER - SITE RELIABILITY ENGINEER - TEST ENGINEER J O I N O U R T E A M APPLY NOW www.connectivity.mercedes-benz.com 25 Conclusion & Outlook
  • 26. Internal Mercedes-Benz Connectivity Services 26 Q & A Thank you … Questions?