{"id":17148421,"url":"https://github.com/aholstenson/dwaal","last_synced_at":"2025-07-25T23:32:16.524Z","repository":{"id":57217399,"uuid":"110147222","full_name":"aholstenson/dwaal","owner":"aholstenson","description":"Distributed key-value storage for Node","archived":false,"fork":false,"pushed_at":"2021-06-20T16:20:46.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-20T16:53:38.955Z","etag":null,"topics":["crdt","distributed-storage","key-value","persistence","storage","yjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aholstenson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-09T17:42:55.000Z","updated_at":"2021-06-20T16:22:03.000Z","dependencies_parsed_at":"2022-08-28T21:41:14.327Z","dependency_job_id":null,"html_url":"https://github.com/aholstenson/dwaal","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholstenson%2Fdwaal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholstenson%2Fdwaal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholstenson%2Fdwaal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aholstenson%2Fdwaal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aholstenson","download_url":"https://codeload.github.com/aholstenson/dwaal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227630158,"owners_count":17796228,"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":["crdt","distributed-storage","key-value","persistence","storage","yjs"],"created_at":"2024-10-14T21:28:31.377Z","updated_at":"2024-12-01T21:22:01.151Z","avatar_url":"https://github.com/aholstenson.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dwaal\n\nDistributed persistent storage service designed to be used with an \n[Ataraxia](https://github.com/aholstenson/ataraxia) network.\n\n* **Distributed**, can run on one or more nodes keeping data in sync\n* Propagates changes using **CRDT** via [Yjs](https://github.com/yjs/yjs),\n  allowing for:\n  * Instant updates to the local data\n  * Near-realtime updates to other nodes\n  * Continues working even without majority of nodes being unreachable\n* Provides a **persistent map** for easy key-value storage\n* Ability to open a **Yjs document** to access all of its abilities\n* Replicates only open maps and documents\n\n## Usage\n\nInstall `dwaal` together with `ataraxia` and at least one transport:\n\n```\n$ npm install dwaal ataraxia ataraxia-tcp\n```\n\nSetup storage on top of an Ataraxia network:\n\n```javascript\nimport { Storage } from 'dwaal';\n\nimport { Network, AnonymousAuth } from 'ataraxia';\nimport { TCPTransport, TCPPeerMDNSDiscovery } from 'ataraxia-tcp';\n\n// Setup a network with anonymous TCP access - see Ataraxia for more examples\nconst net = new Network({\n  name: 'dwaal-example',\n  transports: [\n    new TCPTransport({\n      discovery: new TCPPeerMDNSDiscovery(),\n      authentication: [ new AnonymousAuth() ]\n    })\n  ]\n});\nawait net.join();\n\n// Create a storage layer on the network\nconst storage = new Storage({\n  network: net,\n  path: 'data/directory/'\n});\n\n// Open a map\nconst map = await storage.openMap('name-of-map');\n\n// Similar use as a normal map\nmap.set('key', 100);\nconst value = map.get('key');\n\n// Close the storage to shutdown gracefully\nawait storage.close();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faholstenson%2Fdwaal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faholstenson%2Fdwaal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faholstenson%2Fdwaal/lists"}