Enviar búsqueda
Cargar
NYC* Tech Day - New Cassandra Drivers in Depth
•
4 recomendaciones
•
2,743 vistas
Michaël Figuière
Seguir
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 28
Descargar ahora
Descargar para leer sin conexión
Recomendados
Paris Cassandra Meetup - Cassandra for Developers
Paris Cassandra Meetup - Cassandra for Developers
Michaël Figuière
EclipseCon - Building an IDE for Apache Cassandra
EclipseCon - Building an IDE for Apache Cassandra
Michaël Figuière
ChtiJUG - Cassandra 2.0
ChtiJUG - Cassandra 2.0
Michaël Figuière
YaJug - Cassandra for Java Developers
YaJug - Cassandra for Java Developers
Michaël Figuière
Geneva JUG - Cassandra for Java Developers
Geneva JUG - Cassandra for Java Developers
Michaël Figuière
Paris Cassandra Meetup - Overview of New Cassandra Drivers
Paris Cassandra Meetup - Overview of New Cassandra Drivers
Michaël Figuière
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
In-depth caching in Varnish - GOG Varnish Meetup, march 2019
GOG.com dev team
Apache zookeeper 101
Apache zookeeper 101
Quach Tung
Más contenido relacionado
La actualidad más candente
06 response-headers
06 response-headers
snopteck
Hazelcast
Hazelcast
oztalip
How Prometheus Store the Data
How Prometheus Store the Data
Hao Chen
Hazelcast Essentials
Hazelcast Essentials
Rahul Gupta
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
DataStax
Cassandra 3.0 advanced preview
Cassandra 3.0 advanced preview
Patrick McFadin
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
Saurav Haloi
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into Cassandra
Jim Hatcher
Bulk Loading into Cassandra
Bulk Loading into Cassandra
Brian Hess
Spark Cassandra Connector: Past, Present and Furure
Spark Cassandra Connector: Past, Present and Furure
DataStax Academy
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit east
Jorge Lopez-Malla
SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8
Ben Abdallah Helmi
Hazelcast
Hazelcast
Bruno Lellis
Apache Cassandra multi-datacenter essentials
Apache Cassandra multi-datacenter essentials
Julien Anguenot
Meetup cassandra for_java_cql
Meetup cassandra for_java_cql
zznate
Introduction to data modeling with apache cassandra
Introduction to data modeling with apache cassandra
Patrick McFadin
Think Distributed: The Hazelcast Way
Think Distributed: The Hazelcast Way
Rahul Gupta
Understanding DSE Search by Matt Stump
Understanding DSE Search by Matt Stump
DataStax
Apache cassandra v4.0
Apache cassandra v4.0
Yuki Morishita
Storing time series data with Apache Cassandra
Storing time series data with Apache Cassandra
Patrick McFadin
La actualidad más candente
(20)
06 response-headers
06 response-headers
Hazelcast
Hazelcast
How Prometheus Store the Data
How Prometheus Store the Data
Hazelcast Essentials
Hazelcast Essentials
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
DataStax | Data Science with DataStax Enterprise (Brian Hess) | Cassandra Sum...
Cassandra 3.0 advanced preview
Cassandra 3.0 advanced preview
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
Using Spark to Load Oracle Data into Cassandra
Using Spark to Load Oracle Data into Cassandra
Bulk Loading into Cassandra
Bulk Loading into Cassandra
Spark Cassandra Connector: Past, Present and Furure
Spark Cassandra Connector: Past, Present and Furure
Kerberizing spark. Spark Summit east
Kerberizing spark. Spark Summit east
SCWCD : Thread safe servlets : CHAP : 8
SCWCD : Thread safe servlets : CHAP : 8
Hazelcast
Hazelcast
Apache Cassandra multi-datacenter essentials
Apache Cassandra multi-datacenter essentials
Meetup cassandra for_java_cql
Meetup cassandra for_java_cql
Introduction to data modeling with apache cassandra
Introduction to data modeling with apache cassandra
Think Distributed: The Hazelcast Way
Think Distributed: The Hazelcast Way
Understanding DSE Search by Matt Stump
Understanding DSE Search by Matt Stump
Apache cassandra v4.0
Apache cassandra v4.0
Storing time series data with Apache Cassandra
Storing time series data with Apache Cassandra
Similar a NYC* Tech Day - New Cassandra Drivers in Depth
Toronto jaspersoft meetup
Toronto jaspersoft meetup
Patrick McFadin
Oracle 10g Performance: chapter 11 SQL*Net
Oracle 10g Performance: chapter 11 SQL*Net
Kyle Hailey
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Vinay Kumar Chella
OpenStack Summit Portland April 2013 talk - Quantum and EC2
OpenStack Summit Portland April 2013 talk - Quantum and EC2
Naveen Joy
Intro to Kapacitor for Alerting and Anomaly Detection
Intro to Kapacitor for Alerting and Anomaly Detection
InfluxData
Advanced kapacitor
Advanced kapacitor
InfluxData
Scaling DataStax in Docker
Scaling DataStax in Docker
DataStax
Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)
Frazer Clement
GR740 User day
GR740 User day
klepsydratechnologie
DataStax 6 and Beyond
DataStax 6 and Beyond
David Jones-Gilardi
Consolidated shared indexes in real time
Consolidated shared indexes in real time
Jeff Mace
Cisco’s E-Commerce Transformation Using Kafka
Cisco’s E-Commerce Transformation Using Kafka
confluent
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
DataStax Academy
NoSQL Matters 2012 - Real Time Big Data in practice with Cassandra
NoSQL Matters 2012 - Real Time Big Data in practice with Cassandra
Michaël Figuière
Advanced Tools and Techniques for Troubleshooting NetScaler Appliances
Advanced Tools and Techniques for Troubleshooting NetScaler Appliances
David McGeough
The top five questions to ask about NoSQL. JONATHAN ELLIS at Big Data Spain 2012
The top five questions to ask about NoSQL. JONATHAN ELLIS at Big Data Spain 2012
Big Data Spain
Tungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten Replicators
Continuent
Simware and the new SISO LSA
Simware and the new SISO LSA
Simware
OpenStack and OpenFlow Demos
OpenStack and OpenFlow Demos
Brent Salisbury
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
Daniel Cohen
Similar a NYC* Tech Day - New Cassandra Drivers in Depth
(20)
Toronto jaspersoft meetup
Toronto jaspersoft meetup
Oracle 10g Performance: chapter 11 SQL*Net
Oracle 10g Performance: chapter 11 SQL*Net
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
Safer restarts, faster streaming, and better repair, just a glimpse of cassan...
OpenStack Summit Portland April 2013 talk - Quantum and EC2
OpenStack Summit Portland April 2013 talk - Quantum and EC2
Intro to Kapacitor for Alerting and Anomaly Detection
Intro to Kapacitor for Alerting and Anomaly Detection
Advanced kapacitor
Advanced kapacitor
Scaling DataStax in Docker
Scaling DataStax in Docker
Breakthrough performance with MySQL Cluster (2012)
Breakthrough performance with MySQL Cluster (2012)
GR740 User day
GR740 User day
DataStax 6 and Beyond
DataStax 6 and Beyond
Consolidated shared indexes in real time
Consolidated shared indexes in real time
Cisco’s E-Commerce Transformation Using Kafka
Cisco’s E-Commerce Transformation Using Kafka
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
Infosys Ltd: Performance Tuning - A Key to Successful Cassandra Migration
NoSQL Matters 2012 - Real Time Big Data in practice with Cassandra
NoSQL Matters 2012 - Real Time Big Data in practice with Cassandra
Advanced Tools and Techniques for Troubleshooting NetScaler Appliances
Advanced Tools and Techniques for Troubleshooting NetScaler Appliances
The top five questions to ask about NoSQL. JONATHAN ELLIS at Big Data Spain 2012
The top five questions to ask about NoSQL. JONATHAN ELLIS at Big Data Spain 2012
Tungsten University: Setup and Operate Tungsten Replicators
Tungsten University: Setup and Operate Tungsten Replicators
Simware and the new SISO LSA
Simware and the new SISO LSA
OpenStack and OpenFlow Demos
OpenStack and OpenFlow Demos
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
DataStax Enterprise & Apache Cassandra – Essentials for Financial Services – ...
Más de Michaël Figuière
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Michaël Figuière
ApacheCon Europe 2012 - Real Time Big Data in practice with Cassandra
ApacheCon Europe 2012 - Real Time Big Data in practice with Cassandra
Michaël Figuière
GTUG Nantes (Dec 2011) - BigTable et NoSQL
GTUG Nantes (Dec 2011) - BigTable et NoSQL
Michaël Figuière
Duchess France (Nov 2011) - Atelier Apache Mahout
Duchess France (Nov 2011) - Atelier Apache Mahout
Michaël Figuière
JUG Summer Camp (Sep 2011) - Les applications et architectures d’entreprise d...
JUG Summer Camp (Sep 2011) - Les applications et architectures d’entreprise d...
Michaël Figuière
BreizhCamp (Jun 2011) - Haute disponibilité et élasticité avec Cassandra
BreizhCamp (Jun 2011) - Haute disponibilité et élasticité avec Cassandra
Michaël Figuière
Mix-IT (Apr 2011) - Intelligence Collective avec Apache Mahout
Mix-IT (Apr 2011) - Intelligence Collective avec Apache Mahout
Michaël Figuière
Xebia Knowledge Exchange (mars 2011) - Machine Learning with Apache Mahout
Xebia Knowledge Exchange (mars 2011) - Machine Learning with Apache Mahout
Michaël Figuière
Breizh JUG (mar 2011) - NoSQL : Des Grands du Web aux Entreprises
Breizh JUG (mar 2011) - NoSQL : Des Grands du Web aux Entreprises
Michaël Figuière
FOSDEM (feb 2011) - A real-time search engine with Lucene and S4
FOSDEM (feb 2011) - A real-time search engine with Lucene and S4
Michaël Figuière
Xebia Knowledge Exchange (feb 2011) - Large Scale Web Development
Xebia Knowledge Exchange (feb 2011) - Large Scale Web Development
Michaël Figuière
Xebia Knowledge Exchange (jan 2011) - Trends in Enterprise Applications Archi...
Xebia Knowledge Exchange (jan 2011) - Trends in Enterprise Applications Archi...
Michaël Figuière
Lorraine JUG (dec 2010) - NoSQL, des grands du Web aux entreprises
Lorraine JUG (dec 2010) - NoSQL, des grands du Web aux entreprises
Michaël Figuière
Tours JUG (oct 2010) - NoSQL, des grands du Web aux entreprises
Tours JUG (oct 2010) - NoSQL, des grands du Web aux entreprises
Michaël Figuière
Paris JUG (sept 2010) - NoSQL : Des concepts à la réalité
Paris JUG (sept 2010) - NoSQL : Des concepts à la réalité
Michaël Figuière
Xebia Knowledge Exchange (mars 2010) - Lucene : From theory to real world
Xebia Knowledge Exchange (mars 2010) - Lucene : From theory to real world
Michaël Figuière
Xebia Knowledge Exchange (may 2010) - NoSQL : Using the right tool for the ri...
Xebia Knowledge Exchange (may 2010) - NoSQL : Using the right tool for the ri...
Michaël Figuière
Más de Michaël Figuière
(17)
Cassandra summit 2013 - DataStax Java Driver Unleashed!
Cassandra summit 2013 - DataStax Java Driver Unleashed!
ApacheCon Europe 2012 - Real Time Big Data in practice with Cassandra
ApacheCon Europe 2012 - Real Time Big Data in practice with Cassandra
GTUG Nantes (Dec 2011) - BigTable et NoSQL
GTUG Nantes (Dec 2011) - BigTable et NoSQL
Duchess France (Nov 2011) - Atelier Apache Mahout
Duchess France (Nov 2011) - Atelier Apache Mahout
JUG Summer Camp (Sep 2011) - Les applications et architectures d’entreprise d...
JUG Summer Camp (Sep 2011) - Les applications et architectures d’entreprise d...
BreizhCamp (Jun 2011) - Haute disponibilité et élasticité avec Cassandra
BreizhCamp (Jun 2011) - Haute disponibilité et élasticité avec Cassandra
Mix-IT (Apr 2011) - Intelligence Collective avec Apache Mahout
Mix-IT (Apr 2011) - Intelligence Collective avec Apache Mahout
Xebia Knowledge Exchange (mars 2011) - Machine Learning with Apache Mahout
Xebia Knowledge Exchange (mars 2011) - Machine Learning with Apache Mahout
Breizh JUG (mar 2011) - NoSQL : Des Grands du Web aux Entreprises
Breizh JUG (mar 2011) - NoSQL : Des Grands du Web aux Entreprises
FOSDEM (feb 2011) - A real-time search engine with Lucene and S4
FOSDEM (feb 2011) - A real-time search engine with Lucene and S4
Xebia Knowledge Exchange (feb 2011) - Large Scale Web Development
Xebia Knowledge Exchange (feb 2011) - Large Scale Web Development
Xebia Knowledge Exchange (jan 2011) - Trends in Enterprise Applications Archi...
Xebia Knowledge Exchange (jan 2011) - Trends in Enterprise Applications Archi...
Lorraine JUG (dec 2010) - NoSQL, des grands du Web aux entreprises
Lorraine JUG (dec 2010) - NoSQL, des grands du Web aux entreprises
Tours JUG (oct 2010) - NoSQL, des grands du Web aux entreprises
Tours JUG (oct 2010) - NoSQL, des grands du Web aux entreprises
Paris JUG (sept 2010) - NoSQL : Des concepts à la réalité
Paris JUG (sept 2010) - NoSQL : Des concepts à la réalité
Xebia Knowledge Exchange (mars 2010) - Lucene : From theory to real world
Xebia Knowledge Exchange (mars 2010) - Lucene : From theory to real world
Xebia Knowledge Exchange (may 2010) - NoSQL : Using the right tool for the ri...
Xebia Knowledge Exchange (may 2010) - NoSQL : Using the right tool for the ri...
Último
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
Precisely
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
Matsuo Lab
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Will Schroeder
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UbiTrack UK
20230104 - machine vision
20230104 - machine vision
Jamie (Taka) Wang
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
D Cloud Solutions
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
Mahmoud Rabie
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Commit University
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
DianaGray10
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
Asko Soukka
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IES VE
20150722 - AGV
20150722 - AGV
Jamie (Taka) Wang
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
UiPathCommunity
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
Liveplex
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
Daniel Santiago Silva Capera
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
DianaGray10
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
Aggregage
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
David Newbury
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
DianaGray10
Último
(20)
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
20230104 - machine vision
20230104 - machine vision
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
20150722 - AGV
20150722 - AGV
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
NYC* Tech Day - New Cassandra Drivers in Depth
1.
New Cassandra Drivers
in Depth Michaël Figuière @mfiguiere
2.
Speaker
Michaël Figuière @mfiguiere ©2012 DataStax 2
3.
CQL: the new
face of Cassandra • CQL 3 • Simpler Data Model using denormalized Tables • SQL-like query language • Schema definition • CQL Binary Protocol • Introduced in Cassandra 1.2 (CASSANDRA-2478) • Designed for CQL 3 • Opens doors for Streaming, Notifications, ... • Thrift will keep being supported by Cassandra ©2012 DataStax 3
4.
CQL3 Denormalized Model
CQL3 Query Language comes with a new Data Model abstraction made of denormalized, statically defined tables Data duplicated over several tables ©2012 DataStax 4
5.
CQL3 Data Model
Timeline Table user_id tweet_id author body gmason 1735 phenry Give me liberty or give me death gmason 1742 gwashington I chopped down the cherry tree ahamilton 1767 jadams A government of laws, not men ahamilton 1794 gwashington I chopped down the cherry tree Partition Clustering Key Key ©2012 DataStax 5
6.
CQL3 Data Model
Timeline Table user_id tweet_id author body gmason 1735 phenry Give me liberty or give me death gmason 1742 gwashington I chopped down the cherry tree ahamilton 1767 jadams A government of laws, not men ahamilton 1794 gwashington I chopped down the cherry tree CQL CREATE TABLE timeline ( user_id varchar, tweet_id timeuuid, author varchar, body varchar, PRIMARY KEY (user_id, tweet_id)); ©2012 DataStax 6
7.
CQL3 Data Model
Timeline Table user_id tweet_id author body gmason 1735 phenry Give me liberty or give me death gmason 1742 gwashington I chopped down the cherry tree ahamilton 1767 jadams A government of laws, not men ahamilton 1794 gwashington I chopped down the cherry tree Timeline Physical Layout [1735, author] [1735, body] [1742, author] [1742, body] gmason gwashington I chopped down the... phenry Give me liberty or give... [1767, author] [1767, body] [1794, author] [1794, body] ahamilton gwashington I chopped down the... jadams A government of laws... ©2012 DataStax 7
8.
Current Drivers Architecture
CQL API Thrift API OO API DB API Thrift RPC Thrift RPC Client Library CQL Driver * This is a simplified view of drivers architecture. Details vary from one language to another. ©2012 DataStax 8
9.
New Drivers Architecture
DB API CQL API OO API CQL Native Protocol Next Generation Driver * This is a simplified view of drivers architecture. Details vary from one language to another. ©2012 DataStax 9
10.
DataStax Java Driver
• Reference Implementation • Asynchronous architecture based on Netty • Prepared Statements Support • Automatic Fail-over • Node Discovery • Cassandra Tracing Support • Tunable policies • LoadBalancingPolicy • ReconnectionPolicy • ©2012 DataStax RetryPolicy 10
11.
Request Pipelining
Client Cassandra Without Request Pipelining With Client Cassandra Request Pipelining ©2012 DataStax 11
12.
Notifications
Node Client Node Node Without Notifications With Notifications Node Client Node Node ©2012 DataStax 12
13.
Asynchronous Architecture
Node Client Thread Node Client Driver Thread Node Client Thread Node ©2012 DataStax 13
14.
Asynchronous Architecture
Node Client Thread 6 1 Node Client Driver 2 Thread 3 Node 5 4 Client Thread Node ©2012 DataStax 14
15.
LoadBalancingPolicy
public interface LoadBalancingPolicy { HostDistance distance(Host host); Iterator<Host> newQueryPlan(Query query); [...] } ©2012 DataStax 15
16.
DCAwareRoundRobinPolicy
Datacenter A Local nodes are queried first, if non Client Node are available, the request will be sent Client Node to a remote node. Node Client Client Node Client Node Node Client Datacenter B ©2012 DataStax 16
17.
TokenAwarePolicy
Nodes that own a Replica of the data being read or written by the query will be contacted first. Replica Node Node Client Replica Node Node Replica Node ©2012 DataStax 17
18.
RetryPolicy public interface RetryPolicy
{ RetryDecision onReadTimeout(Query query, ConsistencyLevel cl, [...] ); RetryDecision onWriteTimeout(Query query, ConsistencyLevel cl, [...] ); RetryDecision onUnavailable(Query query, ConsistencyLevel cl, [...] ); public static class RetryDecision { public static enum Type { RETRY, RETHROW, IGNORE }; private final Type type; private final ConsistencyLevel retryCL; [...] } } ©2012 DataStax 18
19.
Downgrading Consistency
If the requested Consistency Level cannot be reached (QUORUM here), a second request with a lower CL is sent automatically. Node Replica Client Node Replica Node Replica ©2012 DataStax 19
20.
Connect and Write
Cluster cluster = Cluster.builder() .addContactPoints("10.0.0.1", "10.0.0.2") .build(); Session session = cluster.connect("myKeyspace"); session.execute( "INSERT INTO user (user_id, name, email) VALUES (12345, 'johndoe', 'john@doe.com')" ); ©2012 DataStax 20
21.
Read
ResultSet rs = session.execute("SELECT * FROM test"); List<Row> rows = rs.all(); for (Row row : rows) { String userId = row.getString("user_id"); String name = row.getString("name"); String email = row.getString("email"); } ©2012 DataStax 21
22.
Asynchronous Read
ResultSetFuture future = session.executeAsync("SELECT * FROM test"); for (Row row : future.get()) { String userId = row.getString("user_id"); String name = row.getString("name"); String email = row.getString("email"); } ©2012 DataStax 22
23.
Prepared Statements
PreparedStatement ps = session.prepare("SELECT * FROM users WHERE id = ?"); BoundStatement bs = session.execute(ps.bind("123")).one().getInt("age"); bs.setString("k"); int age = session.execute(bs).one().getInt("age"); age = session.execute(ps.bind("123")).one().getInt("age"); ©2012 DataStax 23
24.
Query Builder
String query = "SELECT a,b,"C" FROM foo WHERE a IN (127.0.0.1,127.0.0.3) AND "C"='foo' ORDER BY a ASC,b DESC LIMIT 42;"; Query select = select("a", "b", quote("C")).from("foo") .where(in("a", InetAddress.getByName("127.0.0.1"), InetAddress.getByName("127.0.0.3"))) .and(eq(quote("C"), "foo")) .orderBy(asc("a"), desc("b")) .limit(42); ©2012 DataStax 24
25.
Object Mapping
@Table(name = "user") public class User { public enum Gender { @PartitionKey @EnumValue("m") @Column(name = "user_id") MALE, private String userId; @EnumValue("f") private String name; FEMALE; } private String email; private Gender gender; } ©2012 DataStax 25
26.
Inheritance @Table(name = "catalog") @Inheritance(
@InheritanceValue("tv") subClasses = {Phone.class, TV.class}, public class TV column = "product_type" extends Product { ) public abstract class Product { private float size; } @Column(name = "product_id") private String productId; private float price; private String vendor; private String model; } ©2012 DataStax 26
27.
Betas now available!
https://github.com/datastax/
28.
Stay Tuned!
blog.datastax.com @mfiguiere
Descargar ahora