SlideShare a Scribd company logo
1 of 41
www.openweb.nl
Expose your Kafka with
GraphQL
How to build a frontend on an event based backend
www.openweb.nl
Gerard Klijs
3 years
some months
7+ years
4 years ago
1.5 years ago
3.5 years ago
www.openweb.nl
Overview
▰ Short introduction Kafka
▰ Demo project setup
▰ GraphQL interactions
▰ Demo
▰ Production ready?
www.openweb.nl
Kafka
www.openweb.nl
Kafka
www.openweb.nl
Kafka
?
www.openweb.nl
Kafka
www.openweb.nl
Micro services
www.openweb.nl
Demo project: overview
www.openweb.nl
Demo project: topics
"commands"
"account_creation_feedback"
"money_transfer_feedback"
"balance_changed"
[24 3 [:ConfirmAccountCreation :ConfirmMoneyTransfer] {:retention.ms -1}]
[24 3 [:AccountCreationConfirmed :AccountCreationFailed] {:retention.ms -1}]
[24 3 [:MoneyTransferConfirmed :MoneyTransferFailed] {:retention.ms -1}]
[24 3 [:BalanceChanged] {:retention.ms -1}]
www.openweb.nl
Lacinia
www.openweb.nl
Lacinia
www.openweb.nl
Query: extract data from derived state
www.openweb.nl
Query: extract data from derived state
query {
transactions_by_iban (
iban: “NL66OPEN0000000000”
max_items: 2) {
id
changed_by
}
}
www.openweb.nl
Query: extract data from derived state
query {
transactions_by_iban (
iban: “NL66OPEN0000000000”
max_items: 2) {
id
changed_by
}
}
{
“data”: {
“transactions_by_iban”: [
{ “id”: 27,
“changed_by” : “€12,34”},
{ “id”: 24,
“changed_by” : “€20,00”}
]
}
}
www.openweb.nl
Transaction service: component overview
www.openweb.nl
Subscription: filter stream of events
www.openweb.nl
Subscription: filter stream of events
subscription {
stream_transactions(
iban: “NL66OPEN0000000000”) {
id
changed_by
descr
}
}
www.openweb.nl
Subscription: filter stream of events
subscription {
stream_transactions(
iban: “NL66OPEN0000000000”) {
id
changed_by
descr
}
}
{
“stream_transactions”: {
“id”: 33,
“changed_by”: “€74,59”,
“descr”: “after query”
}
}
www.openweb.nl
Subscription: command, return reaction(s)
www.openweb.nl
Subscription: command, return reaction(s)
subscription {
get_account(
username: “gklijs”,
password: “test1234”) {
iban
token
}
}
www.openweb.nl
Subscription: command, return reaction(s)
subscription {
get_account(
username: “gklijs”,
password: “test1234”) {
iban
token
}
}
{
“get_account”: {
“iban”: ”NL48OPEN0098543109”,
“token”: “73737539836501732697”
}
}
www.openweb.nl
Account creation: component overview
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Account creation: process sequence diagram
www.openweb.nl
Money transfer: component overview
www.openweb.nl
Demo
graphql.gklijs.tech
Front-end served by Netlify, backend dockers on vm in
Frankfurt
www.openweb.nl
Running tests: goals
▰ Production like
▰ Keep increasing load
▰ Run for a long time
▰ Find the limits and
bottlenecks
www.openweb.nl
Running tests: average end to end Latency
www.openweb.nl
Running tests: throughput, transactions/sec
www.openweb.nl
Running tests: cpu GraphQL endpoint
www.openweb.nl
Scaling kafka applications
www.openweb.nl
Scaling kafka applications
?
www.openweb.nl
What we learned
▰ Three ways to build GraphQL into event sourcing
▰ Demo shows it’s viable, 300 new subscriptions/sec
▰ Demo has limited limited authentication and
authorization
▰ Scalability solvable but tricky
www.openweb.nl
Questions?
@GKlijs
gklijs https://github.com/openweb-nl/kafka-graphql-examples
dev.to/gklijs/the-human-side-of-open-bank-mark-3o4b
www.slideshare.net/GerardKlijs
https://www.therepl.net/

More Related Content

What's hot

7 17 event_logging_architecture 1
7 17 event_logging_architecture 17 17 event_logging_architecture 1
7 17 event_logging_architecture 1
ss_testing
 

What's hot (13)

Helen Duriez #crossref15
Helen Duriez #crossref15Helen Duriez #crossref15
Helen Duriez #crossref15
 
BrikL - A GraphQL Native - GraphQL Asia 2019
BrikL - A GraphQL Native - GraphQL Asia 2019BrikL - A GraphQL Native - GraphQL Asia 2019
BrikL - A GraphQL Native - GraphQL Asia 2019
 
Cenit IO - API Economy
Cenit IO - API EconomyCenit IO - API Economy
Cenit IO - API Economy
 
Leveraging APIs from SharePoint Framework solutions
Leveraging APIs from SharePoint Framework solutionsLeveraging APIs from SharePoint Framework solutions
Leveraging APIs from SharePoint Framework solutions
 
Online Ad posting process with daily and hourly income
Online Ad posting process with daily and hourly incomeOnline Ad posting process with daily and hourly income
Online Ad posting process with daily and hourly income
 
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
Shift Remote: WEB - GraphQL and React – Quick Start - Dubravko Bogovic (Infobip)
 
GCF Application server
GCF Application serverGCF Application server
GCF Application server
 
Dynamic layout and transitions with expression blend 4 (30 Abr 2010)
Dynamic layout and transitions with expression blend 4 (30 Abr 2010)Dynamic layout and transitions with expression blend 4 (30 Abr 2010)
Dynamic layout and transitions with expression blend 4 (30 Abr 2010)
 
7 17 event_logging_architecture 1
7 17 event_logging_architecture 17 17 event_logging_architecture 1
7 17 event_logging_architecture 1
 
Modelling event data in look ml
Modelling event data in look mlModelling event data in look ml
Modelling event data in look ml
 
19th February 2013, AWS User Group UK, Meetup #3, The CentraStage Experience,...
19th February 2013, AWS User Group UK, Meetup #3, The CentraStage Experience,...19th February 2013, AWS User Group UK, Meetup #3, The CentraStage Experience,...
19th February 2013, AWS User Group UK, Meetup #3, The CentraStage Experience,...
 
GraphQL in Kiwi.com
GraphQL in Kiwi.comGraphQL in Kiwi.com
GraphQL in Kiwi.com
 
Responsive Ui with Realtime Database
Responsive Ui with Realtime DatabaseResponsive Ui with Realtime Database
Responsive Ui with Realtime Database
 

Similar to Expose your kafka with graphql

Getting started-with-qlikview-part-i
Getting started-with-qlikview-part-iGetting started-with-qlikview-part-i
Getting started-with-qlikview-part-i
Amit Sharma
 
Qlikview training course contents, Qlikview training in bangalore, qlikview t...
Qlikview training course contents, Qlikview training in bangalore, qlikview t...Qlikview training course contents, Qlikview training in bangalore, qlikview t...
Qlikview training course contents, Qlikview training in bangalore, qlikview t...
Manoj Jagtap
 
Dynatrace: DevOps, shift-left & self-healing a performance clinic with andi
Dynatrace: DevOps, shift-left & self-healing a performance clinic with andiDynatrace: DevOps, shift-left & self-healing a performance clinic with andi
Dynatrace: DevOps, shift-left & self-healing a performance clinic with andi
Dynatrace
 

Similar to Expose your kafka with graphql (20)

StackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStackStackWatch: A prototype CloudWatch service for CloudStack
StackWatch: A prototype CloudWatch service for CloudStack
 
APAC ksqlDB Workshop
APAC ksqlDB WorkshopAPAC ksqlDB Workshop
APAC ksqlDB Workshop
 
JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試JCConf 2016 - Google Dataflow 小試
JCConf 2016 - Google Dataflow 小試
 
Workshop: Building Vaadin add-ons
Workshop: Building Vaadin add-onsWorkshop: Building Vaadin add-ons
Workshop: Building Vaadin add-ons
 
Getting started-with-qlikview-part-i
Getting started-with-qlikview-part-iGetting started-with-qlikview-part-i
Getting started-with-qlikview-part-i
 
Wikihow webbflow | HYDRA
Wikihow webbflow | HYDRAWikihow webbflow | HYDRA
Wikihow webbflow | HYDRA
 
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
"Fintech inside of a SaaS powered by 2000+ Microservices", Volodymyr Malyk
 
Google Cloud Dataflow
Google Cloud DataflowGoogle Cloud Dataflow
Google Cloud Dataflow
 
Composable and streamable Play apps
Composable and streamable Play appsComposable and streamable Play apps
Composable and streamable Play apps
 
Bringing JAMStack to the Enterprise
Bringing JAMStack to the EnterpriseBringing JAMStack to the Enterprise
Bringing JAMStack to the Enterprise
 
Qlikview training course contents, Qlikview training in bangalore, qlikview t...
Qlikview training course contents, Qlikview training in bangalore, qlikview t...Qlikview training course contents, Qlikview training in bangalore, qlikview t...
Qlikview training course contents, Qlikview training in bangalore, qlikview t...
 
ConnectWise Reporting Tools Overview
ConnectWise Reporting Tools OverviewConnectWise Reporting Tools Overview
ConnectWise Reporting Tools Overview
 
Kafka summit apac session
Kafka summit apac sessionKafka summit apac session
Kafka summit apac session
 
Dynatrace: DevOps, shift-left & self-healing a performance clinic with andi
Dynatrace: DevOps, shift-left & self-healing a performance clinic with andiDynatrace: DevOps, shift-left & self-healing a performance clinic with andi
Dynatrace: DevOps, shift-left & self-healing a performance clinic with andi
 
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
DevOps monitoring: Best Practices using OpenShift combined with Icinga & Big ...
 
Realtime with websockets
Realtime with websocketsRealtime with websockets
Realtime with websockets
 
Making External Web Pages Interact With Visualforce
Making External Web Pages Interact With VisualforceMaking External Web Pages Interact With Visualforce
Making External Web Pages Interact With Visualforce
 
Building Autonomous Operations for Kubernetes with keptn
Building Autonomous Operations for Kubernetes with keptnBuilding Autonomous Operations for Kubernetes with keptn
Building Autonomous Operations for Kubernetes with keptn
 
VMWorld 2017 Hackathon training: Getting Started with Clarity
VMWorld 2017 Hackathon training: Getting Started with ClarityVMWorld 2017 Hackathon training: Getting Started with Clarity
VMWorld 2017 Hackathon training: Getting Started with Clarity
 
Developing event-driven microservices with event sourcing and CQRS (phillyete)
Developing event-driven microservices with event sourcing and CQRS (phillyete)Developing event-driven microservices with event sourcing and CQRS (phillyete)
Developing event-driven microservices with event sourcing and CQRS (phillyete)
 

Recently uploaded

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Recently uploaded (20)

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban%in Durban+277-882-255-28 abortion pills for sale in Durban
%in Durban+277-882-255-28 abortion pills for sale in Durban
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

Expose your kafka with graphql