Git Product home page Git Product logo

ddbes's Introduction

ddbes

DynamoDB Event Store

WARNING

You should probably not be using this unless you are familiar with event sourcing and willing to read and understand the code.

Table of contents

Features

  • Modern and convenient interface for using DynamoDB as an event store
  • S3 snapshots (for aggregates with many commits)
  • Upcasters and lazy transformation
  • WebSocket server and client for event subscriptions (e.g. for providing graphql subscriptions)
  • Helpers for managing dynamodb tables (incl. auto scaling)
  • Efficient store querying and mutation

Installation

yarn add ddbes

A minimum of node 6.5.0 is required. If used with >=9.0.0 and --harmony, the non-transpiled version with native async generators etc is used.

API docs

TODO

Development

Starting development environment

# Bring up a local dynamodb and s3, as well as running tests and linting every time the code changes.

docker-compose up --build

Running tests across all node targets

# Assumes the development environment is running

docker-compose exec dev yarn test

Publishing new version

# Assumes the development environment is running

docker-compose exec dev scripts/publish

ddbes's People

Contributors

gudleik avatar krijoh92 avatar trym avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ddbes's Issues

Support relevant node versions

Currently relevant targets:

  • AWS Lambda - 6.10, which means 6.13
  • node 9.0.0+ without harmony flag
  • node 9.0.0+ WITH harmony flag (no transpiling)

Logging improvements

  • Load: read units consumed, time spent, snapshot used, reducer time
  • Commit: write units consumed, time spent, events, snapshot written

Upcasting and lazy transformations

class MyAggregate extends Aggregate {
  static upcasters = {
    Created: {
      0: event => ({...event, newAttribute: 'hey'}),
    }
  }

  static lazyTransformation = true
}

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.