SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Speed up your Apache
Cassandra™ Applications
A Practical Guide to Reactive Programming
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
About us
Cedrick Lunven
Developer Advocate, DataStax
Alexandre Dutra
Software Engineer, DataStax
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Agenda
1
2
3 BACK TO SANITY WITH REACTIVE
LET’S GO ASYNCHRONOUS (AND CRAZY)!
SIMPLE & SYNCHRONOUS
SIMPLE & SYNCHRONOUS
(kiss)
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Apache Cassandra™ Sweet Spots ?
Global
DistributionAlways-On Scalability
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Sample Application Overview
● Time-based events series
CREATE TABLE stock (
symbol text,
value decimal,
date timestamp,
PRIMARY KEY ((symbol), date)
)
WITH CLUSTERING
ORDER BY (date DESC)
AND default_time_to_live = 86400
AND compaction = {
'class' : 'TimeWindowCompactionStrategy’,
'compaction_window_unit' : 'MINUTES',
'compaction_window_size' : '60'
};
v
v
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
DRIVERAPI
Synchronous Stack
CLIENT
12+
© DataStax, All Rights Reserved.Confidential
Demo #1: Sync
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
CLIENT API DRIVER
DseSessionBuilder.build()
Metadata
DseSession
SimpleStatement
session.prepare()
PreparedStatement
Metadata
Initializing
Statements
Connection
API
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
CLIENT API DRIVER
Parameters
SynchronousQueries
PreparedStatement
& Parameters
Bind
Parameters
BoundStatement
ResultSet
ResultSet
Results
Blocked
😴
API
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Sync - SWOT Analysis
Strengths Weaknesses
ThreatsOpportunities
Simple
Easy to Test & Maintain Scalability ⚠️
Blocking 😴
LET’S GO ASYNCHRONOUS
(and crazy !)
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
DRIVERAPI
Asynchronous Stack (Yes,….no changes)
CLIENT
12+
© DataStax, All Rights Reserved.Confidential
Demo #2: Async
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
CLIENT API DRIVER
v
Parameters
AsyncQueries
PreparedStatement
& Parameters Bind
Parameters
BoundStatement
AsyncResultSet
AsyncResultSet
Result
API
CompletionStage
Callback Hell 🔥
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Asynchronous - SWOT Analysis
Strengths Weaknesses
ThreatsOpportunities
Non Blocking
Scalability Maintainability 🤯
Callback Hell 🔥
BACK TO SANITY
(with reactive driver)
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Reactive Manifesto
https://www.reactivemanifesto.org/
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Reactive Streams API
SUBSCRIBER PUBLISHER
subscribe(this)
onSubscribe(subscription)
subscription.request(...)
http://www.reactive-streams.org/
onNext(...)
onComplete()
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
DRIVERAPI
Reactive Stack
CLIENT
12+
© DataStax, All Rights Reserved.Confidential
Demo #3: Reactive
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
CLIENT API DRIVER
v
Parameters
ReactiveQueries
PreparedStatement
& Parameters Bind
Parameters
Row
ReactiveRow
Flux
API
ReactiveResultSet
Subscribe
BoundStatement
Subscriber.onNext
Query execution
onComplete()
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Backpressure
CLIENT DRIVER
Backpressure
❌
CLIENTDRIVER
Backpressure
✅
READ
WRITE
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
Reactive - SWOT Analysis
Strengths Weaknesses
ThreatsOpportunities
Simple & Non Blocking
Scalable & Maintainable OverloadedException
Hard to debug?
© DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved.
References & Questions
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languagesSOMNATHMORE2
 
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...Simplilearn
 
6 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/26 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/2Fabio Fumarola
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classificationKrish_ver2
 
Big Data in the Cloud
Big Data in the CloudBig Data in the Cloud
Big Data in the CloudNati Shalom
 
Hadoop Installation presentation
Hadoop Installation presentationHadoop Installation presentation
Hadoop Installation presentationpuneet yadav
 
Transaction Properties in database | ACID Properties
Transaction Properties in database | ACID PropertiesTransaction Properties in database | ACID Properties
Transaction Properties in database | ACID Propertiesnomanbarki
 
Introduction to Data Science.pptx
Introduction to Data Science.pptxIntroduction to Data Science.pptx
Introduction to Data Science.pptxVrishit Saraswat
 
Data Wrangling
Data WranglingData Wrangling
Data WranglingGramener
 
Er & eer to relational mapping
Er & eer to relational mappingEr & eer to relational mapping
Er & eer to relational mappingsaurabhshertukde
 
Introduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data AnalyticsIntroduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data AnalyticsPhoenix
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine LearningLior Rokach
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using RUmmiya Mohammedi
 

Was ist angesagt? (20)

Decision properties of reular languages
Decision properties of reular languagesDecision properties of reular languages
Decision properties of reular languages
 
What is big data?
What is big data?What is big data?
What is big data?
 
Data analytics with R
Data analytics with RData analytics with R
Data analytics with R
 
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
Random Forest Algorithm - Random Forest Explained | Random Forest In Machine ...
 
6 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/26 Data Modeling for NoSQL 2/2
6 Data Modeling for NoSQL 2/2
 
2.3 bayesian classification
2.3 bayesian classification2.3 bayesian classification
2.3 bayesian classification
 
Big Data in the Cloud
Big Data in the CloudBig Data in the Cloud
Big Data in the Cloud
 
Data Science
Data ScienceData Science
Data Science
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
 
Hadoop Installation presentation
Hadoop Installation presentationHadoop Installation presentation
Hadoop Installation presentation
 
Research paper on big data and hadoop
Research paper on big data and hadoopResearch paper on big data and hadoop
Research paper on big data and hadoop
 
Data Science
Data ScienceData Science
Data Science
 
Transaction Properties in database | ACID Properties
Transaction Properties in database | ACID PropertiesTransaction Properties in database | ACID Properties
Transaction Properties in database | ACID Properties
 
Introduction to Data Science.pptx
Introduction to Data Science.pptxIntroduction to Data Science.pptx
Introduction to Data Science.pptx
 
Data Wrangling
Data WranglingData Wrangling
Data Wrangling
 
Er & eer to relational mapping
Er & eer to relational mappingEr & eer to relational mapping
Er & eer to relational mapping
 
Introduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data AnalyticsIntroduction to Python Pandas for Data Analytics
Introduction to Python Pandas for Data Analytics
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
Data visualization using R
Data visualization using RData visualization using R
Data visualization using R
 

Ähnlich wie Reactive Programming with Cassandra

Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Matt Stubbs
 
Real time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosReal time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosRahul Kumar
 
Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...
Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...
Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...DataStax
 
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...DataStax
 
Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Vinay Kumar Chella
 
Oracle RAC 12c Rel. 2 for Continuous Availability
Oracle RAC 12c Rel. 2 for Continuous AvailabilityOracle RAC 12c Rel. 2 for Continuous Availability
Oracle RAC 12c Rel. 2 for Continuous AvailabilityMarkus Michalewicz
 
implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...Joseph Arriola
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraDataStax
 
Webinar: Comparing DataStax Enterprise with Open Source Apache Cassandra
Webinar: Comparing DataStax Enterprise with Open Source Apache CassandraWebinar: Comparing DataStax Enterprise with Open Source Apache Cassandra
Webinar: Comparing DataStax Enterprise with Open Source Apache CassandraDataStax
 
Xanadu Big Data Platform Technology Introduction
Xanadu Big Data Platform Technology IntroductionXanadu Big Data Platform Technology Introduction
Xanadu Big Data Platform Technology IntroductionAlex G. Lee, Ph.D. Esq. CLP
 
Reactive IoT, Java One 2016
Reactive IoT, Java One 2016Reactive IoT, Java One 2016
Reactive IoT, Java One 2016Kynetics
 
Big Data Analytics with Spark
Big Data Analytics with SparkBig Data Analytics with Spark
Big Data Analytics with SparkDataStax Academy
 
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...DataStax
 
Webinar: DataStax Managed Cloud: focus on innovation, not administration
Webinar:  DataStax Managed Cloud: focus on innovation, not administrationWebinar:  DataStax Managed Cloud: focus on innovation, not administration
Webinar: DataStax Managed Cloud: focus on innovation, not administrationDataStax
 
Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...
Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...
Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...DataStax
 
Spark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod NarasimhaSpark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod NarasimhaSpark Summit
 
Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...
Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...
Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...DataStax
 

Ähnlich wie Reactive Programming with Cassandra (20)

Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
Speed Up Your Apache Cassandra™ Applications: A Practical Guide to Reactive P...
 
Real time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesosReal time data pipeline with spark streaming and cassandra with mesos
Real time data pipeline with spark streaming and cassandra with mesos
 
Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...
Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...
Realtime Data Pipeline with Spark Streaming and Cassandra with Mesos (Rahul K...
 
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
 
Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0Live traffic capture and replay in cassandra 4.0
Live traffic capture and replay in cassandra 4.0
 
Oracle RAC 12c Rel. 2 for Continuous Availability
Oracle RAC 12c Rel. 2 for Continuous AvailabilityOracle RAC 12c Rel. 2 for Continuous Availability
Oracle RAC 12c Rel. 2 for Continuous Availability
 
implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...implementation of a big data architecture for real-time analytics with data s...
implementation of a big data architecture for real-time analytics with data s...
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & Cassandra
 
Webinar: Comparing DataStax Enterprise with Open Source Apache Cassandra
Webinar: Comparing DataStax Enterprise with Open Source Apache CassandraWebinar: Comparing DataStax Enterprise with Open Source Apache Cassandra
Webinar: Comparing DataStax Enterprise with Open Source Apache Cassandra
 
Xanadu Big Data Platform Technology Introduction
Xanadu Big Data Platform Technology IntroductionXanadu Big Data Platform Technology Introduction
Xanadu Big Data Platform Technology Introduction
 
Reactive IoT, Java One 2016
Reactive IoT, Java One 2016Reactive IoT, Java One 2016
Reactive IoT, Java One 2016
 
Big Data Analytics with Spark
Big Data Analytics with SparkBig Data Analytics with Spark
Big Data Analytics with Spark
 
Silicon Valley Workshop: Xanadu introduction
Silicon Valley Workshop: Xanadu introduction Silicon Valley Workshop: Xanadu introduction
Silicon Valley Workshop: Xanadu introduction
 
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
 
Webinar: DataStax Managed Cloud: focus on innovation, not administration
Webinar:  DataStax Managed Cloud: focus on innovation, not administrationWebinar:  DataStax Managed Cloud: focus on innovation, not administration
Webinar: DataStax Managed Cloud: focus on innovation, not administration
 
Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...
Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...
Webinar - The Agility Challenge - Powering Cloud Apps with Multi-Model & Mixe...
 
Spark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod NarasimhaSpark Summit EU talk by Debasish Das and Pramod Narasimha
Spark Summit EU talk by Debasish Das and Pramod Narasimha
 
DataStax 6 and Beyond
DataStax 6 and BeyondDataStax 6 and Beyond
DataStax 6 and Beyond
 
Cloud applications
Cloud applicationsCloud applications
Cloud applications
 
Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...
Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...
Webinar: The Performance Challenge: Providing an Amazing Customer Experience ...
 

Mehr von Cédrick Lunven

Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)Cédrick Lunven
 
BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...
BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...
BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...Cédrick Lunven
 
Avoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdfAvoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdfCédrick Lunven
 
Unlock cassandra data for application developers using graphQL
Unlock cassandra data for application developers using graphQLUnlock cassandra data for application developers using graphQL
Unlock cassandra data for application developers using graphQLCédrick Lunven
 
An oss api layer for your cassandra
An oss api layer for your cassandraAn oss api layer for your cassandra
An oss api layer for your cassandraCédrick Lunven
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes Cédrick Lunven
 
Xebicon2019 m icroservices
Xebicon2019   m icroservicesXebicon2019   m icroservices
Xebicon2019 m icroservicesCédrick Lunven
 
VoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4JVoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4JCédrick Lunven
 
VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019Cédrick Lunven
 
Create API for your Databases
Create API for your DatabasesCreate API for your Databases
Create API for your DatabasesCédrick Lunven
 
Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...
Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...
Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...Cédrick Lunven
 
Streaming, Analytics and Reactive Applications with Apache Cassandra
Streaming, Analytics and Reactive Applications with Apache CassandraStreaming, Analytics and Reactive Applications with Apache Cassandra
Streaming, Analytics and Reactive Applications with Apache CassandraCédrick Lunven
 
Riviera jug apicassandra
Riviera jug apicassandraRiviera jug apicassandra
Riviera jug apicassandraCédrick Lunven
 
Paris Meetup Jhispter #9 - Generator FF4j for Jhipster
Paris Meetup Jhispter #9 - Generator FF4j for JhipsterParis Meetup Jhispter #9 - Generator FF4j for Jhipster
Paris Meetup Jhispter #9 - Generator FF4j for JhipsterCédrick Lunven
 
Introduction to Feature Toggle and FF4J
Introduction to Feature Toggle and FF4JIntroduction to Feature Toggle and FF4J
Introduction to Feature Toggle and FF4JCédrick Lunven
 

Mehr von Cédrick Lunven (19)

Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
Top 10 present and future innovations in the NoSQL Cassandra ecosystem (2022)
 
BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...
BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...
BigData Paris 2022 - Innovations récentes et futures autour du NoSQL Apache ...
 
Avoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdfAvoiding Pitfalls for Cassandra.pdf
Avoiding Pitfalls for Cassandra.pdf
 
Unlock cassandra data for application developers using graphQL
Unlock cassandra data for application developers using graphQLUnlock cassandra data for application developers using graphQL
Unlock cassandra data for application developers using graphQL
 
An oss api layer for your cassandra
An oss api layer for your cassandraAn oss api layer for your cassandra
An oss api layer for your cassandra
 
CN Asturias - Stateful application for kubernetes
CN Asturias -  Stateful application for kubernetes CN Asturias -  Stateful application for kubernetes
CN Asturias - Stateful application for kubernetes
 
Xebicon2019 m icroservices
Xebicon2019   m icroservicesXebicon2019   m icroservices
Xebicon2019 m icroservices
 
DevFestBdm2019
DevFestBdm2019DevFestBdm2019
DevFestBdm2019
 
Shift Dev Conf API
Shift Dev Conf APIShift Dev Conf API
Shift Dev Conf API
 
VoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4JVoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4J
 
VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019VoxxedDays Luxembourg 2019
VoxxedDays Luxembourg 2019
 
Design API - SnowCampIO
Design API - SnowCampIODesign API - SnowCampIO
Design API - SnowCampIO
 
Create API for your Databases
Create API for your DatabasesCreate API for your Databases
Create API for your Databases
 
Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...
Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...
Leveraging Feature Toggles for your Microservices (VoxxeddaysMicroservices Pa...
 
Streaming, Analytics and Reactive Applications with Apache Cassandra
Streaming, Analytics and Reactive Applications with Apache CassandraStreaming, Analytics and Reactive Applications with Apache Cassandra
Streaming, Analytics and Reactive Applications with Apache Cassandra
 
Riviera jug apicassandra
Riviera jug apicassandraRiviera jug apicassandra
Riviera jug apicassandra
 
Riviera JUG ff4j
Riviera JUG ff4jRiviera JUG ff4j
Riviera JUG ff4j
 
Paris Meetup Jhispter #9 - Generator FF4j for Jhipster
Paris Meetup Jhispter #9 - Generator FF4j for JhipsterParis Meetup Jhispter #9 - Generator FF4j for Jhipster
Paris Meetup Jhispter #9 - Generator FF4j for Jhipster
 
Introduction to Feature Toggle and FF4J
Introduction to Feature Toggle and FF4JIntroduction to Feature Toggle and FF4J
Introduction to Feature Toggle and FF4J
 

Kürzlich hochgeladen

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
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 Scriptwesley chun
 
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...Martijn de Jong
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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
 
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...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Reactive Programming with Cassandra

  • 1. Speed up your Apache Cassandra™ Applications A Practical Guide to Reactive Programming
  • 2. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. About us Cedrick Lunven Developer Advocate, DataStax Alexandre Dutra Software Engineer, DataStax
  • 3. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Agenda 1 2 3 BACK TO SANITY WITH REACTIVE LET’S GO ASYNCHRONOUS (AND CRAZY)! SIMPLE & SYNCHRONOUS
  • 5. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Apache Cassandra™ Sweet Spots ? Global DistributionAlways-On Scalability
  • 6. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Sample Application Overview ● Time-based events series CREATE TABLE stock ( symbol text, value decimal, date timestamp, PRIMARY KEY ((symbol), date) ) WITH CLUSTERING ORDER BY (date DESC) AND default_time_to_live = 86400 AND compaction = { 'class' : 'TimeWindowCompactionStrategy’, 'compaction_window_unit' : 'MINUTES', 'compaction_window_size' : '60' }; v v
  • 7. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. DRIVERAPI Synchronous Stack CLIENT 12+
  • 8. © DataStax, All Rights Reserved.Confidential Demo #1: Sync
  • 9. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. CLIENT API DRIVER DseSessionBuilder.build() Metadata DseSession SimpleStatement session.prepare() PreparedStatement Metadata Initializing Statements Connection API
  • 10. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. CLIENT API DRIVER Parameters SynchronousQueries PreparedStatement & Parameters Bind Parameters BoundStatement ResultSet ResultSet Results Blocked 😴 API
  • 11. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Sync - SWOT Analysis Strengths Weaknesses ThreatsOpportunities Simple Easy to Test & Maintain Scalability ⚠️ Blocking 😴
  • 13. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. DRIVERAPI Asynchronous Stack (Yes,….no changes) CLIENT 12+
  • 14. © DataStax, All Rights Reserved.Confidential Demo #2: Async
  • 15. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. CLIENT API DRIVER v Parameters AsyncQueries PreparedStatement & Parameters Bind Parameters BoundStatement AsyncResultSet AsyncResultSet Result API CompletionStage Callback Hell 🔥
  • 16. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Asynchronous - SWOT Analysis Strengths Weaknesses ThreatsOpportunities Non Blocking Scalability Maintainability 🤯 Callback Hell 🔥
  • 17. BACK TO SANITY (with reactive driver)
  • 18. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Reactive Manifesto https://www.reactivemanifesto.org/
  • 19. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Reactive Streams API SUBSCRIBER PUBLISHER subscribe(this) onSubscribe(subscription) subscription.request(...) http://www.reactive-streams.org/ onNext(...) onComplete()
  • 20. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. DRIVERAPI Reactive Stack CLIENT 12+
  • 21. © DataStax, All Rights Reserved.Confidential Demo #3: Reactive
  • 22. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. CLIENT API DRIVER v Parameters ReactiveQueries PreparedStatement & Parameters Bind Parameters Row ReactiveRow Flux API ReactiveResultSet Subscribe BoundStatement Subscriber.onNext Query execution onComplete()
  • 23. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Backpressure CLIENT DRIVER Backpressure ❌ CLIENTDRIVER Backpressure ✅ READ WRITE
  • 24. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. Reactive - SWOT Analysis Strengths Weaknesses ThreatsOpportunities Simple & Non Blocking Scalable & Maintainable OverloadedException Hard to debug?
  • 25. © DataStax, All Rights Reserved.ConfidentialConfidential © DataStax, All Rights Reserved. References & Questions

Hinweis der Redaktion

  1. CEDRICK Good Afternoon We are going to speak you about Software Development and ways to speed-up your applications. But before starting I would like to ask you a few questions: (1) Who is already familiar with JAVA programming language Ok, so YOU are allowed to stay in the room. Who said Java is no more the most popular language ? It is. full disclosure, during this presentation you will see some Java code, you will probably to try it it afterward Ok so Question 2 : (2) Who is currently using or has used the DataStax Java driver for Apache Cassandra, OSS or DSE : nevermind Oh so many ? Alexs, we are probably giving talk in the correct conference then. Good. That what we expected. (3) And final question the hardest, who has already tested the new generation drivers releases this year ? Not so many, again not a surprise this is rather new. You are in the good room, we are gonna do our presentation with the new driver and you will see the differences. CLICK
  2. CEDRICK I am Cedrick Lunven, Developer Advocate at DataStax. My job is to produce tons of contents for you to succeed with your Apache Cassandra projects : Academy.datastax.com : VIDEO Trainings, blogposts Getting Started all sort of Tutorials VIDEOS : DDS videos weekly and all recorded meetup we are doing, TWICH A Twitch Channel with stream and live coding every week CODE : References applications and sample codes And I am with Alexandre Dutra. ALEXANDRE I am Alexandre Dutra, Technical Manager & Software Engineer working for DataStax since 2015. I am one of the main contributors of the DataStax Java driver for Apache Cassandra and DSE, and I am also the author of the new Reactive API introduced in the latest release of the DSE driver this year. I am a big fan of reactive programming and have been using reactive programming for a while now, not only in the driver but also in other products that we develop at DataStax, such as the DataStax Bulk Loader. For now I will Cedrick set the scene and I will come back from demos
  3. CEDRICK In this session we will work with a sample service, sample API. We will first present the first in a synchronous process model. From then, we will move to ASYNCHRONOUS processing model and then Reactive mode. Let’s get started !
  4. So we need a sample use case for our API fitting Apache Cassandra strengths. Imagine, If you would have to explain why Cassandra is so cool to someone that has been working with SGBD his all life and you get 2 min what would you say ? As advocate this is part of my job so why I like to say is : This is a distribute Databases, multiple nodes there is no real sense to use only one Data is distributed among those nodes but also replicated : that means you can loose some node you don’t loose data, BTYW you can loose any node because there is no master In a mode let’s have this abacus 1TB of data and 3000 transaction and per core, if you need more volume add more nodes, if you need more throughput add more nodes So what are use cases for Cassandra : Data resiliency Gobal distribution read/write anywhere and it is replicated HUGE volume and still real time queries Very high throughput And this is a …CLICK
  5. CEDRICK We chose a Time based event series aka Timeseries and thus for 2 main reasons : One : The use case fits very well Apache Cassandra : High Throughput, heavy writes, lot of volumes, need scalability Two Aleks : (joking) is because we are always using the same sample Me : No ! Come on. Two Because the data model is simple yet interesting. <CLICK> As you imagine we define the partition key as the source of events to evenly distributed events among the nodes <CLICK> We designed a valueDate as a Clustering Columns to search easily and graph some charts <CLICK> We specified DESC to get the last item first, those are the one we want to display. <CLICK> No bucketing so let’s define a TTL to 24H to avoid too large partitions <CLICK> And time series would use TWCS limit SSTABLE number <CLICK> Because, just have a look to what we are trying to draw ALEXANDRE But let’s keep things simple and stupid KISS.
  6. ALEXANDRE Few logos: As we already told we are using Java why not using the last Java 12 Services are implemented and connected with Spring Everything is wrapped into a Spring boot 2.1 application Services are exposed as REST with Spring MVC Did you see our gray hairs and beards here, we do Java, we are serious people and do not play with the teenager language JavaScript
  7. CEDRICK So this is the sequence diagram we will show again and again to understand what happened under the hood Client can UI or any system invoking our service API is our interface, the way we expose the service Driver represents the Java Driver API and Driver compose your backend application runtime, real stuff and not javascript for teenagers And the eye, well I am pretty usre you can guess During application start first operation executed is Connection <CLICK> And, still in the initializing phase we prepare the statements <CLICK> Those operations are, and will remain, synchronous everytime. We won’t show that to you again in the next scenarii But what about the real Crud OPERATIONS ? Let’s start with the mutations. <CLICK>
  8. CEDRICK Create and Delete operations follow the same pattern, they just don’t produce the same return codes, http codes. 201 for the first and 204 for the other. <CLICK> I am decoding here. Client send parameters to the API which will validate those, Joking : YOU are responsible for the parameters, no excuses. JavaNullPointerException is YOUR fault. <CLICK> API will use the params to create a Statement Those are binded together at the driver level to create a BoundStatement <CLICK> Execution is trigger and you get a status, but no records this is CREATE and DELETE Then you propagate status up to the client, success or exception <CLICK> Again, we are waiting like hell This is it for the synchronous mutations, what about the queries ?
  9. ALEXANDRE Exactly same thing as before
  10. In the most general sense reactive programming is a programming paradigm that allows to create responsive and resilient systems for processing data. These ideas have been summarized in the Reactive Manifesto. The manifesto stresses 4 key characristics: Responsiveness: The system always responds in a timely manner. Resilience: The system stays responsive in the face of failure. Elasticity: The system stays responsive under varying workload and adapts itself to variable ingestion rates. Message Driven: the system relies on asynchronous messaging to achieve loose coupling, and isolation.
  11. But usually when we refer to Reactive Programming we refer to the Reactive Streams initiative. This is a working group of people that created an API that allows you to build reactive systems in many programming languages, including Java. This initiative provides you with a Specification, an API and a TCK (Test Compatibility Kit). The TCK allows you to certify that your implementation is compliant with the API requirements. The API defines a few roles like the Publisher (the guy who emits data), the Subscriber (the guy who receives data) and the Subscription which defines the contract between a publisher and a subscriber.
  12. ALEXANDRE Few logos: As we already told we are using Java why not using the last Java 12 Services are implemented and connected with Spring Everything is wrapped into a Spring boot 2.1 application Services are exposed as REST NEW: Spring Web Flux + Reactor NEW: Driver reactive API
  13. Those operation are and will remain synchronous Do it at the application launch
  14. Let’s talk a bit about backpressure. Backpressure is a key notion in reactive streams; it’s a mechanism that allows the publisher and the subscriber to agree on an acceptable throughput for both, in order to avoid overwhelming the system with more messages than it can handle. The driver is capable of communicating backpressure between your application and the remote DSE server in some situations only, namely when the server acts like a Publisher and your application acts as a subscriber. – IOW when you are reading data from the server In this case, the driver will only fetch more results if the subscriber is ready to process them. The opposite situation is trickier: if you are writing data to DES, then your application is acting like a Publisher, and it’s your responsibility to regulate your throughput in order to avoid overwhelming the cluster. This is because the Cassandra protocol does not allow the server to communicate backpressure to a client. So if you don’t regulate your data ingestion rate, you risk getting back an OverloadedException. https://issues.apache.org/jira/browse/CASSANDRA-7937 Apply backpressure gently when overloaded with writes https://issues.apache.org/jira/browse/CASSANDRA-10993 Make read and write requests paths fully non-blocking, eliminate related stages (TPC for OSS Cassandra), slated for 4.x
  15. Hard to debug: but there are tools to help, see the chapter on debugging for Reactor: https://projectreactor.io/docs/core/snapshot/reference/#debugging