SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
Cassandra Drivers And Tools 
DuyHai DOAN, Technical Advocate 
@doanduyhai
Agenda! 
@doanduyhai 
2 
Drivers 
• architecture, policies, Java driver API 
DevCenter (live coding demo!) 
Cassandra Unit (+ live coding demo!) 
Object Mapper module (+ live coding demo!) 
Achilles Object Mapper (+ live coding demo!)
Cassandra Drivers Architecture! 
Architecture! 
Policies! 
Java driver API!
Drivers list! 
@doanduyhai 
4 
• Java 
• C# 
• Python 
• Node.js 
• Ruby (1.0.0.rc1) 
• C++ (beta) 
• ODBC (beta) 
• Clojure (community) 
• Go (community) 
• PHP (to be announced)
Connection pooling! 
@doanduyhai 
5 
n3 
n2 
n4 
Driver 
Pool1 
Pool2 
Pool3 
Client 
Thread1 
Client 
Thread2 
Client 
Thread3
Connection pooling! 
@doanduyhai 
6 
n3 
n2 
n4 
Driver 
Pool1 
Pool2 
Pool3 
Client 
Thread1 
Client 
Thread2 
Client 
Thread3 
1 
2 3 
4 
5 
6
Request Pipelining! 
@doanduyhai 
7 
Client Cassandra
Request Pipelining! 
@doanduyhai 
8 
Client Cassandra 
StreamID 
StreamID
Nodes Discovery! 
@doanduyhai 
9 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
Control Connection 
n1 Driver
Round Robin Load Balancing! 
@doanduyhai 
10 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
n1 Client 
1 
2 
3 
4
DC Aware Load Balancing! 
@doanduyhai 
11 
Client1 DC1 
⤫ 
Client2 DC2
DC Aware Load Balancing! 
@doanduyhai 
12 
⤫ 
Client1 DC1 
Client2 DC2
Token Aware Load Balancing! 
@doanduyhai 
13 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
1 
n1 Client 
2 
3 
⤫
Combining Load Balancing Policies! 
Token Aware 
Round Robin DC Aware Round Robin 
@doanduyhai 
14 
extends 
Load Balancing Policy 
wraps 
Default config
Automatic Failover! 
@doanduyhai 
15 
n3 
n2 
n4 
Driver 
7 6 
Pool1 
4 5 
Pool2 
Pool3 
Client 
Thread 
⤫ 
1 
2 
3 
8
Other policies! 
@doanduyhai 
16 
Retry policy 
• write/read timeout 
• node unavailable 
Reconnection policy 
• constant schedule 
• exponential schedule
Statements! 
@doanduyhai 
17 
Plain statement 
• convenient, one-off query 
• plain string ☞ parsing overhead 
INSERT INTO user(login, name, age) VALUES(‘jdoe’, ‘John DOE’, 33)’;
Statements! 
@doanduyhai 
18 
Prepared statements 
• avoid parsing overhead 
• query structure should be known ahead of time 
• bound values 
• named parameters 
INSERT INTO user(login, name, age) VALUES(?, ?, ?)’; 
INSERT INTO user(login, name, age) VALUES(:login, :name, :age)’;
Statements! 
@doanduyhai 
19 
Parameterized statements 
• same as plain statement 
• pass bound values as bytes ☞ avoid ser/deser of values 
INSERT INTO user(login, name, age) VALUES(?, ?, ?)’;
Java Driver! 
@doanduyhai 
20 
Reference implementation 
Base on asynchronous Netty library 
Configurable policies 
Query tracing support 
Client-node compression & SSL
Maven dependency! 
Available on Maven Central 
@doanduyhai 
21 
<dependency> 
<groupId>com.datastax.cassandra</groupId> 
<artifactId>cassandra-driver-core</artifactId> 
<version>2.1.3</version> 
</dependency> 
depends on Netty, Guava, Metrics
Connect and Write! 
@doanduyhai 
22 
Cluster cluster = Cluster.builder() 
.addContactPoints("127.0.0.1", “another-host").build(); 
seed nodes (IP or DNS name) 
Session session = cluster.connect("my_keyspace"); 
session.execute("INSERT INTO user (user_id, name, email) 
VALUES (12345, 'johndoe', 'john_doe@fiction.com’)");
Configuration! 
@doanduyhai 
23 
Cluster cluster = Cluster.builder() 
.addContactPoints("127.0.0.1", “another-host") 
.withLoadBalancingPolicy(new DCAwareRoundRobinPolicy("DC1") 
.withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE) 
.withReconnectionPolicy(new ConstantReconnectionPolicy(1000)) 
.build();
Read! 
@doanduyhai 
24 
ResultSet resultSet = session.execute("SELECT * FROM user"); 
List<Row> rows = resultSet.all(); 
for (Row row : rows) { 
Long userId = row.getLong("user_id"); 
String name = row.getString("name"); 
String email = row.getString("email"); 
} 
Stateless ☞ thread-safe
Asynchronous Read! 
ResultSetFuture future = session.executeAsync("SELECT * FROM user"); 
ResultSet resultSet = future.get(); //blocking call 
List<Row> rows = resultSet.all(); 
for (Row row : rows) { 
Long userId = row.getLong("user_id"); 
String name = row.getString("name"); 
String email = row.getString("email"); 
} 
@doanduyhai 25
Asynchronous Read with CallBack! 
ResultSetFuture future = session.executeAsync("SELECT * FROM user"); 
future.addListener(new Runnable() { 
public void run() { 
// Process the results here 
} 
}, executor); 
executor = Executors .newCachedThreadPool(); 
or 
executor = Executors .sameThreadExecutor(); 
@doanduyhai 26
Query Builder! 
Query query = QueryBuilder 
.select() 
.all() 
.from( "my_keyspace", "user") 
.where(eq("login", "jdoe")); 
query.setConsistencyLevel(ConsistencyLevel.ONE); 
ResultSet rs = session.execute(query); 
@doanduyhai 27
Old manual paging! 
@doanduyhai 
28 
Some time you need to fetch all table content 
Manual paging: 
SELECT * FROM users WHERE token(login) >= token(<last_fetched_login>) 
LIMIT 100;
New automatic paging! 
@doanduyhai 
29 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
Query 
n1 Driver 
Page 1 + paging state 1
New automatic paging! 
@doanduyhai 
30 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
Query 
n1 Driver 
Page 2 + paging state 2
New automatic paging! 
@doanduyhai 
31 
Paging state ≈ stateless cookie 
Resilient to node failure
Paging during node failure! 
@doanduyhai 
32 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
Query 
n1 Driver 
Page 1 + paging state 1
Paging during node failure! 
@doanduyhai 
33 
n2 
n3 
n4 
n5 
n6 
n7 
n8 
Query 
n1 Driver 
Page 2 + paging state 2 
⤫
! " 
! 
Q & R
Dev Center 
Demo
Cassandra Unit! 
@doanduyhai 
36 
• start an embedded Cassandra server 
• useful for unit testing 
• mature project, created at August 5th 2011 
• designed around Thrift & Hector 
• propose a JUnit rule for CQL
Cassandra Unit 
Demo
Java Driver Object Mapper! 
@doanduyhai 
38 
• simple mapper 
• KISS 
• annotations à-la JPA (but no JPA dependencies) 
• templating system à-la Spring Data
Java Driver Object Mapper! 
Mapping 
@doanduyhai 
39 
@Table(keyspace = "mapper_module", name = "users") 
public class User { 
@PartitionKey 
private String login; 
private String name; 
// getters and setters omitted... 
}
Java Driver Object Mapper! 
Usage 
@doanduyhai 
40 
MappingManager manager = new MappingManager(session); 
Mapper mapper = manager.mapper(User.class); 
User user = mapper.get("jdoe@fiction.com"); 
mapper.saveAsync(new User("hsue@fiction.com")); 
mapper.delete("jdoe@fiction.com");
Java Driver Object Mapper! 
Accessors (SpringData template-like) definition 
@doanduyhai 
41 
@Accessor 
interface UserAccessor { 
@Query("SELECT * FROM users LIMIT :max") 
Result<User> firstNUsers(@Param("max") int limit); 
}
Java Driver Object Mapper! 
@doanduyhai 
42 
Accessors usage 
UserAccessor accessor = manager.createAccessor(UserAccessor.class); 
List<User> users = accessor.firstNUsers(10).all(); 
for (User user : users) { 
System.out.println( profile.getAddress().getZip() ); 
}
Java Driver Object Mapper 
Demo
Achilles! 
@doanduyhai 
44 
Why ? 
• started in late 2012, when mapper module did not exists 
• more involved and more features than the mapper module 
• different annotations set (may converge)
Achilles 
Demo
Dirty Checking! 
@doanduyhai 
46 
Dirty checking, why is it important ? 
• 1 user ≈ 8 mutable fields 
• × n denormalizations = n update combinations 
• and not even counting multiple fields updates …
Dirty Checking! 
@doanduyhai 
47 
• Are you going to manually generate n prepared statements for all 
possible updates ? 
• Or just use dynamic plain string statements and get some perf 
penalty ?
Dirty Checking! 
@doanduyhai 
48 
//No read-before-write 
ContactEntity proxy = manager.forUpdate(ContactEntity.class, contactId); 
proxy.setFirstName(…); 
proxy.setLastName(…); //type-safe updates 
proxy.setAddress(…); 
manager.update(proxy);
Dirty Checking! 
@doanduyhai 
49 
Proxy 
Setters interception 
DirtyMap 
Empty 
Entity 
PrimaryKey
Dirty Checking! 
@doanduyhai 
50 
• Dynamic statement generation 
UPDATE contacts SET firstname=?, lastname=?,address=? 
WHERE contact_id=? 
prepared statements are cached, of course
Main API! 
@doanduyhai 
51 
manager.insert(entity) 
manager.update(entity) 
manager.remove(entity) 
manager.find(Entity.class, primaryKey)
Advanced Features! 
@doanduyhai 
52 
Counter 
Batch mode 
Strategies (insert, naming) 
Options 
Asynchronous
Documentation! 
@doanduyhai 
53 
Comprehensive Github WIKI 
Twitter-clone demo app (demo.achilles.io) 
Versioned documentation (HTML & PDF) 
JavaDoc
RoadMap! 
@doanduyhai 
54 
C* 2.1 user defined types (UDT) 
Query-templates à-la Spring Data 
Reactive ? (RxJava) 
ElasticSearch integration (@olivierbourgain)
! " 
! 
Q & R
Thank You 
@doanduyhai 
duy_hai.doan@datastax.com 
https://academy.datastax.com/

Weitere ähnliche Inhalte

Was ist angesagt?

Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...CODE BLUE
 
Testing with Style @ Holidaycheck
Testing with Style @ HolidaycheckTesting with Style @ Holidaycheck
Testing with Style @ HolidaycheckAndreas Neumann
 
Clojure: Simple By Design
Clojure: Simple By DesignClojure: Simple By Design
Clojure: Simple By DesignAll Things Open
 
DOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon SecurityDOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon SecurityLoopback.ORG
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeWim Godden
 
Side by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSide by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSematext Group, Inc.
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for CassandraEdward Capriolo
 
Oracle forensics 101
Oracle forensics 101Oracle forensics 101
Oracle forensics 101fangjiafu
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesChristopher Frohoff
 
Riak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup GroupRiak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup Groupsiculars
 
Spark Cassandra 2016
Spark Cassandra 2016Spark Cassandra 2016
Spark Cassandra 2016Duyhai Doan
 
DOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security ReloadedDOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security ReloadedLoopback.ORG
 
ElasticSearch AJUG 2013
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013Roy Russo
 
Mito, a successor of Integral
Mito, a successor of IntegralMito, a successor of Integral
Mito, a successor of Integralfukamachi
 
Beyond php it's not (just) about the code
Beyond php   it's not (just) about the codeBeyond php   it's not (just) about the code
Beyond php it's not (just) about the codeWim Godden
 
DNS exfiltration using sqlmap
DNS exfiltration using sqlmapDNS exfiltration using sqlmap
DNS exfiltration using sqlmapMiroslav Stampar
 
Integrating the NCBI BLAST+ suite into Galaxy
Integrating the NCBI BLAST+ suite into GalaxyIntegrating the NCBI BLAST+ suite into Galaxy
Integrating the NCBI BLAST+ suite into Galaxypjacock
 

Was ist angesagt? (20)

Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...Backdoors with the MS Office file encryption master key and a proposal for a ...
Backdoors with the MS Office file encryption master key and a proposal for a ...
 
Hanganalyze presentation
Hanganalyze presentationHanganalyze presentation
Hanganalyze presentation
 
Testing with Style @ Holidaycheck
Testing with Style @ HolidaycheckTesting with Style @ Holidaycheck
Testing with Style @ Holidaycheck
 
Clojure: Simple By Design
Clojure: Simple By DesignClojure: Simple By Design
Clojure: Simple By Design
 
DOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon SecurityDOAG 2016 Oracle Logon Security
DOAG 2016 Oracle Logon Security
 
Beyond php - it's not (just) about the code
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
 
Side by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and SolrSide by Side with Elasticsearch and Solr
Side by Side with Elasticsearch and Solr
 
Intravert Server side processing for Cassandra
Intravert Server side processing for CassandraIntravert Server side processing for Cassandra
Intravert Server side processing for Cassandra
 
Oracle forensics 101
Oracle forensics 101Oracle forensics 101
Oracle forensics 101
 
OWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling PicklesOWASP AppSecCali 2015 - Marshalling Pickles
OWASP AppSecCali 2015 - Marshalling Pickles
 
Riak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup GroupRiak at The NYC Cloud Computing Meetup Group
Riak at The NYC Cloud Computing Meetup Group
 
Spark Cassandra 2016
Spark Cassandra 2016Spark Cassandra 2016
Spark Cassandra 2016
 
DOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security ReloadedDOAG Security Day 2016 Enterprise Security Reloaded
DOAG Security Day 2016 Enterprise Security Reloaded
 
ElasticSearch AJUG 2013
ElasticSearch AJUG 2013ElasticSearch AJUG 2013
ElasticSearch AJUG 2013
 
Django cryptography
Django cryptographyDjango cryptography
Django cryptography
 
Mito, a successor of Integral
Mito, a successor of IntegralMito, a successor of Integral
Mito, a successor of Integral
 
Load Data Fast!
Load Data Fast!Load Data Fast!
Load Data Fast!
 
Beyond php it's not (just) about the code
Beyond php   it's not (just) about the codeBeyond php   it's not (just) about the code
Beyond php it's not (just) about the code
 
DNS exfiltration using sqlmap
DNS exfiltration using sqlmapDNS exfiltration using sqlmap
DNS exfiltration using sqlmap
 
Integrating the NCBI BLAST+ suite into Galaxy
Integrating the NCBI BLAST+ suite into GalaxyIntegrating the NCBI BLAST+ suite into Galaxy
Integrating the NCBI BLAST+ suite into Galaxy
 

Andere mochten auch

Introduction to KillrChat
Introduction to KillrChatIntroduction to KillrChat
Introduction to KillrChatDuyhai Doan
 
Cassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUGCassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUGDuyhai Doan
 
Cassandra introduction @ ParisJUG
Cassandra introduction @ ParisJUGCassandra introduction @ ParisJUG
Cassandra introduction @ ParisJUGDuyhai Doan
 
Sasi, cassandra on the full text search ride At Voxxed Day Belgrade 2016
Sasi, cassandra on the full text search ride At  Voxxed Day Belgrade 2016Sasi, cassandra on the full text search ride At  Voxxed Day Belgrade 2016
Sasi, cassandra on the full text search ride At Voxxed Day Belgrade 2016Duyhai Doan
 
KillrChat Data Modeling
KillrChat Data ModelingKillrChat Data Modeling
KillrChat Data ModelingDuyhai Doan
 
Fast track to getting started with DSE Max @ ING
Fast track to getting started with DSE Max @ INGFast track to getting started with DSE Max @ ING
Fast track to getting started with DSE Max @ INGDuyhai Doan
 
Apache Zeppelin @DevoxxFR 2016
Apache Zeppelin @DevoxxFR 2016Apache Zeppelin @DevoxxFR 2016
Apache Zeppelin @DevoxxFR 2016Duyhai Doan
 
KillrChat presentation
KillrChat presentationKillrChat presentation
KillrChat presentationDuyhai Doan
 
Cassandra introduction mars jug
Cassandra introduction mars jugCassandra introduction mars jug
Cassandra introduction mars jugDuyhai Doan
 
Datastax day 2016 introduction to apache cassandra
Datastax day 2016   introduction to apache cassandraDatastax day 2016   introduction to apache cassandra
Datastax day 2016 introduction to apache cassandraDuyhai Doan
 
Spark cassandra integration 2016
Spark cassandra integration 2016Spark cassandra integration 2016
Spark cassandra integration 2016Duyhai Doan
 
Cassandra and Spark, closing the gap between no sql and analytics codemotio...
Cassandra and Spark, closing the gap between no sql and analytics   codemotio...Cassandra and Spark, closing the gap between no sql and analytics   codemotio...
Cassandra and Spark, closing the gap between no sql and analytics codemotio...Duyhai Doan
 
Cassandra introduction at FinishJUG
Cassandra introduction at FinishJUGCassandra introduction at FinishJUG
Cassandra introduction at FinishJUGDuyhai Doan
 
Spark cassandra integration, theory and practice
Spark cassandra integration, theory and practiceSpark cassandra integration, theory and practice
Spark cassandra integration, theory and practiceDuyhai Doan
 
Data stax academy
Data stax academyData stax academy
Data stax academyDuyhai Doan
 
Cassandra introduction 2016
Cassandra introduction 2016Cassandra introduction 2016
Cassandra introduction 2016Duyhai Doan
 
Cassandra nice use cases and worst anti patterns no sql-matters barcelona
Cassandra nice use cases and worst anti patterns no sql-matters barcelonaCassandra nice use cases and worst anti patterns no sql-matters barcelona
Cassandra nice use cases and worst anti patterns no sql-matters barcelonaDuyhai Doan
 
Libon cassandra summiteu2014
Libon cassandra summiteu2014Libon cassandra summiteu2014
Libon cassandra summiteu2014Duyhai Doan
 
Cassandra 3 new features @ Geecon Krakow 2016
Cassandra 3 new features  @ Geecon Krakow 2016Cassandra 3 new features  @ Geecon Krakow 2016
Cassandra 3 new features @ Geecon Krakow 2016Duyhai Doan
 
Real time data processing with spark & cassandra @ NoSQLMatters 2015 Paris
Real time data processing with spark & cassandra @ NoSQLMatters 2015 ParisReal time data processing with spark & cassandra @ NoSQLMatters 2015 Paris
Real time data processing with spark & cassandra @ NoSQLMatters 2015 ParisDuyhai Doan
 

Andere mochten auch (20)

Introduction to KillrChat
Introduction to KillrChatIntroduction to KillrChat
Introduction to KillrChat
 
Cassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUGCassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUG
 
Cassandra introduction @ ParisJUG
Cassandra introduction @ ParisJUGCassandra introduction @ ParisJUG
Cassandra introduction @ ParisJUG
 
Sasi, cassandra on the full text search ride At Voxxed Day Belgrade 2016
Sasi, cassandra on the full text search ride At  Voxxed Day Belgrade 2016Sasi, cassandra on the full text search ride At  Voxxed Day Belgrade 2016
Sasi, cassandra on the full text search ride At Voxxed Day Belgrade 2016
 
KillrChat Data Modeling
KillrChat Data ModelingKillrChat Data Modeling
KillrChat Data Modeling
 
Fast track to getting started with DSE Max @ ING
Fast track to getting started with DSE Max @ INGFast track to getting started with DSE Max @ ING
Fast track to getting started with DSE Max @ ING
 
Apache Zeppelin @DevoxxFR 2016
Apache Zeppelin @DevoxxFR 2016Apache Zeppelin @DevoxxFR 2016
Apache Zeppelin @DevoxxFR 2016
 
KillrChat presentation
KillrChat presentationKillrChat presentation
KillrChat presentation
 
Cassandra introduction mars jug
Cassandra introduction mars jugCassandra introduction mars jug
Cassandra introduction mars jug
 
Datastax day 2016 introduction to apache cassandra
Datastax day 2016   introduction to apache cassandraDatastax day 2016   introduction to apache cassandra
Datastax day 2016 introduction to apache cassandra
 
Spark cassandra integration 2016
Spark cassandra integration 2016Spark cassandra integration 2016
Spark cassandra integration 2016
 
Cassandra and Spark, closing the gap between no sql and analytics codemotio...
Cassandra and Spark, closing the gap between no sql and analytics   codemotio...Cassandra and Spark, closing the gap between no sql and analytics   codemotio...
Cassandra and Spark, closing the gap between no sql and analytics codemotio...
 
Cassandra introduction at FinishJUG
Cassandra introduction at FinishJUGCassandra introduction at FinishJUG
Cassandra introduction at FinishJUG
 
Spark cassandra integration, theory and practice
Spark cassandra integration, theory and practiceSpark cassandra integration, theory and practice
Spark cassandra integration, theory and practice
 
Data stax academy
Data stax academyData stax academy
Data stax academy
 
Cassandra introduction 2016
Cassandra introduction 2016Cassandra introduction 2016
Cassandra introduction 2016
 
Cassandra nice use cases and worst anti patterns no sql-matters barcelona
Cassandra nice use cases and worst anti patterns no sql-matters barcelonaCassandra nice use cases and worst anti patterns no sql-matters barcelona
Cassandra nice use cases and worst anti patterns no sql-matters barcelona
 
Libon cassandra summiteu2014
Libon cassandra summiteu2014Libon cassandra summiteu2014
Libon cassandra summiteu2014
 
Cassandra 3 new features @ Geecon Krakow 2016
Cassandra 3 new features  @ Geecon Krakow 2016Cassandra 3 new features  @ Geecon Krakow 2016
Cassandra 3 new features @ Geecon Krakow 2016
 
Real time data processing with spark & cassandra @ NoSQLMatters 2015 Paris
Real time data processing with spark & cassandra @ NoSQLMatters 2015 ParisReal time data processing with spark & cassandra @ NoSQLMatters 2015 Paris
Real time data processing with spark & cassandra @ NoSQLMatters 2015 Paris
 

Ähnlich wie Cassandra drivers and libraries

Cassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS ParisCassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS ParisDuyhai Doan
 
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...NoSQLmatters
 
Distributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayDistributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayodnoklassniki.ru
 
Migrating To PostgreSQL
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQLGrant Fritchey
 
DConf2015 - Using D for Development of Large Scale Primary Storage
DConf2015 - Using D for Development  of Large Scale Primary StorageDConf2015 - Using D for Development  of Large Scale Primary Storage
DConf2015 - Using D for Development of Large Scale Primary StorageLiran Zvibel
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPOscar Merida
 
Sasi, cassandra on full text search ride
Sasi, cassandra on full text search rideSasi, cassandra on full text search ride
Sasi, cassandra on full text search rideDuyhai Doan
 
Cassandra for the ops dos and donts
Cassandra for the ops   dos and dontsCassandra for the ops   dos and donts
Cassandra for the ops dos and dontsDuyhai Doan
 
Cassandra 3 new features 2016
Cassandra 3 new features 2016Cassandra 3 new features 2016
Cassandra 3 new features 2016Duyhai Doan
 
Discover GraphQL with Python, Graphene and Odoo
Discover GraphQL with Python, Graphene and OdooDiscover GraphQL with Python, Graphene and Odoo
Discover GraphQL with Python, Graphene and OdooOdoo
 
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...Robert Schadek
 
Cassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapestCassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapestDuyhai Doan
 
Introduction to Cassandra & Data model
Introduction to Cassandra & Data modelIntroduction to Cassandra & Data model
Introduction to Cassandra & Data modelDuyhai Doan
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoopclairvoyantllc
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a bossFrancisco Ribeiro
 
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
 
Python & Django TTT
Python & Django TTTPython & Django TTT
Python & Django TTTkevinvw
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsTeamstudio
 
Spark zeppelin-cassandra at synchrotron
Spark zeppelin-cassandra at synchrotronSpark zeppelin-cassandra at synchrotron
Spark zeppelin-cassandra at synchrotronDuyhai Doan
 

Ähnlich wie Cassandra drivers and libraries (20)

Cassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS ParisCassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS Paris
 
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
DuyHai DOAN - Real time analytics with Cassandra and Spark - NoSQL matters Pa...
 
Distributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevdayDistributed systems at ok.ru #rigadevday
Distributed systems at ok.ru #rigadevday
 
Migrating To PostgreSQL
Migrating To PostgreSQLMigrating To PostgreSQL
Migrating To PostgreSQL
 
DConf2015 - Using D for Development of Large Scale Primary Storage
DConf2015 - Using D for Development  of Large Scale Primary StorageDConf2015 - Using D for Development  of Large Scale Primary Storage
DConf2015 - Using D for Development of Large Scale Primary Storage
 
Staying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHPStaying Sane with Drupal NEPHP
Staying Sane with Drupal NEPHP
 
Sasi, cassandra on full text search ride
Sasi, cassandra on full text search rideSasi, cassandra on full text search ride
Sasi, cassandra on full text search ride
 
Cassandra for the ops dos and donts
Cassandra for the ops   dos and dontsCassandra for the ops   dos and donts
Cassandra for the ops dos and donts
 
Cassandra 3 new features 2016
Cassandra 3 new features 2016Cassandra 3 new features 2016
Cassandra 3 new features 2016
 
Naver_alternative_to_jpa
Naver_alternative_to_jpaNaver_alternative_to_jpa
Naver_alternative_to_jpa
 
Discover GraphQL with Python, Graphene and Odoo
Discover GraphQL with Python, Graphene and OdooDiscover GraphQL with Python, Graphene and Odoo
Discover GraphQL with Python, Graphene and Odoo
 
Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...Asynchronous single page applications without a line of HTML or Javascript, o...
Asynchronous single page applications without a line of HTML or Javascript, o...
 
Cassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapestCassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapest
 
Introduction to Cassandra & Data model
Introduction to Cassandra & Data modelIntroduction to Cassandra & Data model
Introduction to Cassandra & Data model
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
web2py:Web development like a boss
web2py:Web development like a bossweb2py:Web development like a boss
web2py:Web development like a boss
 
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
 
Python & Django TTT
Python & Django TTTPython & Django TTT
Python & Django TTT
 
Access Data from XPages with the Relational Controls
Access Data from XPages with the Relational ControlsAccess Data from XPages with the Relational Controls
Access Data from XPages with the Relational Controls
 
Spark zeppelin-cassandra at synchrotron
Spark zeppelin-cassandra at synchrotronSpark zeppelin-cassandra at synchrotron
Spark zeppelin-cassandra at synchrotron
 

Mehr von Duyhai Doan

Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...
Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...
Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...Duyhai Doan
 
Le futur d'apache cassandra
Le futur d'apache cassandraLe futur d'apache cassandra
Le futur d'apache cassandraDuyhai Doan
 
Big data 101 for beginners devoxxpl
Big data 101 for beginners devoxxplBig data 101 for beginners devoxxpl
Big data 101 for beginners devoxxplDuyhai Doan
 
Big data 101 for beginners riga dev days
Big data 101 for beginners riga dev daysBig data 101 for beginners riga dev days
Big data 101 for beginners riga dev daysDuyhai Doan
 
Datastax enterprise presentation
Datastax enterprise presentationDatastax enterprise presentation
Datastax enterprise presentationDuyhai Doan
 
Datastax day 2016 : Cassandra data modeling basics
Datastax day 2016 : Cassandra data modeling basicsDatastax day 2016 : Cassandra data modeling basics
Datastax day 2016 : Cassandra data modeling basicsDuyhai Doan
 
Apache cassandra in 2016
Apache cassandra in 2016Apache cassandra in 2016
Apache cassandra in 2016Duyhai Doan
 
Algorithme distribués pour big data saison 2 @DevoxxFR 2016
Algorithme distribués pour big data saison 2 @DevoxxFR 2016Algorithme distribués pour big data saison 2 @DevoxxFR 2016
Algorithme distribués pour big data saison 2 @DevoxxFR 2016Duyhai Doan
 
Cassandra introduction 2016
Cassandra introduction 2016Cassandra introduction 2016
Cassandra introduction 2016Duyhai Doan
 
Apache zeppelin the missing component for the big data ecosystem
Apache zeppelin the missing component for the big data ecosystemApache zeppelin the missing component for the big data ecosystem
Apache zeppelin the missing component for the big data ecosystemDuyhai Doan
 
Cassandra UDF and Materialized Views
Cassandra UDF and Materialized ViewsCassandra UDF and Materialized Views
Cassandra UDF and Materialized ViewsDuyhai Doan
 
Apache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemApache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemDuyhai Doan
 
Distributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeConDistributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeConDuyhai Doan
 
Spark cassandra connector.API, Best Practices and Use-Cases
Spark cassandra connector.API, Best Practices and Use-CasesSpark cassandra connector.API, Best Practices and Use-Cases
Spark cassandra connector.API, Best Practices and Use-CasesDuyhai Doan
 
Algorithmes distribues pour le big data @ DevoxxFR 2015
Algorithmes distribues pour le big data @ DevoxxFR 2015Algorithmes distribues pour le big data @ DevoxxFR 2015
Algorithmes distribues pour le big data @ DevoxxFR 2015Duyhai Doan
 

Mehr von Duyhai Doan (15)

Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...
Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...
Pourquoi Terraform n'est pas le bon outil pour les déploiements automatisés d...
 
Le futur d'apache cassandra
Le futur d'apache cassandraLe futur d'apache cassandra
Le futur d'apache cassandra
 
Big data 101 for beginners devoxxpl
Big data 101 for beginners devoxxplBig data 101 for beginners devoxxpl
Big data 101 for beginners devoxxpl
 
Big data 101 for beginners riga dev days
Big data 101 for beginners riga dev daysBig data 101 for beginners riga dev days
Big data 101 for beginners riga dev days
 
Datastax enterprise presentation
Datastax enterprise presentationDatastax enterprise presentation
Datastax enterprise presentation
 
Datastax day 2016 : Cassandra data modeling basics
Datastax day 2016 : Cassandra data modeling basicsDatastax day 2016 : Cassandra data modeling basics
Datastax day 2016 : Cassandra data modeling basics
 
Apache cassandra in 2016
Apache cassandra in 2016Apache cassandra in 2016
Apache cassandra in 2016
 
Algorithme distribués pour big data saison 2 @DevoxxFR 2016
Algorithme distribués pour big data saison 2 @DevoxxFR 2016Algorithme distribués pour big data saison 2 @DevoxxFR 2016
Algorithme distribués pour big data saison 2 @DevoxxFR 2016
 
Cassandra introduction 2016
Cassandra introduction 2016Cassandra introduction 2016
Cassandra introduction 2016
 
Apache zeppelin the missing component for the big data ecosystem
Apache zeppelin the missing component for the big data ecosystemApache zeppelin the missing component for the big data ecosystem
Apache zeppelin the missing component for the big data ecosystem
 
Cassandra UDF and Materialized Views
Cassandra UDF and Materialized ViewsCassandra UDF and Materialized Views
Cassandra UDF and Materialized Views
 
Apache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystemApache zeppelin, the missing component for the big data ecosystem
Apache zeppelin, the missing component for the big data ecosystem
 
Distributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeConDistributed algorithms for big data @ GeeCon
Distributed algorithms for big data @ GeeCon
 
Spark cassandra connector.API, Best Practices and Use-Cases
Spark cassandra connector.API, Best Practices and Use-CasesSpark cassandra connector.API, Best Practices and Use-Cases
Spark cassandra connector.API, Best Practices and Use-Cases
 
Algorithmes distribues pour le big data @ DevoxxFR 2015
Algorithmes distribues pour le big data @ DevoxxFR 2015Algorithmes distribues pour le big data @ DevoxxFR 2015
Algorithmes distribues pour le big data @ DevoxxFR 2015
 

Kürzlich hochgeladen

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Kürzlich hochgeladen (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Cassandra drivers and libraries

  • 1. Cassandra Drivers And Tools DuyHai DOAN, Technical Advocate @doanduyhai
  • 2. Agenda! @doanduyhai 2 Drivers • architecture, policies, Java driver API DevCenter (live coding demo!) Cassandra Unit (+ live coding demo!) Object Mapper module (+ live coding demo!) Achilles Object Mapper (+ live coding demo!)
  • 3. Cassandra Drivers Architecture! Architecture! Policies! Java driver API!
  • 4. Drivers list! @doanduyhai 4 • Java • C# • Python • Node.js • Ruby (1.0.0.rc1) • C++ (beta) • ODBC (beta) • Clojure (community) • Go (community) • PHP (to be announced)
  • 5. Connection pooling! @doanduyhai 5 n3 n2 n4 Driver Pool1 Pool2 Pool3 Client Thread1 Client Thread2 Client Thread3
  • 6. Connection pooling! @doanduyhai 6 n3 n2 n4 Driver Pool1 Pool2 Pool3 Client Thread1 Client Thread2 Client Thread3 1 2 3 4 5 6
  • 7. Request Pipelining! @doanduyhai 7 Client Cassandra
  • 8. Request Pipelining! @doanduyhai 8 Client Cassandra StreamID StreamID
  • 9. Nodes Discovery! @doanduyhai 9 n2 n3 n4 n5 n6 n7 n8 Control Connection n1 Driver
  • 10. Round Robin Load Balancing! @doanduyhai 10 n2 n3 n4 n5 n6 n7 n8 n1 Client 1 2 3 4
  • 11. DC Aware Load Balancing! @doanduyhai 11 Client1 DC1 ⤫ Client2 DC2
  • 12. DC Aware Load Balancing! @doanduyhai 12 ⤫ Client1 DC1 Client2 DC2
  • 13. Token Aware Load Balancing! @doanduyhai 13 n2 n3 n4 n5 n6 n7 n8 1 n1 Client 2 3 ⤫
  • 14. Combining Load Balancing Policies! Token Aware Round Robin DC Aware Round Robin @doanduyhai 14 extends Load Balancing Policy wraps Default config
  • 15. Automatic Failover! @doanduyhai 15 n3 n2 n4 Driver 7 6 Pool1 4 5 Pool2 Pool3 Client Thread ⤫ 1 2 3 8
  • 16. Other policies! @doanduyhai 16 Retry policy • write/read timeout • node unavailable Reconnection policy • constant schedule • exponential schedule
  • 17. Statements! @doanduyhai 17 Plain statement • convenient, one-off query • plain string ☞ parsing overhead INSERT INTO user(login, name, age) VALUES(‘jdoe’, ‘John DOE’, 33)’;
  • 18. Statements! @doanduyhai 18 Prepared statements • avoid parsing overhead • query structure should be known ahead of time • bound values • named parameters INSERT INTO user(login, name, age) VALUES(?, ?, ?)’; INSERT INTO user(login, name, age) VALUES(:login, :name, :age)’;
  • 19. Statements! @doanduyhai 19 Parameterized statements • same as plain statement • pass bound values as bytes ☞ avoid ser/deser of values INSERT INTO user(login, name, age) VALUES(?, ?, ?)’;
  • 20. Java Driver! @doanduyhai 20 Reference implementation Base on asynchronous Netty library Configurable policies Query tracing support Client-node compression & SSL
  • 21. Maven dependency! Available on Maven Central @doanduyhai 21 <dependency> <groupId>com.datastax.cassandra</groupId> <artifactId>cassandra-driver-core</artifactId> <version>2.1.3</version> </dependency> depends on Netty, Guava, Metrics
  • 22. Connect and Write! @doanduyhai 22 Cluster cluster = Cluster.builder() .addContactPoints("127.0.0.1", “another-host").build(); seed nodes (IP or DNS name) Session session = cluster.connect("my_keyspace"); session.execute("INSERT INTO user (user_id, name, email) VALUES (12345, 'johndoe', 'john_doe@fiction.com’)");
  • 23. Configuration! @doanduyhai 23 Cluster cluster = Cluster.builder() .addContactPoints("127.0.0.1", “another-host") .withLoadBalancingPolicy(new DCAwareRoundRobinPolicy("DC1") .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE) .withReconnectionPolicy(new ConstantReconnectionPolicy(1000)) .build();
  • 24. Read! @doanduyhai 24 ResultSet resultSet = session.execute("SELECT * FROM user"); List<Row> rows = resultSet.all(); for (Row row : rows) { Long userId = row.getLong("user_id"); String name = row.getString("name"); String email = row.getString("email"); } Stateless ☞ thread-safe
  • 25. Asynchronous Read! ResultSetFuture future = session.executeAsync("SELECT * FROM user"); ResultSet resultSet = future.get(); //blocking call List<Row> rows = resultSet.all(); for (Row row : rows) { Long userId = row.getLong("user_id"); String name = row.getString("name"); String email = row.getString("email"); } @doanduyhai 25
  • 26. Asynchronous Read with CallBack! ResultSetFuture future = session.executeAsync("SELECT * FROM user"); future.addListener(new Runnable() { public void run() { // Process the results here } }, executor); executor = Executors .newCachedThreadPool(); or executor = Executors .sameThreadExecutor(); @doanduyhai 26
  • 27. Query Builder! Query query = QueryBuilder .select() .all() .from( "my_keyspace", "user") .where(eq("login", "jdoe")); query.setConsistencyLevel(ConsistencyLevel.ONE); ResultSet rs = session.execute(query); @doanduyhai 27
  • 28. Old manual paging! @doanduyhai 28 Some time you need to fetch all table content Manual paging: SELECT * FROM users WHERE token(login) >= token(<last_fetched_login>) LIMIT 100;
  • 29. New automatic paging! @doanduyhai 29 n2 n3 n4 n5 n6 n7 n8 Query n1 Driver Page 1 + paging state 1
  • 30. New automatic paging! @doanduyhai 30 n2 n3 n4 n5 n6 n7 n8 Query n1 Driver Page 2 + paging state 2
  • 31. New automatic paging! @doanduyhai 31 Paging state ≈ stateless cookie Resilient to node failure
  • 32. Paging during node failure! @doanduyhai 32 n2 n3 n4 n5 n6 n7 n8 Query n1 Driver Page 1 + paging state 1
  • 33. Paging during node failure! @doanduyhai 33 n2 n3 n4 n5 n6 n7 n8 Query n1 Driver Page 2 + paging state 2 ⤫
  • 34. ! " ! Q & R
  • 36. Cassandra Unit! @doanduyhai 36 • start an embedded Cassandra server • useful for unit testing • mature project, created at August 5th 2011 • designed around Thrift & Hector • propose a JUnit rule for CQL
  • 38. Java Driver Object Mapper! @doanduyhai 38 • simple mapper • KISS • annotations à-la JPA (but no JPA dependencies) • templating system à-la Spring Data
  • 39. Java Driver Object Mapper! Mapping @doanduyhai 39 @Table(keyspace = "mapper_module", name = "users") public class User { @PartitionKey private String login; private String name; // getters and setters omitted... }
  • 40. Java Driver Object Mapper! Usage @doanduyhai 40 MappingManager manager = new MappingManager(session); Mapper mapper = manager.mapper(User.class); User user = mapper.get("jdoe@fiction.com"); mapper.saveAsync(new User("hsue@fiction.com")); mapper.delete("jdoe@fiction.com");
  • 41. Java Driver Object Mapper! Accessors (SpringData template-like) definition @doanduyhai 41 @Accessor interface UserAccessor { @Query("SELECT * FROM users LIMIT :max") Result<User> firstNUsers(@Param("max") int limit); }
  • 42. Java Driver Object Mapper! @doanduyhai 42 Accessors usage UserAccessor accessor = manager.createAccessor(UserAccessor.class); List<User> users = accessor.firstNUsers(10).all(); for (User user : users) { System.out.println( profile.getAddress().getZip() ); }
  • 43. Java Driver Object Mapper Demo
  • 44. Achilles! @doanduyhai 44 Why ? • started in late 2012, when mapper module did not exists • more involved and more features than the mapper module • different annotations set (may converge)
  • 46. Dirty Checking! @doanduyhai 46 Dirty checking, why is it important ? • 1 user ≈ 8 mutable fields • × n denormalizations = n update combinations • and not even counting multiple fields updates …
  • 47. Dirty Checking! @doanduyhai 47 • Are you going to manually generate n prepared statements for all possible updates ? • Or just use dynamic plain string statements and get some perf penalty ?
  • 48. Dirty Checking! @doanduyhai 48 //No read-before-write ContactEntity proxy = manager.forUpdate(ContactEntity.class, contactId); proxy.setFirstName(…); proxy.setLastName(…); //type-safe updates proxy.setAddress(…); manager.update(proxy);
  • 49. Dirty Checking! @doanduyhai 49 Proxy Setters interception DirtyMap Empty Entity PrimaryKey
  • 50. Dirty Checking! @doanduyhai 50 • Dynamic statement generation UPDATE contacts SET firstname=?, lastname=?,address=? WHERE contact_id=? prepared statements are cached, of course
  • 51. Main API! @doanduyhai 51 manager.insert(entity) manager.update(entity) manager.remove(entity) manager.find(Entity.class, primaryKey)
  • 52. Advanced Features! @doanduyhai 52 Counter Batch mode Strategies (insert, naming) Options Asynchronous
  • 53. Documentation! @doanduyhai 53 Comprehensive Github WIKI Twitter-clone demo app (demo.achilles.io) Versioned documentation (HTML & PDF) JavaDoc
  • 54. RoadMap! @doanduyhai 54 C* 2.1 user defined types (UDT) Query-templates à-la Spring Data Reactive ? (RxJava) ElasticSearch integration (@olivierbourgain)
  • 55. ! " ! Q & R
  • 56. Thank You @doanduyhai duy_hai.doan@datastax.com https://academy.datastax.com/