SlideShare a Scribd company logo
Synchronous Kafka
Neil Buesing
Kafka Summit 2020
@nbuesing
Synchronous Commands over Apache Kafka
Producer
Messaging
Consumer
Command/
Response
• Something that should happen
• Tell others what to do
• Presumption of a response
• Ask questions from others
Request (Command) Driven
• Something that has happened
• Tell others what you did
• No presumption of a response
• Others determine what they do
Event Driven
Quizzer
Web
Application
Single Page
Application
Load
Balancer
Application Design
Quizzer
quiz-start
quiz-next
quiz-result
quiz-submit
Builder
questions
difficulty
quiz
quiz-status
API Database
Quizzer - Streams Application
Submit
Next
Result
Quiz
Users
Aggregate
(KTable)
Questions
Difficulty
Global KTable
KTable
KTable
Start
Status
Quizzer - Streams Application
• https://events.confluent.io/meetups

• "Building a Web Application with Kafka as your
Database", March 24th, 2020

• "Interactive Kafka Streams", May 21st, 2020
Load
Balancer
Web
Application
Web Application Design
Http Status
Request (Command) Driven Event Driven
Web
Application
Web Application Design
202
Accepted
200
OK
Event Driven Design
This is not always possible
Web
Application
Web Application Design
200 OK
201 CREATE
Blocking / Command Driven Design
When redesign is not an option
• Websockets
• Server Sent Events
Web
Application
Web Application Design
202
Accepted
CQRS / Command Driven Design
200
OK
Web
Application
Web Application Design
202
Accepted
200
OK
CQRS / Command Driven Design
Command Driven Design
the legacy app / blocking
The Legacy App
Web
Application
200
OK
200
OK
• How do you block in the web
application?
• How do you ensure the correct
web application instance that
publishes to Kafka is able to
consume the response topic.
Legacy Application, expects 200/OK Response
Blocking
Blocking
waiting for the response
Blocking Options
• Techniques to block for a response message in a
JVM Application.
• Countdown Latch
• Deferred Result (Spring MVC)
Blocking - Countdown Latch
• Algorithm
• Publish to Kafka
• Block on Latch
• Release Latch (Consumer from Kafka in separate thread)
Blocking - Countdown Latch
Object waitForResponse(String requestId) {
CountDownLatch l = new CountDownLatch(1);
CountDownLatch racer = latchByRequestId.putIfAbsent(requestId, l);
if (racer != null) l = racer;
//block
boolean success = l.await(timeoutMs, TimeUnit.MILLISECONDS);
if (success) {
//remove response from shared map
return responseByRequestId.remove(requestId);
} else {
throw new CorrelationException("Timeout: " + requestId);
}
}
Blocking - Countdown Latch
void addResponse(String id, Object response) {
CountDownLatch l = new CountDownLatch(1);
CountDownLatch r = latchByRequestId.putIfAbsent(id, l);
if (r != null) l = r; //usually
//make response available for blocking thread
responseByRequestId.put(id, response);
l.countDown(); //unblock
}
Blocking - Countdown Latch
• Pros
• Standard Java code Java code (since 1.5)
• Can be used anywhere
• Cons
• Blocks request thread
• Limits incoming requests (Servlet Container)
• Increases resource consumption
Blocking - Deferred Result
• Offloads to secondary thread
• Less coding
• Specific to Spring MVC
• CompletableFuture interface supported
• Other Web frameworks have this too
Blocking - Deferred Result
Cache<String, DeferredResult> cache =
CacheBuilder.newBuilder().maximumSize(1000).build();
DeferredResult waitForResponse(String requestId) {
DeferredResult deferredResult = new DeferredResult(5000L);
cache.put(requestId, deferredResult);
return deferredResult; //no actual waiting here, spring does that.
}
Blocking - Deferred Result
void addResponse(String requestId, JsonNode resp) {
DeferredResult result = cache.getIfPresent(requestId);
if (result != null) {
ResponseEntity<JsonNode> content = new ResponseEntity<>(resp, OK);
result.setResult(content); //unblocks response
cache.invalidate(requestId);
}
}
Consuming
consume from same instance
Solutions
• Single Topic & consumer.assign()

• Topics for each Web Application

• Single Topic & consumer.subscribe()
Consuming Response Topic
Web
Application
quiz-next-0
quiz-submit
200
OK
quiz-next-1
quiz-next-2
quiz-next-3
Single Topic 

consumer.assign()
Consuming - 1 Topic & Assignment
• every Web Application assigns themselves to all partitions

• request-id in Kafka Header

• response topic must have header (automatic in Kafka Streams)

• key free for other uses, doesn't have to be the request-id

• all web applications get all messages

• discard messages where request-id doesn't exist

• don't deserialize key/value before checking header
Consuming - 1 Topic & Assignment
• Pros

• Can spin up additional web-applications w/out creating
topics

• Not limited to the number of partitions

• Correlation ID (request Id) does not have 

to be key.

• No pause with a consumer group rebalancing.
Consuming - 1 Topic & Assignment
• Cons

• Every Web Application has to consume ever message

• Have to check and deserialize request-id header
quiz-next-2quiz-next-2quiz-next-2
quiz-next-1quiz-next-1quiz-next-1
quiz-next-a-1quiz-next-a-1quiz-next-a-1
Consuming Response Topic
Web
Application
quiz-next-a-0
quiz-submit
200
OK
quiz-next-b-0
quiz-next-c-0
Multiple Topics 

Topics for each 

Web Application
Consuming - Topic / Web App
• Every web application gets its own topic

• additional header, resp-topic.

• Streaming application responds to the topic defined in
the header

• TopicNameExtractor (access to headers)

.to((k, v, context) -> 

bytesToString(context.headers().lastHeader("resp-topic").value()));
Consuming - Topic / Web App
• Pros

• Only consume messages you produced

• No pause from a consumer group rebalancing

• no additional burden or assumption on

use of key.
Consuming - Topic / Web App
• Cons

• More work on streaming application to respond to the
proper topic.

• Must create a topic for every web application
instance

• Responses spanned across multiple topics
Consuming Response Topic
Web
Application
quiz-next-0
quiz-submit
200
OK
quiz-next-1
quiz-next-2
quiz-next-3
Single Topic

consumer.subscribe()
Consuming - 1 Topic & Subscribe
• consumer.subscribe("response-topic", rebalListener)
• considerations 

• is the topic key based on data from the

incoming request?

• how sophisticated is your Load Balancer?
Consuming - 1 Topic & Subscribe
• Topic Key is known value (quiz_id vs request_id)
• route to all, "Not Me"
• Topic Key is not a known value (request_id)
• round-robin route to web-service and check 

hash before using generated key.

• Have LB generate request-id and hash

performed before routing (LB needs more info)
Load Balancer - NGINX
server {
location / {
js_content content;
}
location /rh1 {
rewrite /rh1/(.*) /$1 break;
}
location /rh2 {
rewrite /rh2/(.*) /$1 break;
}
}
}
function content(r) {
function done(res) {
if (303 !== res.status) { // "Not Me" Check
for (var h in res.headersOut) {
r.headersOut[h] = res.headersOut[h];
}
r.return(res.status, res.responseBody);
}
}
r.subrequest('/rh1' + r.uri, {
args: r.variables.args,
body: r.requestBody,
method: 'POST'},
done);
r.subrequest('/rh2' + r.uri, {
args: r.variables.args,
body: r.requestBody,
method: 'POST'},
done);
}
Consuming - 1 Topic & Subscribe
• Pros

• Leverages most common Consumer Group Pattern

• No burden on streaming applications

• KIP-429

Kafka Consumer Incremental Rebalance Protocol

• Only a single consumer processes the message
Consuming - 1 Topic & Subscribe
• Cons

• More coordination depending on topic key

• Responses paused during a rebalancing

• Partitions moving consumers on rebalance

• Key and Partitioning concerns 

minimized when using with CQRS.
Command Driven Design
the interactive application
• No need to block in Web
application.
• No need to route request back
to specific instance
• Requires Fully Accessible State
Web
Application
Command Query Responsibility Segregation
200
OK
202
Accepted
Querying
• No need to block in Web
application.
• Route request back to same
instance
• State / Web Application State
Web
Application
Command Query Responsibility Segregation
202
Accepted
200
OK
Querying
Blocking Querying
getting for the response
Leveraging Http Redirects
• 303 See Other

• Client will redirect and convert to GET

• Unfortunately, browsers handle location, so AJAX
solutions require additional work.

• CORs and allowed headers

• Build your own rules requires specific API contract
Consuming
consume from state store
State Stores
• Global State Store

• Doesn't matter which Web Service handles the query

• examples

• microservice (web service doesn't need to know)

• ksqlDB (while it might Shard the data, it is queries as a single
unit)

• any key=value datastore (Cassandra, Mongo, MemCache)
State Stores
• Embedded Shard State Store

• Need to route/reroute query to the correct Web Service

• Leverage Load Balancer

• Inter web-service communication (as in Kafka Streams Metadata
API)

• Kafka Streams Examples / Microservices / OrderService.java /
fetchFromOtherHost

https://github.com/confluentinc/kafka-streams-examples/blob/master/src/main/java/io/confluent/examples/streams/microservices/OrdersService.java



Kafka Streams State Stores
• 1 Topic & subscribe() streams consumer within Web Service

• KIPS

• KIP-429 (Kafka 2.4)

Kafka Consumer Incremental Rebalance Protocol

• Allow consumer.poll() to return data in the middle of rebalance (https://issues.apache.org/jira/
browse/KAFKA-8421) (Kafka 2.5)

• KIP-535 (Kafka 2.5)

Allow state stores to serve stale reads during rebalance

• KIP-562 (Kafka 2.5)

Allow fetching a key from a single partition rather than iterating over all the stores on an instance

• KIP-441 (Expected, Kafka 2.6)

Smooth Scaling Out for Kafka Streams
Kafka Streams State Stores
• Things to consider

• Minimize duration of data being stored

• Isolate (minimize) topologies, reduce
session.timeout.ms

• stand by replicas
ksqldb State Store
• leverage client for table queries

• Table must be created by KSQL operation

• latest_by_offset() function works well for this

• want state-stores to be self cleaning

• leverage windowing

• ksql state store queries handles all windowed stores
ksqldb State Store
create stream QUIZ_NEXT with (KAFKA_TOPIC='quiz_next', VALUE_FORMAT='avro');
create table KSQL_QUIZ_NEXT as 

select request_id, 

latest_by_offset(quiz_id) as quiz_id,

latest_by_offset(user_id) as user_id,

latest_by_offset(question_id) as question_id,

latest_by_offset(statement) as statement,

latest_by_offset(a) as a,

latest_by_offset(b) as b,

latest_by_offset(c) as c,

latest_by_offset(d) as d,

latest_by_offset(difficulty) as difficulty

from QUIZ_NEXT

window tumbling (size 30 seconds)

group by request_id;
ksqldb State Store
create stream QUIZ_RESULT with (KAFKA_TOPIC='quiz_result', VALUE_FORMAT='avro');



create table KSQL_QUIZ_RESULT as 

select request_id, 

latest_by_offset(quiz_id) as quiz_id, 

latest_by_offset(user_id) as user_id, 

latest_by_offset(user_name) as user_name, 

latest_by_offset(questions) as questions, 

latest_by_offset(correct) as correct 

from QUIZ_RESULT

window tumbling (size 30 seconds)

group by request_id;
BatchedQueryResult result = 

client.executeQuery(

"SELECT * FROM KSQL_QUIZ_NEXT where " +

"REQUEST_ID='" + requestId + "';");
List<Row> list = result.get();
int last = list.size() - 1;



map.put("quiz_id", list.get(last).getString("QUIZ_ID"));

...
ksqldb Queries
Final Thoughts
• if using consumer groups, design with rebalancing in mind.

• Explore options with your Load Balancer.

• CQRS w/ Kafka Streams as your State Store

• 2.5+

• Minimize Topology Complexity

• Minimize changelog data by leveraging windowing or proper
tombstoning.
Resources
• Book Event Driven Systems

• https://www.confluent.io/wp-content/uploads/
confluent-designing-event-driven-systems.pdf

• Source Code

• http://github.com/nbuesing/quizzer
Thanks
Kafka Summit
Confluent
Object Partners, Inc.
Questions
@nbuesing
https://buesing.dev/post/ks2020
nbuesing http://www.objectpartners.com

More Related Content

What's hot

Kafka clients and emitters
Kafka clients and emittersKafka clients and emitters
Kafka clients and emitters
Edgar Domingues
 
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS SummitCanary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Amazon Web Services
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!
Guido Schmutz
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?
confluent
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
StreamNative
 
Loki - like prometheus, but for logs
Loki - like prometheus, but for logsLoki - like prometheus, but for logs
Loki - like prometheus, but for logs
Juraj Hantak
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
Araf Karsh Hamid
 
Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...
Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...
Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...
confluent
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Lucas Jellema
 
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
StreamNative
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
CloudOps2005
 
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniertFast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
confluent
 
Introduction to Kafka Streams
Introduction to Kafka StreamsIntroduction to Kafka Streams
Introduction to Kafka Streams
Guozhang Wang
 
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesCloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Nikhil Thomas
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
HostedbyConfluent
 
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
HostedbyConfluent
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
Guido Schmutz
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
Araf Karsh Hamid
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
Araf Karsh Hamid
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3
SANG WON PARK
 

What's hot (20)

Kafka clients and emitters
Kafka clients and emittersKafka clients and emitters
Kafka clients and emitters
 
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS SummitCanary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
 
ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!ksqlDB - Stream Processing simplified!
ksqlDB - Stream Processing simplified!
 
Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?Kafka Streams: What it is, and how to use it?
Kafka Streams: What it is, and how to use it?
 
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
MoP(MQTT on Pulsar) - a Powerful Tool for Apache Pulsar in IoT - Pulsar Summi...
 
Loki - like prometheus, but for logs
Loki - like prometheus, but for logsLoki - like prometheus, but for logs
Loki - like prometheus, but for logs
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...
Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...
Apache kafka meet_up_zurich_at_swissre_from_zero_to_hero_with_kafka_connect_2...
 
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
Microservices, Apache Kafka, Node, Dapr and more - Part Two (Fontys Hogeschoo...
 
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
Streaming Millions of Contact Center Interactions in (Near) Real-Time with Pu...
 
GitOps with ArgoCD
GitOps with ArgoCDGitOps with ArgoCD
GitOps with ArgoCD
 
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniertFast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
Fast Data – Fast Cars: Wie Apache Kafka die Datenwelt revolutioniert
 
Introduction to Kafka Streams
Introduction to Kafka StreamsIntroduction to Kafka Streams
Introduction to Kafka Streams
 
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton PipelinesCloud-Native CI/CD on Kubernetes with Tekton Pipelines
Cloud-Native CI/CD on Kubernetes with Tekton Pipelines
 
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
Bringing Kafka Without Zookeeper Into Production with Colin McCabe | Kafka Su...
 
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
Exactly-Once Semantics Revisited: Distributed Transactions across Flink and K...
 
Microservices with Kafka Ecosystem
Microservices with Kafka EcosystemMicroservices with Kafka Ecosystem
Microservices with Kafka Ecosystem
 
Service Mesh - Observability
Service Mesh - ObservabilityService Mesh - Observability
Service Mesh - Observability
 
Microservices, DevOps & SRE
Microservices, DevOps & SREMicroservices, DevOps & SRE
Microservices, DevOps & SRE
 
Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3Apache kafka performance(latency)_benchmark_v0.3
Apache kafka performance(latency)_benchmark_v0.3
 

Similar to Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) Kafka Summit 2020

Building a Web Application with Kafka as your Database
Building a Web Application with Kafka as your DatabaseBuilding a Web Application with Kafka as your Database
Building a Web Application with Kafka as your Database
confluent
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
Amazon Web Services Japan
 
Rails Request & Middlewares
Rails Request & MiddlewaresRails Request & Middlewares
Rails Request & MiddlewaresSantosh Wadghule
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1Mohammad Qureshi
 
StackMate - CloudFormation for CloudStack
StackMate - CloudFormation for CloudStackStackMate - CloudFormation for CloudStack
StackMate - CloudFormation for CloudStack
Chiradeep Vittal
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
David M. Johnson
 
Jdbc presentation
Jdbc presentationJdbc presentation
Jdbc presentation
nrjoshiee
 
Exploring Relay land
Exploring Relay landExploring Relay land
Exploring Relay land
Stefano Masini
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
Orkhan Gasimov
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
CellarTracker
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
reeder29
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
Kevin Webber
 
London React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor CharyparLondon React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor Charypar
React London Community
 
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationNordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Rouven Weßling
 
Intro to sbt-web
Intro to sbt-webIntro to sbt-web
Intro to sbt-web
Marius Soutier
 
Gwt and rpc use 2007 1
Gwt and rpc use 2007 1Gwt and rpc use 2007 1
Gwt and rpc use 2007 1Sam Muhanguzi
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
Sam Brannen
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
Stuart (Pid) Williams
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
Speedment, Inc.
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
Malin Weiss
 

Similar to Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) Kafka Summit 2020 (20)

Building a Web Application with Kafka as your Database
Building a Web Application with Kafka as your DatabaseBuilding a Web Application with Kafka as your Database
Building a Web Application with Kafka as your Database
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
Rails Request & Middlewares
Rails Request & MiddlewaresRails Request & Middlewares
Rails Request & Middlewares
 
Intro to node and mongodb 1
Intro to node and mongodb   1Intro to node and mongodb   1
Intro to node and mongodb 1
 
StackMate - CloudFormation for CloudStack
StackMate - CloudFormation for CloudStackStackMate - CloudFormation for CloudStack
StackMate - CloudFormation for CloudStack
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Jdbc presentation
Jdbc presentationJdbc presentation
Jdbc presentation
 
Exploring Relay land
Exploring Relay landExploring Relay land
Exploring Relay land
 
Spring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloudSpring Cloud: API gateway upgrade & configuration in the cloud
Spring Cloud: API gateway upgrade & configuration in the cloud
 
Building production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stackBuilding production websites with Node.js on the Microsoft stack
Building production websites with Node.js on the Microsoft stack
 
JavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User ExperienceJavaScript Service Worker Design Patterns for Better User Experience
JavaScript Service Worker Design Patterns for Better User Experience
 
Play Framework and Activator
Play Framework and ActivatorPlay Framework and Activator
Play Framework and Activator
 
London React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor CharyparLondon React August - GraphQL at The Financial Times - Viktor Charypar
London React August - GraphQL at The Financial Times - Viktor Charypar
 
Nordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API DocumentationNordic APIs - Automatic Testing of (RESTful) API Documentation
Nordic APIs - Automatic Testing of (RESTful) API Documentation
 
Intro to sbt-web
Intro to sbt-webIntro to sbt-web
Intro to sbt-web
 
Gwt and rpc use 2007 1
Gwt and rpc use 2007 1Gwt and rpc use 2007 1
Gwt and rpc use 2007 1
 
Spring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. RESTSpring Web Services: SOAP vs. REST
Spring Web Services: SOAP vs. REST
 
Groovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentationGroovy & Grails eXchange 2012 vert.x presentation
Groovy & Grails eXchange 2012 vert.x presentation
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 

More from confluent

Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
confluent
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
confluent
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
confluent
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
confluent
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
confluent
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
confluent
 
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...
confluent
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
confluent
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
confluent
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
confluent
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
confluent
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
confluent
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
confluent
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
confluent
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
confluent
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
confluent
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
confluent
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
confluent
 

More from confluent (20)

Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Evolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI EraEvolving Data Governance for the Real-time Streaming and AI Era
Evolving Data Governance for the Real-time Streaming and AI Era
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Santander Stream Processing with Apache Flink
Santander Stream Processing with Apache FlinkSantander Stream Processing with Apache Flink
Santander Stream Processing with Apache Flink
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Workshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con FlinkWorkshop híbrido: Stream Processing con Flink
Workshop híbrido: Stream Processing con Flink
 
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...
 
AWS Immersion Day Mapfre - Confluent
AWS Immersion Day Mapfre   -   ConfluentAWS Immersion Day Mapfre   -   Confluent
AWS Immersion Day Mapfre - Confluent
 
Eventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalkEventos y Microservicios - Santander TechTalk
Eventos y Microservicios - Santander TechTalk
 
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent CloudQ&A with Confluent Experts: Navigating Networking in Confluent Cloud
Q&A with Confluent Experts: Navigating Networking in Confluent Cloud
 
Citi TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep DiveCiti TechTalk Session 2: Kafka Deep Dive
Citi TechTalk Session 2: Kafka Deep Dive
 
Build real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with ConfluentBuild real-time streaming data pipelines to AWS with Confluent
Build real-time streaming data pipelines to AWS with Confluent
 
Q&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service MeshQ&A with Confluent Professional Services: Confluent Service Mesh
Q&A with Confluent Professional Services: Confluent Service Mesh
 
Citi Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka MicroservicesCiti Tech Talk: Event Driven Kafka Microservices
Citi Tech Talk: Event Driven Kafka Microservices
 
Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3Confluent & GSI Webinars series - Session 3
Confluent & GSI Webinars series - Session 3
 
Citi Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging ModernizationCiti Tech Talk: Messaging Modernization
Citi Tech Talk: Messaging Modernization
 
Citi Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time dataCiti Tech Talk: Data Governance for streaming and real time data
Citi Tech Talk: Data Governance for streaming and real time data
 
Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2Confluent & GSI Webinars series: Session 2
Confluent & GSI Webinars series: Session 2
 
Data In Motion Paris 2023
Data In Motion Paris 2023Data In Motion Paris 2023
Data In Motion Paris 2023
 
Confluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with SynthesisConfluent Partner Tech Talk with Synthesis
Confluent Partner Tech Talk with Synthesis
 

Recently uploaded

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 

Recently uploaded (20)

From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 

Synchronous Commands over Apache Kafka (Neil Buesing, Object Partners, Inc) Kafka Summit 2020

  • 1. Synchronous Kafka Neil Buesing Kafka Summit 2020 @nbuesing Synchronous Commands over Apache Kafka
  • 2. Producer Messaging Consumer Command/ Response • Something that should happen • Tell others what to do • Presumption of a response • Ask questions from others Request (Command) Driven • Something that has happened • Tell others what you did • No presumption of a response • Others determine what they do Event Driven
  • 4. API Database Quizzer - Streams Application Submit Next Result Quiz Users Aggregate (KTable) Questions Difficulty Global KTable KTable KTable Start Status
  • 5. Quizzer - Streams Application • https://events.confluent.io/meetups • "Building a Web Application with Kafka as your Database", March 24th, 2020 • "Interactive Kafka Streams", May 21st, 2020
  • 6. Load Balancer Web Application Web Application Design Http Status Request (Command) Driven Event Driven
  • 7. Web Application Web Application Design 202 Accepted 200 OK Event Driven Design This is not always possible
  • 8. Web Application Web Application Design 200 OK 201 CREATE Blocking / Command Driven Design When redesign is not an option • Websockets • Server Sent Events
  • 11. Command Driven Design the legacy app / blocking
  • 12. The Legacy App Web Application 200 OK 200 OK • How do you block in the web application? • How do you ensure the correct web application instance that publishes to Kafka is able to consume the response topic. Legacy Application, expects 200/OK Response Blocking
  • 14. Blocking Options • Techniques to block for a response message in a JVM Application. • Countdown Latch • Deferred Result (Spring MVC)
  • 15. Blocking - Countdown Latch • Algorithm • Publish to Kafka • Block on Latch • Release Latch (Consumer from Kafka in separate thread)
  • 16. Blocking - Countdown Latch Object waitForResponse(String requestId) { CountDownLatch l = new CountDownLatch(1); CountDownLatch racer = latchByRequestId.putIfAbsent(requestId, l); if (racer != null) l = racer; //block boolean success = l.await(timeoutMs, TimeUnit.MILLISECONDS); if (success) { //remove response from shared map return responseByRequestId.remove(requestId); } else { throw new CorrelationException("Timeout: " + requestId); } }
  • 17. Blocking - Countdown Latch void addResponse(String id, Object response) { CountDownLatch l = new CountDownLatch(1); CountDownLatch r = latchByRequestId.putIfAbsent(id, l); if (r != null) l = r; //usually //make response available for blocking thread responseByRequestId.put(id, response); l.countDown(); //unblock }
  • 18. Blocking - Countdown Latch • Pros • Standard Java code Java code (since 1.5) • Can be used anywhere • Cons • Blocks request thread • Limits incoming requests (Servlet Container) • Increases resource consumption
  • 19. Blocking - Deferred Result • Offloads to secondary thread • Less coding • Specific to Spring MVC • CompletableFuture interface supported • Other Web frameworks have this too
  • 20. Blocking - Deferred Result Cache<String, DeferredResult> cache = CacheBuilder.newBuilder().maximumSize(1000).build(); DeferredResult waitForResponse(String requestId) { DeferredResult deferredResult = new DeferredResult(5000L); cache.put(requestId, deferredResult); return deferredResult; //no actual waiting here, spring does that. }
  • 21. Blocking - Deferred Result void addResponse(String requestId, JsonNode resp) { DeferredResult result = cache.getIfPresent(requestId); if (result != null) { ResponseEntity<JsonNode> content = new ResponseEntity<>(resp, OK); result.setResult(content); //unblocks response cache.invalidate(requestId); } }
  • 23. Solutions • Single Topic & consumer.assign()
 • Topics for each Web Application
 • Single Topic & consumer.subscribe()
  • 25. Consuming - 1 Topic & Assignment • every Web Application assigns themselves to all partitions • request-id in Kafka Header • response topic must have header (automatic in Kafka Streams) • key free for other uses, doesn't have to be the request-id • all web applications get all messages • discard messages where request-id doesn't exist • don't deserialize key/value before checking header
  • 26. Consuming - 1 Topic & Assignment • Pros • Can spin up additional web-applications w/out creating topics • Not limited to the number of partitions • Correlation ID (request Id) does not have 
 to be key. • No pause with a consumer group rebalancing.
  • 27. Consuming - 1 Topic & Assignment • Cons • Every Web Application has to consume ever message • Have to check and deserialize request-id header
  • 29. Consuming - Topic / Web App • Every web application gets its own topic • additional header, resp-topic. • Streaming application responds to the topic defined in the header • TopicNameExtractor (access to headers)
 .to((k, v, context) -> 
 bytesToString(context.headers().lastHeader("resp-topic").value()));
  • 30. Consuming - Topic / Web App • Pros • Only consume messages you produced • No pause from a consumer group rebalancing • no additional burden or assumption on
 use of key.
  • 31. Consuming - Topic / Web App • Cons • More work on streaming application to respond to the proper topic. • Must create a topic for every web application instance • Responses spanned across multiple topics
  • 33. Consuming - 1 Topic & Subscribe • consumer.subscribe("response-topic", rebalListener) • considerations • is the topic key based on data from the
 incoming request? • how sophisticated is your Load Balancer?
  • 34. Consuming - 1 Topic & Subscribe • Topic Key is known value (quiz_id vs request_id) • route to all, "Not Me" • Topic Key is not a known value (request_id) • round-robin route to web-service and check 
 hash before using generated key. • Have LB generate request-id and hash
 performed before routing (LB needs more info)
  • 35. Load Balancer - NGINX server { location / { js_content content; } location /rh1 { rewrite /rh1/(.*) /$1 break; } location /rh2 { rewrite /rh2/(.*) /$1 break; } } } function content(r) { function done(res) { if (303 !== res.status) { // "Not Me" Check for (var h in res.headersOut) { r.headersOut[h] = res.headersOut[h]; } r.return(res.status, res.responseBody); } } r.subrequest('/rh1' + r.uri, { args: r.variables.args, body: r.requestBody, method: 'POST'}, done); r.subrequest('/rh2' + r.uri, { args: r.variables.args, body: r.requestBody, method: 'POST'}, done); }
  • 36. Consuming - 1 Topic & Subscribe • Pros • Leverages most common Consumer Group Pattern • No burden on streaming applications • KIP-429
 Kafka Consumer Incremental Rebalance Protocol • Only a single consumer processes the message
  • 37. Consuming - 1 Topic & Subscribe • Cons • More coordination depending on topic key • Responses paused during a rebalancing • Partitions moving consumers on rebalance • Key and Partitioning concerns 
 minimized when using with CQRS.
  • 38. Command Driven Design the interactive application
  • 39. • No need to block in Web application. • No need to route request back to specific instance • Requires Fully Accessible State Web Application Command Query Responsibility Segregation 200 OK 202 Accepted Querying
  • 40. • No need to block in Web application. • Route request back to same instance • State / Web Application State Web Application Command Query Responsibility Segregation 202 Accepted 200 OK Querying
  • 42. Leveraging Http Redirects • 303 See Other • Client will redirect and convert to GET • Unfortunately, browsers handle location, so AJAX solutions require additional work. • CORs and allowed headers • Build your own rules requires specific API contract
  • 44. State Stores • Global State Store • Doesn't matter which Web Service handles the query • examples • microservice (web service doesn't need to know) • ksqlDB (while it might Shard the data, it is queries as a single unit) • any key=value datastore (Cassandra, Mongo, MemCache)
  • 45. State Stores • Embedded Shard State Store • Need to route/reroute query to the correct Web Service • Leverage Load Balancer • Inter web-service communication (as in Kafka Streams Metadata API) • Kafka Streams Examples / Microservices / OrderService.java / fetchFromOtherHost https://github.com/confluentinc/kafka-streams-examples/blob/master/src/main/java/io/confluent/examples/streams/microservices/OrdersService.java
 

  • 46. Kafka Streams State Stores • 1 Topic & subscribe() streams consumer within Web Service • KIPS • KIP-429 (Kafka 2.4)
 Kafka Consumer Incremental Rebalance Protocol • Allow consumer.poll() to return data in the middle of rebalance (https://issues.apache.org/jira/ browse/KAFKA-8421) (Kafka 2.5) • KIP-535 (Kafka 2.5)
 Allow state stores to serve stale reads during rebalance • KIP-562 (Kafka 2.5)
 Allow fetching a key from a single partition rather than iterating over all the stores on an instance • KIP-441 (Expected, Kafka 2.6)
 Smooth Scaling Out for Kafka Streams
  • 47. Kafka Streams State Stores • Things to consider • Minimize duration of data being stored • Isolate (minimize) topologies, reduce session.timeout.ms • stand by replicas
  • 48. ksqldb State Store • leverage client for table queries • Table must be created by KSQL operation • latest_by_offset() function works well for this • want state-stores to be self cleaning • leverage windowing • ksql state store queries handles all windowed stores
  • 49. ksqldb State Store create stream QUIZ_NEXT with (KAFKA_TOPIC='quiz_next', VALUE_FORMAT='avro'); create table KSQL_QUIZ_NEXT as 
 select request_id, 
 latest_by_offset(quiz_id) as quiz_id,
 latest_by_offset(user_id) as user_id,
 latest_by_offset(question_id) as question_id,
 latest_by_offset(statement) as statement,
 latest_by_offset(a) as a,
 latest_by_offset(b) as b,
 latest_by_offset(c) as c,
 latest_by_offset(d) as d,
 latest_by_offset(difficulty) as difficulty
 from QUIZ_NEXT
 window tumbling (size 30 seconds)
 group by request_id;
  • 50. ksqldb State Store create stream QUIZ_RESULT with (KAFKA_TOPIC='quiz_result', VALUE_FORMAT='avro');
 
 create table KSQL_QUIZ_RESULT as 
 select request_id, 
 latest_by_offset(quiz_id) as quiz_id, 
 latest_by_offset(user_id) as user_id, 
 latest_by_offset(user_name) as user_name, 
 latest_by_offset(questions) as questions, 
 latest_by_offset(correct) as correct 
 from QUIZ_RESULT
 window tumbling (size 30 seconds)
 group by request_id;
  • 51. BatchedQueryResult result = 
 client.executeQuery(
 "SELECT * FROM KSQL_QUIZ_NEXT where " +
 "REQUEST_ID='" + requestId + "';"); List<Row> list = result.get(); int last = list.size() - 1;
 
 map.put("quiz_id", list.get(last).getString("QUIZ_ID"));
 ... ksqldb Queries
  • 52. Final Thoughts • if using consumer groups, design with rebalancing in mind. • Explore options with your Load Balancer. • CQRS w/ Kafka Streams as your State Store • 2.5+ • Minimize Topology Complexity • Minimize changelog data by leveraging windowing or proper tombstoning.
  • 53. Resources • Book Event Driven Systems • https://www.confluent.io/wp-content/uploads/ confluent-designing-event-driven-systems.pdf • Source Code • http://github.com/nbuesing/quizzer