{"id":15056770,"url":"https://github.com/neshkeev/consistent-cassandra-builder","last_synced_at":"2026-04-02T02:59:16.932Z","repository":{"id":174441025,"uuid":"583724123","full_name":"neshkeev/consistent-cassandra-builder","owner":"neshkeev","description":"The project demonstrates the better approach to designing a client's API for Apache Cassandra","archived":false,"fork":false,"pushed_at":"2023-01-17T08:03:37.000Z","size":286,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T02:25:50.034Z","etag":null,"topics":["apache-cassandra","cassandra","spring-data","spring-data-cassandra","testcontainers"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neshkeev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-30T17:44:59.000Z","updated_at":"2023-10-05T13:48:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"c67ed3a1-f1d5-4129-a16a-f392a4749ca8","html_url":"https://github.com/neshkeev/consistent-cassandra-builder","commit_stats":null,"previous_names":["neshkeev/consistent-cassandra-builder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neshkeev%2Fconsistent-cassandra-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neshkeev%2Fconsistent-cassandra-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neshkeev%2Fconsistent-cassandra-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neshkeev%2Fconsistent-cassandra-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neshkeev","download_url":"https://codeload.github.com/neshkeev/consistent-cassandra-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243544665,"owners_count":20308168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apache-cassandra","cassandra","spring-data","spring-data-cassandra","testcontainers"],"created_at":"2024-09-24T21:56:19.196Z","updated_at":"2025-12-28T19:13:51.385Z","avatar_url":"https://github.com/neshkeev.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gitpod](https://img.shields.io/badge/Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/neshkeev/consistent-cassandra-builder)\n\n# Consistent Builder API for Cassandra\n\n## Overview\n\nThe project demonstrates an approach to organize a client's API to deal with duplicating data when working with Apache Cassandra\n\n## Setup\n\n### Testcontainers\n\nBy default, the test will use testcontainers to start cassandra, so the user is expected to simply run tests: `mvn test`:\n\n- Direct approach: `mvn test -Dtest=com.github.neshkeev.papers.cassandra.DirectApproachTest`\n- Factory Method + Builder: `mvn test -Dtest=com.github.neshkeev.papers.cassandra.FactoryTest`\n- Factory Method + State Machine based Builder: `mvn test -Dtest=com.github.neshkeev.papers.cassandra.FactoryStateMachineTest`\n\n**IMPORTANT**: Don't be alarmed with the `Cannot assign requested address` messages in the output, that is how the testcontainers library waits for the cassandra docker container to start\n\n### External Cassandra\n\nIf the user is not able to use testcontainers, it possible to run the tests against an external instance of Cassandra. There is the -Duse.cassandra.in.testcontainers system property to control how Cassandra is accessed: when it's `false`, the external instance of Cassandra is used.\n\n1. Start cassandra: `docker compose up`\n1. Wait for cassandra to start. The `cassandra` container should be in the `healthy` state: `watch docker compose ps`\n1. Set up the cluster: `docker compose exec -it cassandra cqlsh --file=\"/mnt/scripts/setup.cql\"`\n1. Set up the environment (skip if docker is on `localhost`):\n   - set the `CONTACT_POINT` environment variable, if cassandra is not on `localhost:9042` (default): `export CONTACT_POINT=localhost:9042`\n   - set the `KEYSPACE_NAME` environment variable, if the keyspace is not `CONSISTENT_BUILDER_DEMO_CLUSTER` (default): `export KEYSPACE_NAME=CONSISTENT_BUILDER_DEMO_CLUSTER`\n1. Run tests:\n   - Direct approach: `mvn test -Duse.cassandra.in.testcontainers=false -Dtest=com.github.neshkeev.papers.cassandra.DirectApproachTest`\n   - Factory Method + Builder: `mvn test -Duse.cassandra.in.testcontainers=false -Dtest=com.github.neshkeev.papers.cassandra.FactoryTest`\n   - Factory Method + State Machine based Builder: `mvn test -Duse.cassandra.in.testcontainers=false -Dtest=com.github.neshkeev.papers.cassandra.FactoryStateMachineTest`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneshkeev%2Fconsistent-cassandra-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneshkeev%2Fconsistent-cassandra-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneshkeev%2Fconsistent-cassandra-builder/lists"}