{"id":18374065,"url":"https://github.com/enigmacurry/deepstream.io-storage-cassandra","last_synced_at":"2026-05-19T09:05:40.221Z","repository":{"id":66637892,"uuid":"82329681","full_name":"EnigmaCurry/deepstream.io-storage-cassandra","owner":"EnigmaCurry","description":"Cassandra storage connector for deepstream.io","archived":false,"fork":false,"pushed_at":"2017-02-19T22:10:16.000Z","size":27,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T14:15:47.296Z","etag":null,"topics":["cassandra","deepstream"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/EnigmaCurry.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,"zenodo":null}},"created_at":"2017-02-17T19:14:14.000Z","updated_at":"2019-03-20T06:12:01.000Z","dependencies_parsed_at":"2023-05-25T13:15:08.140Z","dependency_job_id":null,"html_url":"https://github.com/EnigmaCurry/deepstream.io-storage-cassandra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EnigmaCurry/deepstream.io-storage-cassandra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnigmaCurry%2Fdeepstream.io-storage-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnigmaCurry%2Fdeepstream.io-storage-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnigmaCurry%2Fdeepstream.io-storage-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnigmaCurry%2Fdeepstream.io-storage-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EnigmaCurry","download_url":"https://codeload.github.com/EnigmaCurry/deepstream.io-storage-cassandra/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnigmaCurry%2Fdeepstream.io-storage-cassandra/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265424472,"owners_count":23762880,"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":["cassandra","deepstream"],"created_at":"2024-11-06T00:13:15.543Z","updated_at":"2026-05-19T09:05:35.201Z","avatar_url":"https://github.com/EnigmaCurry.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deepstream.io-storage-cassandra\n\n[deepstream](https://deepstream.io) storage connector for [Apache Cassandra](http://cassandra.apache.org)\n\nCode status: trailblazer - I have not used this code in production yet.\n\n## Configuration options\n```yaml\nplugins:\n  storage:\n    name: cassandra\n    options:\n      db_hosts:\n        - ${CASSANDRA_HOST}\n      keyspace: deepstream # This keyspace has to already exist\n\n      # optional (specify only if you want different defaults)\n      defaultTable: global\n      defaultPrimaryKey:\n        - name: pk\n          type: text\n        - name: k1\n          type: text\n        - name: k2\n          type: text\n        - name: k3\n          type: text\n```\n\n * db_hosts - The initial list of Cassandra nodes for the driver to\n   connect to.\n * keyspace - The name of the Cassandra keyspace for deepstream to\n   manage. It must be created beforehand.\n * defaultTable - **optional** - The default table to store records that\n   don't specify a table name. 'global' if unspecified.\n * defaultPrimaryKey - **optional** - The default key columns to create on new\n   tables. The default is to use all text fields. You can specify\n   non-text fields if you wish, but you will have to do extra frontend\n   validation in valve to prevent using invalid keys in this case.\n\n## How records are mapped to Cassandra rows:\n\nThis connector decomposes the deepstream record key into a composite\nkey with [clustering\ncolumns](http://cassandra.apache.org/doc/latest/cql/ddl.html#clustering-columns). This is the format:\n\n```{table_name}/{partition_key}/{optional_1st_cluster_key}/.../{optional_nth_cluster_key}```\n\nData associated with the key is reduced to a JSON blob. This allows\nyou to query on any of the parts of the record key, but not on the\ncontents.\n\nFor example, a deepstream record might look like this:\n\n * key: ```user/ryan/settings```\n * data: ```{ defaultView: 'messages', allowMessages: ['admin', 'mod']}```\n\nCassandra would store such a record this way (assuming defaultPrimaryKey hasn't been modified):\n\n * ```CREATE TABLE IF NOT EXISTS user (pk text, k1 text, k2 text, k3 text, data text, PRIMARY KEY (pk, k1, k2, k3));```\n * ```INSERT INTO user JSON '{ pk:\"ryan\", k1:\"settings\", k2:\"\", k3:\"\", data: /*serialized data here*/ }'```\n\nk1, k2, and k3 are the clustering columns. A deepstream record key\ndoes not need to specify all of the cluster keys, but those that it\nomits will be set to a blank string '' (as is the case here with k2\nand k3.) If a record key specifies *more* cluster keys than exist on\nthe table, they will spill over into the last cluster column. For\ninstance, the key ```user/ryan/one/two/three/four``` would look like this\nin cassandra, note k3, the last key column, is allowed to have '/' in\nit:\n\n     pk   | k1  | k2  | k3         | data\n    ------+-----+-----+------------+------------------\n     ryan | one | two | three/four | /* serialized data */\n\n\nThe client really does not need to worry about these details, but it\nis useful to understand how the data is stored so that you can make\nefficient queries. [See more examples in the the connector code\nhere](https://github.com/EnigmaCurry/deepstream.io-storage-cassandra/blob/master/src/connector.js)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenigmacurry%2Fdeepstream.io-storage-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenigmacurry%2Fdeepstream.io-storage-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenigmacurry%2Fdeepstream.io-storage-cassandra/lists"}