{"id":13671734,"url":"https://github.com/wasmerio/ate","last_synced_at":"2025-03-28T18:32:30.572Z","repository":{"id":40446642,"uuid":"177168348","full_name":"wasmerio/ate","owner":"wasmerio","description":"Distributed immutable data store with strong encryption and authentication","archived":false,"fork":false,"pushed_at":"2023-07-19T20:31:00.000Z","size":67786,"stargazers_count":138,"open_issues_count":13,"forks_count":12,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-25T06:33:43.007Z","etag":null,"topics":["blockchain","database","datastore","immutable","immutable-objects","immutable-store","kafka","materialized-view","materialized-views","quantum-algorithms"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wasmerio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2019-03-22T15:47:49.000Z","updated_at":"2025-03-19T13:27:41.000Z","dependencies_parsed_at":"2024-07-27T18:20:36.563Z","dependency_job_id":null,"html_url":"https://github.com/wasmerio/ate","commit_stats":null,"previous_names":["john-sharratt/ate"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wasmerio%2Fate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wasmerio","download_url":"https://codeload.github.com/wasmerio/ate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245951641,"owners_count":20699329,"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":["blockchain","database","datastore","immutable","immutable-objects","immutable-store","kafka","materialized-view","materialized-views","quantum-algorithms"],"created_at":"2024-08-02T09:01:17.360Z","updated_at":"2025-03-28T18:32:25.562Z","avatar_url":"https://github.com/wasmerio.png","language":"Rust","readme":"ATE\n===\n\n## Navigation\n\n- [Executive Summary](README.md)\n- [User Guide for ATE](doc/guide.md)\n- [Technical Design of ATE](doc/design.md)\n- [Component Design of ATE](doc/components.md)\n\n## What is ATE?\n\n...is it a [NoSQL](https://en.wikipedia.org/wiki/NoSQL) database?  \n...is it a [distributed redo log](https://en.wikipedia.org/wiki/Redo_log)?  \n...is it a [event BUS](https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern)?  \n...is it a [API framework](https://en.wikipedia.org/wiki/Command_pattern)?  \n...is it a [distributed queue](https://en.wikipedia.org/wiki/Message_queue)?  \n...is it a [distributed cache](https://en.wikipedia.org/wiki/Distributed_cache)?  \n...is it a secure encrypted vault?  \n...is it a [quantum resistant](https://en.wikipedia.org/wiki/NIST_Post-Quantum_Cryptography_Competition) communication framework?  \n...is it a [WORM](https://en.wikipedia.org/wiki/Write_once_read_many) archive solution?  \n    \nATE is all these things and none of them; it is [unique way](doc/design.md) to work with distributed\ndata that can easily implement all of the above use cases - take a look at the [examples](#examples)\nfor how you can achieve them.\n\n## Why the name?\n\nThe origin of the word \"mutate\" is the latin word '-ate':  \nhttps://www.dictionary.com/browse/mutate\n\n## Summary\n\nATE is a distributed immutable data store and built in memory based materialized\nview with strong encryption and authentication.\n\nWhat does that mean?\n\nThis library is a way of working with data in modern distributed computing.\n* ...data is persisted to a distributed commit log.\n* ...partitions are divided into chains that shard data into physical domains.\n* ...streaming of data to the application occurs on demand as the app needs it.\n* ...each chain is a crypto-graph with unique asymmetric keys at differentiating nodes.\n* ...the root of the chain-of-trust validates the crypto-graph through various plugins.\n* ...strong authentication and authorized is by design built into the data model.\n* ...encryption is highly resistant to quantum attacks and uses fine-grained tenant keys.\n* ...all this is integrated into a shared-nothing highly portable executable.\n\n## Examples\n\n- [Typical Client](auth/examples/client.rs)\n- [Hello World](lib/examples/hello-world.rs)\n- [Server/Client](lib/examples/server-client.rs)\n- [Publish/Subscribe](lib/examples/bus-or-queue.rs)\n- [Service/API](lib/examples/service-api.rs)\n- [Exactly-Once Queue](lib/examples/bus-or-queue.rs)\n- [Crypto Currency](lib/examples/coin.rs)\n- [Banking Example](lib/examples/bank.rs)\n\n## Projects\n\n- [atedb](atedb/README.md)\n- [wasmer-dfs](wasmer-dfs/README.md)\n\n## Typical Deployment Pattern\n\n```\n     .-------------.          .- - - - - - -.\n     |   Server    |              Server\n     |             | .. .. .. |             | .. .. ..\n     | \u003eatedb solo |\n     '------|----\\-'          '- - - - - - -'\n            |     \\                 \n        ws://yourserver.com/db\n            |       \\\n     .------|------. \\\n     |Native Client|  .-----Browser-----.\n     |             |  |.---------------.|\n     | \u003eprogram    |  || \u003ewasm32-wasi  ||\n     |  \\ate.so    |  ||  \\ate.wasm    ||\n     '-------------'  |'---------------'|\n                      '-----------------'\n\nThe easiest way to get up and running is to just build your app and point the\ndatabase URL at ws://wasmer.sh/db. You will need to register an account and verify\nyour identity however after this you can use the free databases and/or paid option.\n\nAlternatively, if you wish to host your own ATE servers in infrastructure that you\nmanage and run then follow these high-level steps.\n\n1. Server runs the 'atedb' process on some network reachable location\n2. Create several records for each IP address under the same A-record in your DNS\n3. Either create your own authentication server as well using the auth-server binary\n   or just use the authentication servers hosted at Wasmer by pointing to\n   ws://wasmer.sh/auth.\n```\n\n## Quick Start\n\nCargo.toml\n\n```toml\n[dependencies]\ntokio = { version = \"*\", features = [\"full\", \"signal\", \"process\"] }\nserde = { version = \"*\", features = [\"derive\"] }\nate = { version = \"*\" }\nwasmer-auth = { version = \"*\" }\n```\n\nmain.rs\n\n```rust\nuse serde::{Serialize, Deserialize};\nuse wasmer_auth::prelude::*;\n\n#[derive(Debug, Serialize, Deserialize, Clone)]\nstruct MyData\n{\n    pi: String,\n}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e\n{\n    let dio = DioBuilder::default()\n        .with_session_prompt().await?\n        .build(\"mychain\")\n        .await?;\n\n    dio.store(MyData {\n        pi: \"3.14159265359\".to_string(),\n    })?;\n    dio.commit().await?;\n\n    Ok(())\n}\n```\n\n## Changelog\n\n```\n1.2.2  -= Code Refactoring =-\n        + The crypto library has been split out from the main ATE library to reduce dependencies\n          when using just cryptographic routines and to reduce build times.\n1.2.1  -= Lazy Loading =-\n        + Subscribing to chains can now load the data in the chain on demand as its needed\n          which reduces the startup time considerably.\n        + Temporal clients will default to lazy loading\n        + Data loaded via the lazy loading mechanism will now be cached client side\n\n1.1.1  -= Performance and Bug Fixes =-\n        + Fixed an issue with the web sockets that caused sporadic disconnects\n        + Improved the performance of web socket messages by reusing IV's\n        + Reduced the message overhead with a new message encoding format\n\n1.1.0  -= Comms Upgrade =-\n        + Streaming websockets are now more stable as they use length headers to delimit messages.\n        + Fixed a bug where disconnecting clients would drop neighbors on the same server.\n        + Various changes to the interfaces for stability reasons\n        (this upgrade is not backwards compatible with version 1.0.6)\n\n1.0.6  -= Bug Fixes =-\n        + Modified the interface slightly but most users should not be impacted\n        + Fixed a bug around validators rejecting events during the subscribe\n          process that re-reads them from disk - these validators should not be running\n        + Added the ability to list all root objects\n        + Added the ability to delete all root objects (and hence wipe a chain)\n        + Fixed a serious deadlock situation when commiting transactions that was causing timeouts\n\n1.0.2  -= WASM BUS =-\n       + Integrated with the WASM bus (wasmer-bus) which allows for ATE to use\n         the web sockets while running in a controlled sandbox.\n\n1.0.0  -= Major Release =-\n       + See [README.md](https://github.com/wasmerio/ate/blob/e0beedbbbd84f95cd6c7a9a45b8903058f65b6fd/README.md)\n\n\u003c=0.8.0 See commit history\n```\n\n## High Level Design\n\n    .--[ atedb  ]---. .--[ atedb  ]---.      .-[auth-server]-.\n    |               | |               |      |               |\n    |\u003elocal redo-log| |\u003elocal redo-log|      |\u003elocal redo-log|\n    |.-------------.| |.-------------.|      |.-------------.|\n    || Chain     1 || ||             ||      ||    user     ||\n    ||             || || Chain     2 ||      ||   account   ||\n    |*-------------*| |*------|------*|      |*-----|-------*|\n    |               |       subscribe             login      \n    |                \\________|_____________________|____\n    |                         |                     |    \n    |  \u003elocal redo-log                                   \n    |  \u003eCrypto-Graph Materiaized View\u003c (in memory)       \n    |  .----------------------------------.      session \n    |  |             root(hash)           |   .-----------.\n    |  |              |                   |   |  -token   |\n    |  |      dao----dao(aes)             |---|  -claims  |\n    |  |              \\                   |   |  -keys    |\n    |  |               dao                |   *-----------*\n    |  |                                  |\n\n\n## Feature Flags\n\n- 'client'     - Client functionality that allows one to connect to ATE datachains\n                 and/or host them locally\n- 'server'     - Server functionality required to create and run ATE in distributed\n                 mode with the data replicated on server nodes.\n- 'client_web' - Client functionality designed for running within a browser sandbox\n                 (--target=wasm32-wasi)\n\n## WebAssembly\n\nWhen compiling for WASM use the following command:\n\n```sh\ncargo build --target wasm32-wasi --no-default-features --features client_web\n```\n\n## Lower Level Example\n\nCargo.toml\n\n```toml\n[dependencies]\ntokio = { version = \"*\", features = [\"full\", \"signal\", \"process\"] }\nserde = { version = \"*\", features = [\"derive\"] }\nate = { version = \"*\" }\n```\n\nmain.rs\n\n```rust\nuse serde::{Serialize, Deserialize};\nuse ate::prelude::*;\n\n#[derive(Clone, Serialize, Deserialize)]\nstruct World\n{\n    commandment: String\n}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), AteError\u003e\n{\n    // The default configuration will store the redo log locally in the temporary folder\n    let conf = AteConfig::default();\n    let builder = ChainBuilder::new(\u0026conf).await.build();\n\n    // We create a chain with a specific key (this is used for the file name it creates)\n    let chain = builder.open(\u0026ChainKey::from(\"universe\")).await?;\n    \n    // We interact with the data stored in the chain-of-trust using a DIO\n    let session = AteSession::default();\n    let mut dio = chain.dio(\u0026session).await;\n    \n    // In this example we store some data in the \"World\" object\n    let key = dio.store(World {\n        commandment: \"Hello\".to_string(),\n    })?.key().clone();\n    dio.commit().await?;\n    \n    // Now we retreive the data and print it to console\n    println!(\"{} world!\", dio.load::\u003cWorld\u003e(\u0026key).await?.commandment);\n\n    // All errors in ATE will convert into the AteError\n    Ok(())\n}\n```\n\n## Contribution\n\nIf you would like to help setup a community to continue to develop this project\nthen please contact me at [johnathan.sharratt@gmail.com](johnathan.sharratt@gmail.com)\n","funding_links":[],"categories":["Rust","blockchain"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmerio%2Fate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasmerio%2Fate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmerio%2Fate/lists"}