Illustration Image

1/16/2025

Reading time:1

GitHub - pmcfadin/awesome-accord: Repository of all kinds of things to help you get up and running with ACID transactions on Apache Cassandra®

logo

This resource is based on an article originally published here.

Welcome to the Awesome Accord repository! This guide provides resources and examples for implementing ACID transactions in Apache Cassandra. Learn how to leverage distributed transactions for building reliable applications.

  • Quick Start with Docker: Single-node deployment for immediate testing
  • Lab Environment: Multi-node cluster setup for development
  • Use Cases & Examples: Production-ready implementations
  • Learning Resources: Documentation and best practices

Accord is in active development and still a feature branch in the Apasche Cassandra® Repo. You will find bug. What we ask is that you help with a contribution of a bug report.

You can use the Github discussions bug report forum for this or use the Planet Cassandra Discord channel for accord listed below. A bug report should have the folowing:

  • The data model used
  • Actions to reproduce the bug
  • Full stack trace from system.log

If you have suggestions about syntax or improving the overall developer expirience, we want to hear about that to! Add it as a suggestion or feature request using Github discussions or let us know in the Planet Cassandra Discord.

Now, on to the fun!

docker pull pmcfadin/cassandra-accord
docker run -d --name cassandra-accord -p 9042:9042 pmcfadin/cassandra-accord
brew tap rustyrazorblade/rustyrazorblade
brew install easy-cass-lab
  • Banking Transactions: Account transfers with ACID guarantees
  • Inventory Management: Race-free inventory tracking
  • User Management: Multi-table atomic operations
/
├── docker/              # Docker configuration and setup
├── easy-cass-lab/      # Multi-node testing environment
├── examples/           # Implementation examples
│   ├── banking/       # Financial transaction examples
│   ├── inventory/     # Stock management examples
│   └── user-mgmt/     # User operations examples
└── docs/              # Guides and documentation

Our documentation includes:

  • Comprehensive setup instructions
  • Transaction patterns and implementations
  • Performance optimization guides
  • Troubleshooting and best practices
  1. Choose your deployment option:
  2. Follow the Quick Start Guide
  3. Explore example implementations
  4. Connect with our Discord community
  5. Feedback! Github Discussions
BEGIN TRANSACTION
    LET fromBalance = (SELECT account_balance 
                      FROM ks.accounts 
                      WHERE account_holder='alice');
    IF fromBalance.account_balance >= 20 THEN
        UPDATE ks.accounts 
        SET account_balance -= 20 
        WHERE account_holder='alice';
        UPDATE ks.accounts 
        SET account_balance += 20 
        WHERE account_holder='bob';
    END IF
COMMIT TRANSACTION;

Apache License 2.0

Related Articles

logo
mongo
nocode
elasticsearch

Explore Further

acid

open.source

cassandra

Become part of our
growing community!
Welcome to Planet Cassandra, a community for Apache Cassandra®! We're a passionate and dedicated group of users, developers, and enthusiasts who are working together to make Cassandra the best it can be. Whether you're just getting started with Cassandra or you're an experienced user, there's a place for you in our community.
A dinosaur
Planet Cassandra is a service for the Apache Cassandra® user community to share with each other. From tutorials and guides, to discussions and updates, we're here to help you get the most out of Cassandra. Connect with us and become part of our growing community today.
© 2009-2023 The Apache Software Foundation under the terms of the Apache License 2.0. Apache, the Apache feather logo, Apache Cassandra, Cassandra, and the Cassandra logo, are either registered trademarks or trademarks of The Apache Software Foundation. Sponsored by Anant Corporation and Datastax, and Developed by Anant Corporation.

Get Involved with Planet Cassandra!

We believe that the power of the Planet Cassandra community lies in the contributions of its members. Do you have content, articles, videos, or use cases you want to share with the world?