Cqlengine

CQLEngine now using the Python Native Driver

2 min read

I’m happy to announce that cqlengine is now using the Python Native Driver. For the most part, this should be a trivial upgrade. See the notes below on upgrading.

The Good News

  • Significantly less code to maintain in cqlengine itself. We no longer need to maintain connection pools, deal with fail over, dead servers, server discovery, server removal
  • Native driver multiplexes queries over each socket, so less sockets stay open
  • Notifications can be sent back to the client from the server. An example of this is a schema modification or when a new server is added.
  • You can now use the policies for load balancing and failover. See the policies api of the native driver for more information.

Upgrading

If you’re using an earlier version of cqlengine, there are a few caveats to upgrading.

cqlengine cassandra native-driver
Read more

Git Alias For Simplifying Github Pull Requests

1 min read

As cqlengine has picked up in popularity, so has my need to review pull requests. Here’s the git alias that I’m using:

[alias]
    pr = "!f() { git checkout -b pr_$1; curl https://github.com/cqlengine/cqlengine/pull/${1}.patch | git apply -3 - ;  }; f "

To use, you simply git pr 51 or whatever the pull request is.

Here’s what it’s doing:

  1. Creating a branch pr_[pull request number]
  2. Pulling down the patch
  3. Piping the patch to apply. The -3 indicates a 3 way merge. If we don’t use this option and we have conflicts, it just sort of fails.

We could optionally do this in our master branch and eliminate the git checkout portion, then it would simply be a matter of a merge commit & a push to finish things up.

git github cqlengine
Read more