SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Designing API for
Databases:
‪ Which one should you pick ?
GraphQL
@clunven | #voxxed_lu | @voxxed_lu
Casino 2000, Luxembourg
@clunven | @voxxed_lu | #voxxed_lu
About me
Cedrick Lunven
Developer Advocate
Creator Contributor
© DataStax, All Rights Reserved.Confidential © DataStax, All Rights Reserved.
Agenda 2
3
4 DECISION TREE
DEMONSTRATION AND CODE REVIEW
API DESIGN METHODOLOGY
1 APACHE CASSANDRA™ OVERVIEW
APACHE CASSANDRA™
Quick Overview
@clunven | @voxxed_lu | #voxxed_lu
This is a DISTRIBUTED Database
Node
• Up to 1TB
• 3000 Tx/s/core
@clunven | @voxxed_lu | #voxxed_lu
…which scale linearly
@clunven | @voxxed_lu | #voxxed_lu
Data is distributed
0
13
25
38
50
63
75
88 59 (data)
RF=2
59 (data)
RF=3
replicated
@clunven | @voxxed_lu | #voxxed_lu
Cassandra is « AP »
Consistency
Partition
Tolerance
Availability
@clunven | @voxxed_lu | #voxxed_lu
Tuneable Consistency
RF=3
Client CL=ONECL=QUORUMCL=ALL
@clunven | @voxxed_lu | #voxxed_lu
…anywhere
Cluster
Datacenter (Ring)
@clunven | @voxxed_lu | #voxxed_lu
Sweet spots
1. High Throughput (because we can keep up)
2. High Volume (because we scale linearly and still OLTP)
3. High Availability (replication, masterless)
4. Data distribution (read/write around the globe)
@clunven | @voxxed_lu | #voxxed_lu
• Le KEYSPACE est comme un schéma
dans Oracle, une isolation des
données
12
Projet_X Keyspace
Une table contient une CLEF
PRIMAIRE contenant 2 parties : La
partition key et le reste (clustering
columns). Chaque valeur de
partition key est hashée sous la
forme d’un token.
Plusieurs lignes avec la même
partition key constitue une
partition.
Data Modelling
@clunven | @voxxed_lu | #voxxed_lu
• Syntaxe proche du SQL pour
les bases relationnelles
• Création des objets avec le
DDL :
• CREATE, INSERT, UPDATE,
DELETE, GRANT, REVOKE,
SELECT, WHERE
13
Exemple
CREATE TABLE market_prices (
symbol TEXT,
date TIMESTAMP,
price DECIMAL,
side INT,
PRIMARY KEY (symbol, date)
) WITH CLUSTERING ORDER BY(date DESC);
Cassandra Query Language
LIST, SET, MAP, UDT
API DESIGN METHODOLOGY
From zero to hero
@clunven | @voxxed_lu | #voxxed_lu
Reference Application
http://killrvideo.github.io
@clunven | @voxxed_lu | #voxxed_lu
Api Design Methodology
1
killrvideo-dse
Drivers
DAO3
killrvideo-api-rest killrvideo-api-grpc killrvideo-api-graphql
2
@clunven | @voxxed_lu | #voxxed_lu
Designing Data Model
Entities & Relationships
Queries
@clunven | @voxxed_lu | #voxxed_lu
Conceptual Data Model
@clunven | @voxxed_lu | #voxxed_lu
Application Workflow
R1: Find comments related to target video using its identifier
• Get most recent first
• Implement Paging
R2: Find comments related to target user using its identifier
• Get most recent first
• Implement Paging
R3: Implement CRUD operations
@clunven | @voxxed_lu | #voxxed_lu
Mapping
Q2: Find comments posted for a user with a
known id (show most recent first)
comments_by_video
comments_by_user
Q1: Find comments for a video with a
known id (show most recent first)
Q3: CRUD Operations
@clunven | @voxxed_lu | #voxxed_lu
Logical Data Model
userid
creationdate
commentid
videoid
comment
comments_by_user
K
C
↑
videoid
creationdate
commentid
userid
comment
comments_by_video
C
↑
K
C
↑
↑C
@clunven | @voxxed_lu | #voxxed_lu
Physical Data Model
userid
commentid
videoid
comment
comments_by_user
TIMEUUID
K
TEXT
C
UUID
UUID
↑
videoid
commentid
userid
comment
comments_by_video
TIMEUUID
K
TEXT
C
UUID
UUID
↑
@clunven | @voxxed_lu | #voxxed_lu
Schema DDL
CREATE TABLE IF NOT EXISTS comments_by_user (
userid uuid,
commentid timeuuid,
videoid uuid,
comment text,
PRIMARY KEY ((userid), commentid)
) WITH CLUSTERING ORDER BY (commentid DESC);
CREATE TABLE IF NOT EXISTS comments_by_video (
videoid uuid,
commentid timeuuid,
userid uuid,
comment text,
PRIMARY KEY ((videoid), commentid)
) WITH CLUSTERING ORDER BY (commentid DESC);
@clunven | @voxxed_lu | #voxxed_lu
How?
Conceptual Data
Model
(Entities, Relations)
Application Workflow
(Queries)
Database Family
(Technos +Table)
@clunven | @voxxed_lu | #voxxed_lu
@clunven | @voxxed_lu | #voxxed_lu
DECISION TREE
Because we are serious
@clunven | @voxxed_lu | #voxxed_lu
Analysis Criteria
📋 Conceptual
Data Model
Application
Workflow
(Queries)
Database Family
(Technos
+Table)
Caching
Syncvs AsyncReactive
SLA (Volume)
Data Integrity
Filters
Paging
Sort
Latencies Throughput
Versionning
Confidentiality
Atomicity
Cardinality
Developers
👤 Users/Consumers
Language
CodeFirst/
Vs SchemaFirst
Documentation
Test
Build
Packaging
Api Catalog
Internalvs
Public Techno
Profile
XP
@clunven | @voxxed_lu | #voxxed_lu
Analysis Matrix
@clunven | @voxxed_lu | #voxxed_lu
Decision Tree
@clunven | @voxxed_lu | #voxxed_lu
 Decoupling Client / Server (Schema on read)
 Flexibility: Sync, Async, Reactive + Multi payload
 Api Lifecycle (Versioning)
 Tooling (API Management, Serverless)
 Verbose payloads (json, xml)
 No discoverability
 Not best fit for command-like (functions) API (RPC)
 CRUD superstar
 Relevant for OLTP mutations and statuses
 Public and web APIs
@clunven | @voxxed_lu | #voxxed_lu
 High Performances (http/2 – binary serialisation)
 Multiple stubs : Sync, Async, Streaming
 Multi languages (Interoperability)
 Strongly coupled (schema with proto files)
 No discoverability
 Protobuf serialization format
 Distributed network of services (no waits)
 High throughput & streaming use cases
 Command-like, RPC
@clunven | @voxxed_lu | #voxxed_lu
 Discoverability, documentation
 Custom payloads
 Match standards (Json | Http)
 Single endpoint (versioning, monitoring, security)
 Complex implementation (tooling, still young)
 Nice for customers nasty for DB (N+1 select)
 BFF : Backend for frontend
 Service aggregation | composition (joins)
 When bandwidth matters (mobile phones)
GraphQL
RESOURCES
Because COPY/PASTE is the most important skill for developers
@clunven | @voxxed_lu | #voxxed_lu
References
https://github.com/clun/api_Rest_Grpc_GraphQL
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks DataWorks Summit/Hadoop Summit
 
Big Data-Driven Applications with Cassandra and Spark
Big Data-Driven Applications  with Cassandra and SparkBig Data-Driven Applications  with Cassandra and Spark
Big Data-Driven Applications with Cassandra and SparkArtem Chebotko
 
Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...
Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...
Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...Cedric CARBONE
 
What's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial usersWhat's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial usersWes McKinney
 
Realtime Data Analysis Patterns
Realtime Data Analysis PatternsRealtime Data Analysis Patterns
Realtime Data Analysis PatternsMikio L. Braun
 
Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...
Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...
Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...Brian O'Neill
 
Introducing Kafka Connect and Implementing Custom Connectors
Introducing Kafka Connect and Implementing Custom ConnectorsIntroducing Kafka Connect and Implementing Custom Connectors
Introducing Kafka Connect and Implementing Custom ConnectorsItai Yaffe
 
FlinkML: Large Scale Machine Learning with Apache Flink
FlinkML: Large Scale Machine Learning with Apache FlinkFlinkML: Large Scale Machine Learning with Apache Flink
FlinkML: Large Scale Machine Learning with Apache FlinkTheodoros Vasiloudis
 
Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...
Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...
Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...MLconf
 
Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...
Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...
Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...guest5b1607
 
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Jen Aman
 
New Analytics Toolbox DevNexus 2015
New Analytics Toolbox DevNexus 2015New Analytics Toolbox DevNexus 2015
New Analytics Toolbox DevNexus 2015Robbie Strickland
 
Always On: Building Highly Available Applications on Cassandra
Always On: Building Highly Available Applications on CassandraAlways On: Building Highly Available Applications on Cassandra
Always On: Building Highly Available Applications on CassandraRobbie Strickland
 
Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16
Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16
Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16MLconf
 
GluonNLP MXNet Meetup-Aug
GluonNLP MXNet Meetup-AugGluonNLP MXNet Meetup-Aug
GluonNLP MXNet Meetup-AugChenguang Wang
 
Graph x pregel
Graph x pregelGraph x pregel
Graph x pregelSigmoid
 
Spec: a lisp-flavoured type system
Spec: a lisp-flavoured type systemSpec: a lisp-flavoured type system
Spec: a lisp-flavoured type systemSimon Belak
 
Graph Analytics: Graph Algorithms Inside Neo4j
Graph Analytics: Graph Algorithms Inside Neo4jGraph Analytics: Graph Algorithms Inside Neo4j
Graph Analytics: Graph Algorithms Inside Neo4jNeo4j
 
Seattle Scalability Mahout
Seattle Scalability MahoutSeattle Scalability Mahout
Seattle Scalability MahoutJake Mannix
 
Graphity - Generic Linked Data Platform
Graphity - Generic Linked Data PlatformGraphity - Generic Linked Data Platform
Graphity - Generic Linked Data PlatformJulius Šėporaitis
 

Was ist angesagt? (20)

Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
Exploring Titan and Spark GraphX for Analyzing Time-Varying Electrical Networks
 
Big Data-Driven Applications with Cassandra and Spark
Big Data-Driven Applications  with Cassandra and SparkBig Data-Driven Applications  with Cassandra and Spark
Big Data-Driven Applications with Cassandra and Spark
 
Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...
Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...
Paris Spark Meetup (Feb2015) ccarbone : SPARK Streaming vs Storm / MLLib / Ne...
 
What's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial usersWhat's new in pandas and the SciPy stack for financial users
What's new in pandas and the SciPy stack for financial users
 
Realtime Data Analysis Patterns
Realtime Data Analysis PatternsRealtime Data Analysis Patterns
Realtime Data Analysis Patterns
 
Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...
Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...
Data Pipelines & Integrating Real-time Web Services w/ Storm : Improving on t...
 
Introducing Kafka Connect and Implementing Custom Connectors
Introducing Kafka Connect and Implementing Custom ConnectorsIntroducing Kafka Connect and Implementing Custom Connectors
Introducing Kafka Connect and Implementing Custom Connectors
 
FlinkML: Large Scale Machine Learning with Apache Flink
FlinkML: Large Scale Machine Learning with Apache FlinkFlinkML: Large Scale Machine Learning with Apache Flink
FlinkML: Large Scale Machine Learning with Apache Flink
 
Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...
Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...
Mathias Brandewinder, Software Engineer & Data Scientist, Clear Lines Consult...
 
Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...
Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...
Text Analytics Summit 2009 - Roddy Lindsay - "Social Media, Happiness, Petaby...
 
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
Massive Simulations In Spark: Distributed Monte Carlo For Global Health Forec...
 
New Analytics Toolbox DevNexus 2015
New Analytics Toolbox DevNexus 2015New Analytics Toolbox DevNexus 2015
New Analytics Toolbox DevNexus 2015
 
Always On: Building Highly Available Applications on Cassandra
Always On: Building Highly Available Applications on CassandraAlways On: Building Highly Available Applications on Cassandra
Always On: Building Highly Available Applications on Cassandra
 
Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16
Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16
Jake Mannix, Lead Data Engineer, Lucidworks at MLconf SEA - 5/20/16
 
GluonNLP MXNet Meetup-Aug
GluonNLP MXNet Meetup-AugGluonNLP MXNet Meetup-Aug
GluonNLP MXNet Meetup-Aug
 
Graph x pregel
Graph x pregelGraph x pregel
Graph x pregel
 
Spec: a lisp-flavoured type system
Spec: a lisp-flavoured type systemSpec: a lisp-flavoured type system
Spec: a lisp-flavoured type system
 
Graph Analytics: Graph Algorithms Inside Neo4j
Graph Analytics: Graph Algorithms Inside Neo4jGraph Analytics: Graph Algorithms Inside Neo4j
Graph Analytics: Graph Algorithms Inside Neo4j
 
Seattle Scalability Mahout
Seattle Scalability MahoutSeattle Scalability Mahout
Seattle Scalability Mahout
 
Graphity - Generic Linked Data Platform
Graphity - Generic Linked Data PlatformGraphity - Generic Linked Data Platform
Graphity - Generic Linked Data Platform
 

Ähnlich wie Database API Design: Picking GraphQL, REST or gRPC

Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAndre Essing
 
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Herman Wu
 
Stargate, the gateway for some multi-models data API
Stargate, the gateway for some multi-models data APIStargate, the gateway for some multi-models data API
Stargate, the gateway for some multi-models data APIData Con LA
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital.AI
 
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI ProjectsDiscovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI ProjectsWee Hyong Tok
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsMonal Daxini
 
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Andre Essing
 
6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...
6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...
6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...Jürgen Ambrosi
 
From Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's Data
From Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's DataFrom Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's Data
From Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's DataDatabricks
 
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsightAnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsightŁukasz Grala
 
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
 
20160317 - PAZUR - PowerBI & R
20160317  - PAZUR - PowerBI & R20160317  - PAZUR - PowerBI & R
20160317 - PAZUR - PowerBI & RŁukasz Grala
 
Hopsworks - Self-Service Spark/Flink/Kafka/Hadoop
Hopsworks - Self-Service Spark/Flink/Kafka/HadoopHopsworks - Self-Service Spark/Flink/Kafka/Hadoop
Hopsworks - Self-Service Spark/Flink/Kafka/HadoopJim Dowling
 
Autonomous analytics on streaming data
Autonomous analytics on streaming dataAutonomous analytics on streaming data
Autonomous analytics on streaming dataClaudiu Barbura
 
LarKC Tutorial at ISWC 2009 - Introduction
LarKC Tutorial at ISWC 2009 - IntroductionLarKC Tutorial at ISWC 2009 - Introduction
LarKC Tutorial at ISWC 2009 - IntroductionLarKC
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiDatabricks
 
Source-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructureSource-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructurekaveirious
 

Ähnlich wie Database API Design: Picking GraphQL, REST or gRPC (20)

Azure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep DiveAzure Cosmos DB - Technical Deep Dive
Azure Cosmos DB - Technical Deep Dive
 
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
 
Stargate, the gateway for some multi-models data API
Stargate, the gateway for some multi-models data APIStargate, the gateway for some multi-models data API
Stargate, the gateway for some multi-models data API
 
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and SparkVital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
Vital AI MetaQL: Queries Across NoSQL, SQL, Sparql, and Spark
 
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI ProjectsDiscovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
Discovering Your AI Super Powers - Tips and Tricks to Jumpstart your AI Projects
 
Declarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data modelsDeclarative benchmarking of cassandra and it's data models
Declarative benchmarking of cassandra and it's data models
 
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
Azure Cosmos DB - NoSQL Strikes Back (An introduction to the dark side of you...
 
6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...
6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...
6° Sessione - Ambiti applicativi nella ricerca di tecnologie statistiche avan...
 
From Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's Data
From Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's DataFrom Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's Data
From Pandas to Koalas: Reducing Time-To-Insight for Virgin Hyperloop's Data
 
NextGenML
NextGenML NextGenML
NextGenML
 
Dev Ops Training
Dev Ops TrainingDev Ops Training
Dev Ops Training
 
Shift Dev Conf API
Shift Dev Conf APIShift Dev Conf API
Shift Dev Conf API
 
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsightAnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
AnalyticsConf2016 - Zaawansowana analityka na platformie Azure HDInsight
 
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
 
20160317 - PAZUR - PowerBI & R
20160317  - PAZUR - PowerBI & R20160317  - PAZUR - PowerBI & R
20160317 - PAZUR - PowerBI & R
 
Hopsworks - Self-Service Spark/Flink/Kafka/Hadoop
Hopsworks - Self-Service Spark/Flink/Kafka/HadoopHopsworks - Self-Service Spark/Flink/Kafka/Hadoop
Hopsworks - Self-Service Spark/Flink/Kafka/Hadoop
 
Autonomous analytics on streaming data
Autonomous analytics on streaming dataAutonomous analytics on streaming data
Autonomous analytics on streaming data
 
LarKC Tutorial at ISWC 2009 - Introduction
LarKC Tutorial at ISWC 2009 - IntroductionLarKC Tutorial at ISWC 2009 - Introduction
LarKC Tutorial at ISWC 2009 - Introduction
 
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali ZaidiNatural Language Processing with CNTK and Apache Spark with Ali Zaidi
Natural Language Processing with CNTK and Apache Spark with Ali Zaidi
 
Source-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructureSource-to-source transformations: Supporting tools and infrastructure
Source-to-source transformations: Supporting tools and infrastructure
 

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
 
Reactive Programming with Cassandra
Reactive Programming with CassandraReactive Programming with Cassandra
Reactive Programming with CassandraCédrick Lunven
 
VoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4JVoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4JCé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
 
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 (17)

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
 
Reactive Programming with Cassandra
Reactive Programming with CassandraReactive Programming with Cassandra
Reactive Programming with Cassandra
 
VoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4JVoxxedDays Luxembourg FF4J
VoxxedDays Luxembourg FF4J
 
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...
 
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

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

Database API Design: Picking GraphQL, REST or gRPC

  • 1. Designing API for Databases: ‪ Which one should you pick ? GraphQL @clunven | #voxxed_lu | @voxxed_lu Casino 2000, Luxembourg
  • 2. @clunven | @voxxed_lu | #voxxed_lu About me Cedrick Lunven Developer Advocate Creator Contributor
  • 3. © DataStax, All Rights Reserved.Confidential © DataStax, All Rights Reserved. Agenda 2 3 4 DECISION TREE DEMONSTRATION AND CODE REVIEW API DESIGN METHODOLOGY 1 APACHE CASSANDRA™ OVERVIEW
  • 5. @clunven | @voxxed_lu | #voxxed_lu This is a DISTRIBUTED Database Node • Up to 1TB • 3000 Tx/s/core
  • 6. @clunven | @voxxed_lu | #voxxed_lu …which scale linearly
  • 7. @clunven | @voxxed_lu | #voxxed_lu Data is distributed 0 13 25 38 50 63 75 88 59 (data) RF=2 59 (data) RF=3 replicated
  • 8. @clunven | @voxxed_lu | #voxxed_lu Cassandra is « AP » Consistency Partition Tolerance Availability
  • 9. @clunven | @voxxed_lu | #voxxed_lu Tuneable Consistency RF=3 Client CL=ONECL=QUORUMCL=ALL
  • 10. @clunven | @voxxed_lu | #voxxed_lu …anywhere Cluster Datacenter (Ring)
  • 11. @clunven | @voxxed_lu | #voxxed_lu Sweet spots 1. High Throughput (because we can keep up) 2. High Volume (because we scale linearly and still OLTP) 3. High Availability (replication, masterless) 4. Data distribution (read/write around the globe)
  • 12. @clunven | @voxxed_lu | #voxxed_lu • Le KEYSPACE est comme un schéma dans Oracle, une isolation des données 12 Projet_X Keyspace Une table contient une CLEF PRIMAIRE contenant 2 parties : La partition key et le reste (clustering columns). Chaque valeur de partition key est hashée sous la forme d’un token. Plusieurs lignes avec la même partition key constitue une partition. Data Modelling
  • 13. @clunven | @voxxed_lu | #voxxed_lu • Syntaxe proche du SQL pour les bases relationnelles • Création des objets avec le DDL : • CREATE, INSERT, UPDATE, DELETE, GRANT, REVOKE, SELECT, WHERE 13 Exemple CREATE TABLE market_prices ( symbol TEXT, date TIMESTAMP, price DECIMAL, side INT, PRIMARY KEY (symbol, date) ) WITH CLUSTERING ORDER BY(date DESC); Cassandra Query Language
  • 16. @clunven | @voxxed_lu | #voxxed_lu Reference Application http://killrvideo.github.io
  • 17. @clunven | @voxxed_lu | #voxxed_lu Api Design Methodology 1 killrvideo-dse Drivers DAO3 killrvideo-api-rest killrvideo-api-grpc killrvideo-api-graphql 2
  • 18. @clunven | @voxxed_lu | #voxxed_lu Designing Data Model Entities & Relationships Queries
  • 19. @clunven | @voxxed_lu | #voxxed_lu Conceptual Data Model
  • 20. @clunven | @voxxed_lu | #voxxed_lu Application Workflow R1: Find comments related to target video using its identifier • Get most recent first • Implement Paging R2: Find comments related to target user using its identifier • Get most recent first • Implement Paging R3: Implement CRUD operations
  • 21. @clunven | @voxxed_lu | #voxxed_lu Mapping Q2: Find comments posted for a user with a known id (show most recent first) comments_by_video comments_by_user Q1: Find comments for a video with a known id (show most recent first) Q3: CRUD Operations
  • 22. @clunven | @voxxed_lu | #voxxed_lu Logical Data Model userid creationdate commentid videoid comment comments_by_user K C ↑ videoid creationdate commentid userid comment comments_by_video C ↑ K C ↑ ↑C
  • 23. @clunven | @voxxed_lu | #voxxed_lu Physical Data Model userid commentid videoid comment comments_by_user TIMEUUID K TEXT C UUID UUID ↑ videoid commentid userid comment comments_by_video TIMEUUID K TEXT C UUID UUID ↑
  • 24. @clunven | @voxxed_lu | #voxxed_lu Schema DDL CREATE TABLE IF NOT EXISTS comments_by_user ( userid uuid, commentid timeuuid, videoid uuid, comment text, PRIMARY KEY ((userid), commentid) ) WITH CLUSTERING ORDER BY (commentid DESC); CREATE TABLE IF NOT EXISTS comments_by_video ( videoid uuid, commentid timeuuid, userid uuid, comment text, PRIMARY KEY ((videoid), commentid) ) WITH CLUSTERING ORDER BY (commentid DESC);
  • 25. @clunven | @voxxed_lu | #voxxed_lu How? Conceptual Data Model (Entities, Relations) Application Workflow (Queries) Database Family (Technos +Table)
  • 26.
  • 27. @clunven | @voxxed_lu | #voxxed_lu
  • 28. @clunven | @voxxed_lu | #voxxed_lu
  • 30. @clunven | @voxxed_lu | #voxxed_lu Analysis Criteria 📋 Conceptual Data Model Application Workflow (Queries) Database Family (Technos +Table) Caching Syncvs AsyncReactive SLA (Volume) Data Integrity Filters Paging Sort Latencies Throughput Versionning Confidentiality Atomicity Cardinality Developers 👤 Users/Consumers Language CodeFirst/ Vs SchemaFirst Documentation Test Build Packaging Api Catalog Internalvs Public Techno Profile XP
  • 31. @clunven | @voxxed_lu | #voxxed_lu Analysis Matrix
  • 32. @clunven | @voxxed_lu | #voxxed_lu Decision Tree
  • 33. @clunven | @voxxed_lu | #voxxed_lu  Decoupling Client / Server (Schema on read)  Flexibility: Sync, Async, Reactive + Multi payload  Api Lifecycle (Versioning)  Tooling (API Management, Serverless)  Verbose payloads (json, xml)  No discoverability  Not best fit for command-like (functions) API (RPC)  CRUD superstar  Relevant for OLTP mutations and statuses  Public and web APIs
  • 34. @clunven | @voxxed_lu | #voxxed_lu  High Performances (http/2 – binary serialisation)  Multiple stubs : Sync, Async, Streaming  Multi languages (Interoperability)  Strongly coupled (schema with proto files)  No discoverability  Protobuf serialization format  Distributed network of services (no waits)  High throughput & streaming use cases  Command-like, RPC
  • 35. @clunven | @voxxed_lu | #voxxed_lu  Discoverability, documentation  Custom payloads  Match standards (Json | Http)  Single endpoint (versioning, monitoring, security)  Complex implementation (tooling, still young)  Nice for customers nasty for DB (N+1 select)  BFF : Backend for frontend  Service aggregation | composition (joins)  When bandwidth matters (mobile phones) GraphQL
  • 36. RESOURCES Because COPY/PASTE is the most important skill for developers
  • 37. @clunven | @voxxed_lu | #voxxed_lu References https://github.com/clun/api_Rest_Grpc_GraphQL

Hinweis der Redaktion

  1. One of Cassandra's fault-tolerance strategies is replication. Replication is a matter of duplicating data across nodes. The number of replicas is called the Replication Factor. Let’s look at some examples… <click> (RF=1 appears) Let’s start with the simplest example: a replication factor of 1 – only a single copy It’s not something you would likely do in production, but it's a good place to start the discussion. <click> (data appears) Here we’re showing a write request Some data with a partition token of 59 <click> (data moves to node) The top-right node will serve as the coordinator <click> (data turns purple) Notice 59 falls in the purple range <click> (data move to the node) So the coordinator forwards the data to the purple node <click> (data clears) <click> (RF=2 appears) Let's increase the replication factor to 2 <click> (ring colors double) This doubles the range that each node is responsible for. For example, node 75 becomes responsible for the red range and the purple range <click> (data appears) Again our request to write partition with token 59 arrives. But this time the coordinator sends it to two nodes. <click> (data moves) <click> (data fades) Let's increase the replication factor to 3 <click> (RF=3 appears) This means that each node is responsible for 3 ranges <click> (3 ranges appear) Once again, the data arrives at the coordinator Where will the coordinator send the data this time? <click> (data moves) We see the data replicated to all three nodes <click> (data fades) So, in a nutshell, that's how replication works
  2. Consistency level is different than replication factor. On a read, consistency level is how many replicas you read Each replica has a time stamp. The most recent replica wins In this example, imagine we have a replication factor of 3. <click> (shows write arrows) So when we write, we write 3 replicas of the data. <click> (shows CL=ONE) Now let's say we want to read from this cluster with a consistency level of 1. In this case, we only need to read from a single node to resolve the data. <click> (shows read arrows) Now, we can change the consistency level to quorum, <click> (CL=QUORUM appears) Which means we want to read a majority of the replicas. Since the replication factor is 3, quorum implies reading 2 replicas <click> (second read line appears) Notice, if the replicas disagree, the coordinator returns the data with the most recent time stamp <click> (CL clears) We can even specify a consistency level of ALL, <click> (CL=ALL appears) Which means we will read all replicas <click> (third read line appears) (pause to let people absorb)
  3. the default data model in DSE is tabular. It is similar to an RDBMS table but more flexible/dynamic Table is partitioned by one or more columns enabling fast lookups by partition keys A keyspace is the outermost container containing data corresponding to applications, keyspace is similar to database a relational database. each row in a column family is indexed by its key and contains ordered columns. Such unique data model allow DSE to deal with unstructured, schemaless data.
  4. Cassandra Query Language (CQL) is the primary language for communicating with DSE data management platform. CQL is a SQL-like language and allows you to create keyspace and tables, insert and query tables plus other activities using the language you are already familiar with.
  5. 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
  6. ALEXANDRE Show repository, stress its simplicity and blocking calls Show controller, same thing Show controller unit test, run tests