Code Monkey home page Code Monkey logo

dynamo-es's Introduction

dynamo-es

A DynamoDB implementation of the PersistedEventRepository trait in cqrs-es.

Usage

Add to your Cargo.toml file:

[dependencies]
cqrs-es = "0.4.10"
dynamo-es = "0.4.10"

Requires access to a Dynamo DB with existing tables. See:

DynamoDb caveats

AWS' DynamoDb is fast, flexible and highly available, but it does set some limitations that must be considered in the design of your application.

Maximum limit of 25 operations in any transaction

Events are inserted in a single transaction, which limits the number of events that can be handled from a single command using this repository. To operate correctly a command must not produce more than

Item size limit of 400 KB

A single event should never reach this size, but a large serialized aggregate might. If this is the case for your aggregate beware of using snapshots or an aggregate store.

Maximum request size of 1 MB

This could have the same ramifications as the above for snapshots or an aggregate store. Additionally, an aggregate instance with a large number of events may reach this threshold. To prevent an error while loading or replaying events, set the streaming channel size to a value that ensures you won't exceed this threshold.

Testing

Requires access to DynamoDb with existing tables. This can be created locally using the included docker-compose.yml and database initialization script.

To prepare a local test environment (requires a local installation of Docker and AWS CLI):

docker-compose up -d
./db/create_tables.sh

Note that this crate used the AWS DynamoDb Rust SDK, which is currently in Developer Preview. This means that any bugs will be addressed but the underlying interfaces may still be changed resulting in significant changes within this crate. See the AWS SDK public roadmap for more information.

It is recommended that tables are configured to allow only transactions. See: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis-iam.html


Things that could be helpful:

Crates.io docs build status

dynamo-es's People

Contributors

serverlesstechnology avatar davegarred avatar oco-adam avatar danbruder avatar dave-garred avatar cumpsd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.