whatyouhide/xandra
63.1
Adequate · 3 October 2026
10.3k
lines of production code
Elixir
primary language
2
measurements over time
What this system is
Xandra is a Cassandra and ScyllaDB database driver for Elixir that manages connections, clustering, and query execution. It supports native protocol versions 3 through 5, offering features like token-aware routing, ScyllaDB shard awareness, and multiple load-balancing policies. The system handles authentication, compression, and prepared statement caching while integrating with Elixir's Telemetry ecosystem for observability.
How it got here
2016 — Initial project scaffolding and core driver implementation
8 changes.
This period established the foundational structure of the Xandra project, including initial documentation, configuration, and test infrastructure. It introduced the core Cassandra driver with native protocol v5 support, custom connection management, and ScyllaDB shard-aware pooling, replacing external dependencies like db\_connection with internal implementations.
2017–2023 — Cluster support and protocol v5
9 changes.
This period focused on expanding Xandra from a single-node client to a full cluster-aware library, introducing token-aware routing, ScyllaDB shard awareness, and multiple load-balancing policies. Significant backend work included refactoring the protocol layer to support native protocol v5, adding prepared query caching, and implementing password authentication. These features were underpinned by extensive integration testing infrastructure and comprehensive documentation updates.
Features
Added prepared query cache
A new ETS-based cache for prepared queries has been introduced to store and retrieve prepared statement metadata (such as IDs, bound columns, and partition key indices) keyed by statement and keyspace, reducing the need to re-prepare identical queries.
lib/xandra/prepared · high confidence
Extracts connection utilities and adds ScyllaDB shard awareness support
The library now includes a new \Xandra.Connection.Utils\ module that centralizes low-level connection logic, including frame reception, protocol negotiation options, and connection startup. This refactor introduces explicit support for ScyllaDB shard awareness by parsing sharding information from the server's SUPPORTED message, enabling clients to connect to specific shards. The module also handles authentication challenges and integrates telemetry events for debugging frame sends and receives.
lib/xandra/connection · high confidence
Initial project scaffolding and documentation
This change establishes the foundational structure for the Xandra project. It adds essential configuration files including \.formatter.exs\ for code formatting, \.dialyzer\_ignore.exs\ for static analysis, and \coveralls.json\ for test coverage reporting. It also introduces \docker-compose.yml\ to facilitate local testing with Cassandra and ScyllaDB instances, along with a \.gitignore\ to exclude build artifacts. The repository is populated with initial documentation files such as \README.md\, \CHANGELOG.md\, \CONTRIBUTING.md\, and \LICENSE\, providing users with installation instructions, feature overviews, and contribution guidelines.
(repo-wide) · high confidence
Initial release of Xandra Cassandra driver
This change introduces the Xandra library, a new Cassandra database driver for Elixir. It provides core modules for managing connections (\Xandra\), clustering with auto-discovery and load balancing (\Xandra.Cluster\), and executing queries including batches and prepared statements. The driver supports native protocol v5, compression (LZ4/Snappy), authentication (including challenge-based flows), and integrates with the Telemetry ecosystem for observability.
lib/xandra · high confidence
Introduce cluster support with token-aware routing and ScyllaDB shard awareness
Xandra now supports connecting to a cluster of nodes rather than a single host. This change introduces a new internal cluster implementation that includes a control connection to monitor node status and refresh topology, a connection pool per node, and a load-balancing policy framework. Key features include token-aware routing, which uses Murmur3 hashing to direct queries to the correct node based on partition keys, and ScyllaDB shard awareness, which allows connections to be routed to specific shards for improved performance. The cluster automatically discovers nodes, handles node up/down events, and manages reconnections.
lib/xandra/cluster · high confidence
New datacenter-aware and random load-balancing policies
Xandra now includes two new load-balancing policies for cluster connections. The \DCAwareRoundRobin\ policy routes queries to hosts in a specified local data center first, falling back to remote hosts, using a round-robin strategy within each group. The \Random\ policy selects available hosts at random without considering data center topology. Both policies are available since version 0.15.0.
_lib/xandra/cluster/load\_balancing\policy · high confidence
New documentation pages for compatibility, data types, and telemetry
Added three new documentation pages to clarify library usage: a Compatibility page detailing support for Cassandra 3.x/4.x, native protocol versions v3-v5, and ScyllaDB 2.3-5.x; a Data Types Comparison Table mapping Cassandra types to Elixir types (including \duration\ support); and a generated Telemetry Events page documenting connection and query events with their measurements and metadata.
pages · high confidence
Support for Cassandra Password Authentication
Users can now authenticate with Cassandra servers using the PasswordAuthenticator mechanism. A new \Xandra.Authenticator.Password\ module has been added, allowing connections to be established by providing a username and password in the connection options.
lib/xandra/authenticator · high confidence
Removals
Removed default application configuration file
The default configuration file (config/config.exs) has been removed from the project. This file previously provided the base configuration structure for the application and its dependencies using Mix.Config. Users relying on this default file for initial setup or default values will need to adjust their configuration strategy, potentially moving defaults to mix.exs or providing their own configuration files.
config · high confidence
Behavioural changes
Refactored protocol implementation and added native protocol v5 support
The protocol logic has been extracted into a shared \Xandra.Protocol\ module, introducing a \CRC\ helper for frame integrity checks and a macro-based decoder for Cassandra native types. This refactor enables support for native protocol versions 4 and 5, which now allow passing custom payloads in query and batch requests. Protocol v5 specifically introduces a 32-bit flag field and includes the result metadata ID in execute frames, while v4 adds custom payload support to prepare and execute frames.
lib/xandra/protocol · high confidence
Removal of db\_connection dependency and introduction of ScyllaDB shard-aware connection pooling
The library has removed its dependency on the \db\_connection\ library, replacing it with a custom connection management implementation to better fit the Cassandra protocol. This architectural shift introduces a new \Xandra.Cluster.ConnectionPool.ShardManager\ that enables ScyllaDB shard-awareness, allowing connections to be routed to specific shards for improved performance. Additionally, the new architecture supports concurrent requests per connection and handles connection lifecycle and sharding information tracking internally.
lib · high confidence
Test coverage
Added Docker test infrastructure for Cassandra and ScyllaDB; Added comprehensive test coverage for Xandra cluster and protocol components; Added initial test suite and test infrastructure for Xandra; Expanded integration test coverage for Xandra features; New test support infrastructure for integration testing.
Dependencies
Upgrade to Elixir 1.17 and modernize dependencies
The project now requires Elixir 1.17 and has updated its dependency tree, notably removing the \db\_connection\ dependency in favor of direct concurrent request handling. The \mix.exs\ file has been significantly expanded to include comprehensive configuration for Dialyzer, ExCoveralls, and Hex packaging, alongside new test aliases for running Cassandra and ScyllaDB tests across multiple native protocol versions.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 67 → 63 (-4.3)
- Rubric changed (rubric-2026.09.15 → rubric-2026.10.1) — scores are not directly comparable.
Lenses
- Code Health 93 → 93 (+0.0)
- Architecture 92 → 85 (-6.5)
- Maturity 52 → 45 (-7.2)
- Readiness 77 → 73 (-3.0)
- Security 79 → 82 (+3.0)
Resolved (6)
- Duplicated block (10 lines × 2) (lib/xandra/protocol/v4.ex)
- Duplicated block (12 lines × 3) (lib/xandra/protocol/v3.ex)
- Duplicated block (5 lines × 3) (lib/xandra/protocol/v3.ex)
- Duplicated block (7 lines × 2) (lib/xandra/protocol/v4.ex)
- Duplicated block (9 lines × 3) (lib/xandra/protocol/v3.ex)
- Off-boarding risk: anonymized user #1
New (8)
- Documentation: no architecture or design documentation (README.md)
- Duplicated block (10 lines × 3) (lib/xandra/protocol/v3.ex)
- Duplicated block (11 lines × 2) (lib/xandra/protocol/v4.ex)
- Duplicated block (13 lines × 3) (lib/xandra/protocol/v3.ex)
- Duplicated block (7 lines × 3) (lib/xandra/protocol/v3.ex)
- Duplicated block (8 lines × 2) (lib/xandra/protocol/v4.ex)
- Off-boarding risk: anonymized user #1
- Projects may be oversized for their cohesion
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
whatyouhide/xandra was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 3 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b512e0e5993fd2b11c616fdb42e1452c215ccb0c — the exact code this score is about.
- Scored under rubric-2026.10.1 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-8fe32cd45d00.