whatyouhide

whatyouhide

Elixir Core Team

Xandra – Fast, simple, and robust Cassandra driver

Hey all,

earlier today @lexmag and I released the first version of Xandra, a Cassandra driver built natively in Elixir. We’re very excited and we hope you’re gonna enjoy it!

Andrea and Aleksei

First 7 of 7 Posts Switch mode

lexmag

lexmag

Hi everyone,

Recently we have released new version of the driver that supports clustering.

Right now we use it in all components of the push notification system mentioned in the “The Pursuit of Instant Pushes” article.
Using Xandra resulted in 30% boost in push notification delivery time.

Aleksei and Andrea

whatyouhide

whatyouhide OP

Elixir Core Team

Quick update: we just released v0.4.0 of the driver, which supports retry strategies to retry failed queries. Exciting times!

Andrea and Aleksei

lexmag

lexmag

Since the last update we have released few more versions of the driver (v0.7 is the most recent) with great changes:

  • Support for date, time, smallint, and tinyint types
  • Support for user-defined types
  • Support for authentication
  • Important encoding and decoding optimisations (around 35% speedup)

:rocket:

whatyouhide

whatyouhide OP

Elixir Core Team

Hey folks,

we released version v0.9.0 of Xandra which adds native support for datetime data types and optimizes decoding even more. If you’re interested you can check out the full CHANGELOG.

idi527

idi527

Hi!

Thanks for the library, @whatyouhide @lexmag!

Have you considered using other libraries before writing your own, for example, lpgauth/marina?
Was it a lack of features that made you write your own or maybe something else?

I’m trying to pick a library to use to interface with scylladb, and there are just too many choices …

whatyouhide

whatyouhide OP

Elixir Core Team

Heyo, we used cqerl initially but we were not satisfied with it because of performance, maintainability, documentation, and the poor error messages it kept spitting out. I was not aware of marina personally but I bet @lexmag was, but we went with our own to have 1. a pure Elixir solution 2. based on DBConnection (which in turn means great and extensible pooling) which could 3. be fast, modern, and extensible.

Also, since you’re mentioning scylladb, it would be awesome if you ended up trying Xandra with it and could report if everything works fine. In case you do end up trying them together, please take the time to clone the source code for Xandra and run the Xandra test suite against ScyllaDB :slight_smile: Related: Verify that Scylla works with the driver · Issue #112 · whatyouhide/xandra · GitHub.

lexmag

lexmag

Hey!

We have indeed considered existing libraries before writing our own. Best options were CQErl and marina.

As @whatyouhide said, we went with CQErl to have our project moving forward.
Though its performance was far from desired for our use case, error messages that come from internals did not help, its dependency configuration was extremely painful: Git instead of Hex (we even discovered that one the dependencies changes actual Git ref during Makefile execution—what you see is not what you get). In fact, we end up with a fork.
We could (and were considering to) fix all those aforementioned issues, but that amount of work would mean that we are basically writing a new driver. Also it felt that starting from scratch will be faster to get things done.

Marina seems alright (still Git dependencies though). However it lacks some substantial features, batch queries in our case.

The day we switched to Xandra we got minimum 30% performance improvement and were able to simplify the code around error handling.
Since then Xandra received many optimizations (~35% faster decoding, for example), native support for calendar data types, and streaming functionality out of the box.

— All posts loaded —

Where Next?

Trending in Announcing Top

bluzky
You may know https://ui.shadcn.com/, a UI component library for React. I really love it’s design style and components. I’ve built some co...
387 14960 120
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
shahryarjb
The Chelekom project is a library of Phoenix and LiveView components generated via Mix tasks to fit developer needs seamlessly. One of i...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
quatermain
Hello, I’m sharing my plugin here in forum after some time so it has time to mature and proof yourself. I use Claude Code daily on a pr...
New

Other Trending Topics Top

type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
bjorng
We want to introduce a new native datatype to Erlang: native records. Although replacing all tuple records with native records is not our...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New

We're in Beta

About us Mission Statement