In the summer of 2011, Astyanax, an Apache Cassandra (C*) Java client library was created to easily consume Cassandra, which at the time was in its infancy. Astyanax became so popular that for a good while, it became the de facto java client library for the Apache Cassandra community. Astyanax provides the following features:
- High level, simple, object oriented interface to Cassandra.
- Resilient behavior on the client side.
- Connection pool abstraction. Implementation of a round robin and token-aware connection pool.
- Monitoring abstraction to get event notification from the connection pool.
- Complete encapsulation of the underlying Thrift API and structs.
- Automatic retry of downed hosts.
- Automatic discovery of additional hosts in the cluster.
- Suspension of hosts for a short period of time after several timeouts.
- Annotations to simplify use of composite columns.
Datastax, the enterprise company behind Apache Cassandra, took many of the lessons contained within Astyanax and included them within their official Java Cassandra driver.
When Astyanax was written, the protocol to communicate to Cassandra was Thrift and the API was very low level. Today, Cassandra is mostly consumed via a query language very similar to SQL. This new language is called CQL (Cassandra Query Language). The Cassandra community has also moved beyond the Thrift protocol to the CQL BINARY PROTOCOL.
Thrift will be deprecated in Apache Cassandra in version 4.0. Aside from that deprecation there are also the following reasons to move away from Thrift:
- CQL Binary protocol performs better
- Community development efforts have completely moved to the CQL Binary protocol. The thrift implementation is only in maintenance mode.
- CQL is easier to consume since the API resembles SQL.
Today we are moving Astyanax from an active project in the NetflixOSS ecosystem, into an archived state. This means the project will still be available for public consumption, however, we will not be making any feature enhancements or performance improvements. There are still tens of thousands (if not more) lines of code, within Netflix, that use Astyanax. Moving forward, we will only be fixing Netflix critical bugs as we begin our efforts to refactor our internal systems to use the CQL Binary protocol.
If there are members of the community that would like to have a more hands-on role and maintain the project by becoming a committer, please reach out to me directly.