SlideShare une entreprise Scribd logo
1  sur  29
Cassandra Native
Protocol Drivers

Tyler Hobbs, C* and C* driver engineer
About Me
CHART TITLE GOES HERE
Thrift drivers: pycassa, phpcassa,
telephus, and others
DataStax python driver (native
protocol)
Cassandra Engineer
Thrift Drivers
CHART TITLE GOES HERE
RPC Framework, machine generated
Thrift Drivers
Problems?
● Backwards & forwards compatibility
● Too many connections
● No standard interface
● Thrift overhead
● Cluster state must be polled
Problems & Solutions
Backwards/Forwards Compatibility
● Possible with Thrift, but easier with a
query language (CQL)
● Separately versioned query language
and protocol
Problems & Solutions
Too Many Connections
Operation pipelining with the native
protocol
Problems & Solutions
Operation Pipelining
● 127 in-flight ops per connection
● Improves throughput (not latency)
● Out-of-order processing
● Async, event-loop driven
Problems & Solutions
No Standard Interface
● Query language
● Standard policies for load balancing,
connection management, and
retries/failure handling
● More similar to standard RDMBS drivers
Problems & Solutions
Thrift Overhead
Custom protocol, prepared statements
Problems & Solutions
Cluster State Must be Polled
“Control connection,” register for
pushed notifications
New Driver API
Sync/Async Operations

result = session.execute(“SELECT * FROM foo”)
New Driver API
Sync/Async Operations
future = session.execute_async(“SELECT * FROM foo”)
…
result = future.result()
New Driver API
Sync/Async Operations
session.execute_async(query).add_callbacks(
    callback=process_data,
    errback=log_error
)
New Driver Architecture
Connection Pooling

● Min/max conns per remote, local nodes
● Use least busy conn
● Open and close conns as needed
New Driver Architecture
What happens during Operations?
● Nodes to query are picked by
LoadBalancingPolicy
● Failures are handled by RetryPolicy
● On errors, nodes are marked down by
ConvictionPolicy
New Driver Architecture
Load Balancing Policies
● RoundRobin
● DcAwareRoundRobin
● TokenAware wrapper
● Custom
New Driver Architecture
What happens during Operations?
● Nodes to query are picked by
LoadBalancingPolicy
● Failures are handled by RetryPolicy
● On errors, nodes are marked down by
ConvictionPolicy
New Driver Architecture
Retry Policies
● Operation type
● Consistency level
● Number (and type) of responses
● Type of failure
● Retry, raise error, or ignore error
New Driver Architecture
What happens during Operations?
● Nodes to query are picked by
LoadBalancingPolicy
● Failures are handled by RetryPolicy
● On errors, nodes are marked down by
ConvictionPolicy, reconnect with
ReconnectionPolicy
New Driver Architecture
Reconnection Policy
● Schedule for attempting reconnects to
down nodes
● Constant and Exponential backoff
New Driver Architecture
Policy Defaults
● RoundRobin load balancing (not token
or DC aware)
● Retry at most once (in a small number
of cases)
● Mark node down after one failure
● Exponential backoff on reconnection
attempts
New Driver Architecture
Prepared Statements
● Prepared against all nodes
● Cache
● Re-preparation

prepared = session.prepare(“SELECT foo FROM bar WHERE id=?”)
result = session.execute(prepared, [user_id1])
New Driver Architecture
Control Connection
● Listens for pushed updates to cluster
state and schema
● Marks nodes up and down
● Auto discovers nodes in cluster
● Updates schema metadata
New Driver Architecture
Metrics
● Count timeouts, connection errors, and
other errors
● Open connection stats
● Operation latency histogram
New Driver Architecture
Cursors
● No more manual paging over large
queries
● Works across multiple nodes
●

Paging state provided by client
New Driver Architecture
Quick Python Benchmark
● 3 nodes (local, ccm), one conn per host
● 50k individual inserts, single threaded
● Pycassa: ~1200 ops/sec
● DataStax python driver (sync,
blocking): ~950 ops/sec
● DataStax python driver (future
batching): ~3000 ops/sec
● DataStax python driver (callback
chaining): ~7300 ops/sec
New Driver Architecture
Languages Supported
● Java – 1.0 released
●

in Spring 2013

Simple object mapper under
development

● C# - 1.0 released in Summer 2013
●

LINQ integration

● Python – Beta since Summer 2013, 1.0
coming soon
●

Basic mapper available through
cqlengine

● C++ - Currently in Alpha state
● Ruby, JS, PHP – planned, but no
development so far
New Driver Architecture
Languages Supported
github.com/datastax
Questions?
@tylhobbs
thobbs on #cassandra, #datastaxdrivers

Contenu connexe

Tendances

SAP LVM Integration with SAP BPA
SAP LVM Integration with SAP BPASAP LVM Integration with SAP BPA
SAP LVM Integration with SAP BPAAliter Consulting
 
Net flix embracingfailure re-invent2014-141113085858-conversion-gate02
Net flix embracingfailure re-invent2014-141113085858-conversion-gate02Net flix embracingfailure re-invent2014-141113085858-conversion-gate02
Net flix embracingfailure re-invent2014-141113085858-conversion-gate02~Eric Principe
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon
 
Geode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil BawaskarGeode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil BawaskarPivotalOpenSourceHub
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecturehbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architectureHBaseCon
 
Hermes Reliable Replication Protocol - Poster
Hermes Reliable Replication Protocol - Poster Hermes Reliable Replication Protocol - Poster
Hermes Reliable Replication Protocol - Poster Antonios Katsarakis
 
ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...
ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...
ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...Cask Data
 
Flink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache Flink
Flink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache FlinkFlink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache Flink
Flink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache FlinkFlink Forward
 
Inside Dolphin Test Infrastructure
Inside Dolphin Test InfrastructureInside Dolphin Test Infrastructure
Inside Dolphin Test InfrastructureTao Jiang
 
Training Slides: 102 - Basics - Tungsten Replicator - How We Move Your Data
Training Slides: 102 - Basics - Tungsten Replicator - How We Move Your DataTraining Slides: 102 - Basics - Tungsten Replicator - How We Move Your Data
Training Slides: 102 - Basics - Tungsten Replicator - How We Move Your DataContinuent
 
Akka HTTP with Scala
Akka HTTP with ScalaAkka HTTP with Scala
Akka HTTP with ScalaKnoldus Inc.
 
ChinaNetCloud Training - iptables Intro
ChinaNetCloud Training - iptables IntroChinaNetCloud Training - iptables Intro
ChinaNetCloud Training - iptables IntroChinaNetCloud
 

Tendances (19)

SAP LVM Integration with SAP BPA
SAP LVM Integration with SAP BPASAP LVM Integration with SAP BPA
SAP LVM Integration with SAP BPA
 
Thomson Reuters
Thomson ReutersThomson Reuters
Thomson Reuters
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
Net flix embracingfailure re-invent2014-141113085858-conversion-gate02
Net flix embracingfailure re-invent2014-141113085858-conversion-gate02Net flix embracingfailure re-invent2014-141113085858-conversion-gate02
Net flix embracingfailure re-invent2014-141113085858-conversion-gate02
 
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in PinterestHBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
HBaseCon2017 Removable singularity: a story of HBase upgrade in Pinterest
 
Geode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil BawaskarGeode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil Bawaskar
 
hbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecturehbaseconasia2017: Large scale data near-line loading method and architecture
hbaseconasia2017: Large scale data near-line loading method and architecture
 
Hermes Reliable Replication Protocol - Poster
Hermes Reliable Replication Protocol - Poster Hermes Reliable Replication Protocol - Poster
Hermes Reliable Replication Protocol - Poster
 
Advanced LB
Advanced LBAdvanced LB
Advanced LB
 
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
Javantura v6 - On the Aspects of Polyglot Programming and Memory Management i...
 
SAP Post Copy Automation
SAP Post Copy AutomationSAP Post Copy Automation
SAP Post Copy Automation
 
ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...
ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...
ACID Transactions in Apache Phoenix with Apache Tephra™ (incubating), by Poor...
 
EVCache Builderscon
EVCache BuildersconEVCache Builderscon
EVCache Builderscon
 
Flink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache Flink
Flink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache FlinkFlink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache Flink
Flink Forward Berlin 2017: Tzu-Li (Gordon) Tai - Managing State in Apache Flink
 
Inside Dolphin Test Infrastructure
Inside Dolphin Test InfrastructureInside Dolphin Test Infrastructure
Inside Dolphin Test Infrastructure
 
Training Slides: 102 - Basics - Tungsten Replicator - How We Move Your Data
Training Slides: 102 - Basics - Tungsten Replicator - How We Move Your DataTraining Slides: 102 - Basics - Tungsten Replicator - How We Move Your Data
Training Slides: 102 - Basics - Tungsten Replicator - How We Move Your Data
 
Akka HTTP with Scala
Akka HTTP with ScalaAkka HTTP with Scala
Akka HTTP with Scala
 
Caap presentation by me
Caap presentation by meCaap presentation by me
Caap presentation by me
 
ChinaNetCloud Training - iptables Intro
ChinaNetCloud Training - iptables IntroChinaNetCloud Training - iptables Intro
ChinaNetCloud Training - iptables Intro
 

Similaire à Cassandra drivers

Scaling Magento
Scaling MagentoScaling Magento
Scaling MagentoCopious
 
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)Apache Apex
 
Prelim Slides
Prelim SlidesPrelim Slides
Prelim Slidessmpant
 
Optimizing Python
Optimizing PythonOptimizing Python
Optimizing PythonAdimianBE
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownScyllaDB
 
DrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every TimeDrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every TimePantheon
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-ExpressDVClub
 
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBasehbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBaseMichael Stack
 
Simplified Troubleshooting through API Scripting
Simplified Troubleshooting through API Scripting Simplified Troubleshooting through API Scripting
Simplified Troubleshooting through API Scripting Network Automation Forum
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...Linaro
 
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLinaro
 
Informix HA Best Practices
Informix HA Best Practices Informix HA Best Practices
Informix HA Best Practices Scott Lashley
 
Always on high availability best practices for informix
Always on high availability best practices for informixAlways on high availability best practices for informix
Always on high availability best practices for informixIBM_Info_Management
 
Adaptive indexing throttling
Adaptive indexing throttling Adaptive indexing throttling
Adaptive indexing throttling Arpit Jain
 
Performance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovPerformance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovValeriia Maliarenko
 
Shared Database Concurrency
Shared Database ConcurrencyShared Database Concurrency
Shared Database ConcurrencyAivars Kalvans
 

Similaire à Cassandra drivers (20)

Scaling Magento
Scaling MagentoScaling Magento
Scaling Magento
 
Optimizing Linux Servers
Optimizing Linux ServersOptimizing Linux Servers
Optimizing Linux Servers
 
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)
 
Prelim Slides
Prelim SlidesPrelim Slides
Prelim Slides
 
Optimizing Python
Optimizing PythonOptimizing Python
Optimizing Python
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance Showdown
 
DrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every TimeDrupalCon 2014: A Perfect Launch, Every Time
DrupalCon 2014: A Perfect Launch, Every Time
 
Verification Strategy for PCI-Express
Verification Strategy for PCI-ExpressVerification Strategy for PCI-Express
Verification Strategy for PCI-Express
 
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBasehbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
hbaseconasia2019 Test-suite for Automating Data-consistency checks on HBase
 
Balancing Power & Performance Webinar
Balancing Power & Performance WebinarBalancing Power & Performance Webinar
Balancing Power & Performance Webinar
 
Simplified Troubleshooting through API Scripting
Simplified Troubleshooting through API Scripting Simplified Troubleshooting through API Scripting
Simplified Troubleshooting through API Scripting
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 
LCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at LinaroLCE13: Test and Validation Summit: The future of testing at Linaro
LCE13: Test and Validation Summit: The future of testing at Linaro
 
Performance Whackamole (short version)
Performance Whackamole (short version)Performance Whackamole (short version)
Performance Whackamole (short version)
 
Informix HA Best Practices
Informix HA Best Practices Informix HA Best Practices
Informix HA Best Practices
 
Always on high availability best practices for informix
Always on high availability best practices for informixAlways on high availability best practices for informix
Always on high availability best practices for informix
 
R12.2 dba
R12.2 dbaR12.2 dba
R12.2 dba
 
Adaptive indexing throttling
Adaptive indexing throttling Adaptive indexing throttling
Adaptive indexing throttling
 
Performance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei RadovPerformance testing in scope of migration to cloud by Serghei Radov
Performance testing in scope of migration to cloud by Serghei Radov
 
Shared Database Concurrency
Shared Database ConcurrencyShared Database Concurrency
Shared Database Concurrency
 

Dernier

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
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
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Dernier (20)

Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
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
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

Cassandra drivers

  • 1. Cassandra Native Protocol Drivers Tyler Hobbs, C* and C* driver engineer
  • 2. About Me CHART TITLE GOES HERE Thrift drivers: pycassa, phpcassa, telephus, and others DataStax python driver (native protocol) Cassandra Engineer
  • 3. Thrift Drivers CHART TITLE GOES HERE RPC Framework, machine generated
  • 4. Thrift Drivers Problems? ● Backwards & forwards compatibility ● Too many connections ● No standard interface ● Thrift overhead ● Cluster state must be polled
  • 5. Problems & Solutions Backwards/Forwards Compatibility ● Possible with Thrift, but easier with a query language (CQL) ● Separately versioned query language and protocol
  • 6. Problems & Solutions Too Many Connections Operation pipelining with the native protocol
  • 7. Problems & Solutions Operation Pipelining ● 127 in-flight ops per connection ● Improves throughput (not latency) ● Out-of-order processing ● Async, event-loop driven
  • 8. Problems & Solutions No Standard Interface ● Query language ● Standard policies for load balancing, connection management, and retries/failure handling ● More similar to standard RDMBS drivers
  • 9. Problems & Solutions Thrift Overhead Custom protocol, prepared statements
  • 10. Problems & Solutions Cluster State Must be Polled “Control connection,” register for pushed notifications
  • 11. New Driver API Sync/Async Operations result = session.execute(“SELECT * FROM foo”)
  • 12. New Driver API Sync/Async Operations future = session.execute_async(“SELECT * FROM foo”) … result = future.result()
  • 13. New Driver API Sync/Async Operations session.execute_async(query).add_callbacks(     callback=process_data,     errback=log_error )
  • 14. New Driver Architecture Connection Pooling ● Min/max conns per remote, local nodes ● Use least busy conn ● Open and close conns as needed
  • 15. New Driver Architecture What happens during Operations? ● Nodes to query are picked by LoadBalancingPolicy ● Failures are handled by RetryPolicy ● On errors, nodes are marked down by ConvictionPolicy
  • 16. New Driver Architecture Load Balancing Policies ● RoundRobin ● DcAwareRoundRobin ● TokenAware wrapper ● Custom
  • 17. New Driver Architecture What happens during Operations? ● Nodes to query are picked by LoadBalancingPolicy ● Failures are handled by RetryPolicy ● On errors, nodes are marked down by ConvictionPolicy
  • 18. New Driver Architecture Retry Policies ● Operation type ● Consistency level ● Number (and type) of responses ● Type of failure ● Retry, raise error, or ignore error
  • 19. New Driver Architecture What happens during Operations? ● Nodes to query are picked by LoadBalancingPolicy ● Failures are handled by RetryPolicy ● On errors, nodes are marked down by ConvictionPolicy, reconnect with ReconnectionPolicy
  • 20. New Driver Architecture Reconnection Policy ● Schedule for attempting reconnects to down nodes ● Constant and Exponential backoff
  • 21. New Driver Architecture Policy Defaults ● RoundRobin load balancing (not token or DC aware) ● Retry at most once (in a small number of cases) ● Mark node down after one failure ● Exponential backoff on reconnection attempts
  • 22. New Driver Architecture Prepared Statements ● Prepared against all nodes ● Cache ● Re-preparation prepared = session.prepare(“SELECT foo FROM bar WHERE id=?”) result = session.execute(prepared, [user_id1])
  • 23. New Driver Architecture Control Connection ● Listens for pushed updates to cluster state and schema ● Marks nodes up and down ● Auto discovers nodes in cluster ● Updates schema metadata
  • 24. New Driver Architecture Metrics ● Count timeouts, connection errors, and other errors ● Open connection stats ● Operation latency histogram
  • 25. New Driver Architecture Cursors ● No more manual paging over large queries ● Works across multiple nodes ● Paging state provided by client
  • 26. New Driver Architecture Quick Python Benchmark ● 3 nodes (local, ccm), one conn per host ● 50k individual inserts, single threaded ● Pycassa: ~1200 ops/sec ● DataStax python driver (sync, blocking): ~950 ops/sec ● DataStax python driver (future batching): ~3000 ops/sec ● DataStax python driver (callback chaining): ~7300 ops/sec
  • 27. New Driver Architecture Languages Supported ● Java – 1.0 released ● in Spring 2013 Simple object mapper under development ● C# - 1.0 released in Summer 2013 ● LINQ integration ● Python – Beta since Summer 2013, 1.0 coming soon ● Basic mapper available through cqlengine ● C++ - Currently in Alpha state ● Ruby, JS, PHP – planned, but no development so far
  • 28. New Driver Architecture Languages Supported github.com/datastax

Notes de l'éditeur

  1. Maintainer of pycassa, phpcassa, and telephus. I've also worked on Hector and clj-hector a bit. The Datastax python driver was originally ported from the DataStax Java driver.