Channels ▼
RSS

.NET

DataStax Python Driver Now Final


The DataStax Python Driver 1.0.0 for Cassandra is now final after it was initially open sourced in mid 2013. DataStax distributes a commercially supported version of the Apache Cassandra NoSQL database management system. Company software engineer Michaël Figuière says that the team has been working to improve stability and performance of the API.

The now "production ready" driver is part of the firm's plan to provide modern open source Cassandra drivers for major programming languages. Figuière hopes that the DataStax drivers will simplify the work of developers and DBAs when designing applications by bringing a common architecture and a similar interface across languages.

Figuière clarifies that although the Python driver may look similar to drivers for relational databases, it comes with some configurable, per-node connection pools that can grow and shrink automatically to accommodate changing loads. There is also synchronous and asynchronous query execution, query tracing, and metrics providing more insight into query execution, latency, and errors.

As well as SSL and authentication support, there is "thorough logging" based on Python's standard logging module. This version of the Python driver runs on Python 2.6 and 2.7 and (as the driver can be run without any C extensions) PyPy is well supported. Support for Python 3 is planned.

"At its core, the new Python driver utilizes an event loop for handling communication with Cassandra. This event loop may either use the asyncore module in the standard library or libev for improved performance. At a higher level, the driver maintains a small connection pool for each Cassandra node (with special treatment for multi-datacenter environments)," explains Figuière.

From a user-API perspective, you can choose to synchronously block for the query to complete, or you can execute the query asynchronously and either attach callbacks or synchronously block for the final result at any time.

"Cassandra 2.0 added several interesting features for developers, including automatic query paging for large result sets, lightweight transaction support, and the ability to execute prepared statements in batches. The 1.0 release of the Python driver does not support these yet, but the 2.0 release will add support for them," said Figuière.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.
 

Video