All Projects → altairsix → Eventsource

altairsix / Eventsource

Serverless Go event sourcing library built on top of dynamodb

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Eventsource

Designing Cloud Native Microservices On Aws
Introduce a fluent way to design cloud native microservices via EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.
Stars: ✭ 131 (-39.63%)
Mutual labels:  serverless, dynamodb
Graphql Recipes
A list of GraphQL recipes that, when used with the Amplify CLI, will deploy an entire AWS AppSync GraphQL backend.
Stars: ✭ 137 (-36.87%)
Mutual labels:  serverless, dynamodb
Dynamo Easy
DynamoDB client for NodeJS and browser with a fluent api to build requests. We take care of the type mapping between JS and DynamoDB, customizable trough typescript decorators.
Stars: ✭ 133 (-38.71%)
Mutual labels:  serverless, dynamodb
Yoyo
A dead simple comment engine built on top of AWS lambda and React, alternative comment service to Disqus.
Stars: ✭ 210 (-3.23%)
Mutual labels:  serverless, dynamodb
Sqs Worker Serverless
Example for SQS Worker in AWS Lambda using Serverless
Stars: ✭ 164 (-24.42%)
Mutual labels:  serverless, dynamodb
Full Stack Serverless Cdk
Learn to Build Full-Stack Serverless Apps and APIs using AWS Cloud Development Kit (CDK) in Baby Steps.
Stars: ✭ 122 (-43.78%)
Mutual labels:  serverless, dynamodb
Dialetus Service
API to Informal dictionary for the idiomatic expressions that each Brazilian region It has
Stars: ✭ 202 (-6.91%)
Mutual labels:  serverless, dynamodb
Historical
A serverless, event-driven AWS configuration collection service with configuration versioning.
Stars: ✭ 85 (-60.83%)
Mutual labels:  serverless, dynamodb
Amplify Photo Sharing Workshop
Building full-stack cloud apps with AWS Amplify and React
Stars: ✭ 143 (-34.1%)
Mutual labels:  serverless, dynamodb
Serverless Dynamodb Autoscaling
Serverless Plugin for Amazon DynamoDB Auto Scaling configuration.
Stars: ✭ 142 (-34.56%)
Mutual labels:  serverless, dynamodb
Dynamodb Json
DynamoDB json util to load and dump strings of Dynamodb json format to python object and vise-versa
Stars: ✭ 114 (-47.47%)
Mutual labels:  serverless, dynamodb
Dynamo Types
Typescript AWS DynamoDB ORM
Stars: ✭ 191 (-11.98%)
Mutual labels:  serverless, dynamodb
Awesome Aws
A curated list of awesome Amazon Web Services (AWS) libraries, open source repos, guides, blogs, and other resources. Featuring the Fiery Meter of AWSome.
Stars: ✭ 9,895 (+4459.91%)
Mutual labels:  serverless, dynamodb
Serverless
Serverless 架构应用开发指南 - Serverless Architecture Application Development Guide with Serverless Framework.
Stars: ✭ 1,616 (+644.7%)
Mutual labels:  serverless, dynamodb
This Or That
This or that - Real-time atomic voting app built with AWS Amplify
Stars: ✭ 87 (-59.91%)
Mutual labels:  serverless, dynamodb
Eventsourcing
.NET Core event sourcing framework
Stars: ✭ 134 (-38.25%)
Mutual labels:  event-sourcing, dynamodb
Discfg
A distributed, serverless, configuration tool using AWS services
Stars: ✭ 75 (-65.44%)
Mutual labels:  serverless, dynamodb
Lambda Refarch Webapp
The Web Application reference architecture is a general-purpose, event-driven, web application back-end that uses AWS Lambda, Amazon API Gateway for its business logic. It also uses Amazon DynamoDB as its database and Amazon Cognito for user management. All static content is hosted using AWS Amplify Console.
Stars: ✭ 1,208 (+456.68%)
Mutual labels:  serverless, dynamodb
Booster
Booster Cloud Framework
Stars: ✭ 136 (-37.33%)
Mutual labels:  serverless, event-sourcing
Realworld Dynamodb Lambda
λ serverless backend implementation for RealWorld using AWS DynamoDB + Lambda
Stars: ✭ 185 (-14.75%)
Mutual labels:  serverless, dynamodb

GoDoc Travis CI

eventsource is a Serverless event sourcing library for Go that attempts to leverage the capabilities of AWS to simplify the development and operational requirements for event sourcing projects.

This library is still under development and changes to the core api are likely.

Take advantage of the scalability, high availability, clustering, and strong security model you've come to know and love with AWS.

Serverless and accessible were significant design considerations in the creation of this library. What AWS can handle, I'd rather have AWS handle.

Installation

go get github.com/altairsix/eventsource/...

Getting Started

The easiest way to get started is to check out the _examples directory. gopherfest has the most complete example. Before you run the gopherfest example, you'll need to (a) ensure you have AWS credentials loaded into your environment and (b) then run:

eventsource dynamodb create-table --name orders --region us-west-2

Key Concepts

Event sourcing is the idea that rather than storing the current state of a domain model into the database, you can instead store the sequence of events (or facts) and then rebuild the domain model from those facts.

git is a great analogy. each commit becomes an event and when you clone or pull the repo, git uses that sequence of commits (events) to rebuild the project file structure (the domain model).

Greg Young has an excellent primer on event sourcing that can found on the EventStore docs page.

Overview

Event

Events represent domain events and should be expressed in the past tense such as CustomerMoved, OrderShipped, or EmailAddressChanged. These are irrefutable facts that have completed in the past.

Try to avoid sticking derived values into the events as (a) events are long lived and bugs in the events will cause you great grief and (b) business rules change over time, sometimes retroactively.

Aggregate

The Aggregate (often called Aggregate Root) represents the domain modeled by the bounded context and represents the current state of our domain model.

Repository

Provides the data access layer to store and retrieve events into a persistent store.

Store

Represents the underlying data storage mechanism. eventsource only supports dynamodb out of the box, but there's no reason future versions could not support other database technologies like MySQL, Postgres or Mongodb.

Serializer

Specifies how events should be serialized. eventsource currently uses simple JSON serialization although I have some thoughts to support avro in the future.

CommandHandler

CommandHandlers are responsible for accepting (or rejecting) commands and emitting events. By convention, the struct that implements Aggregate should also implement CommandHandler.

Command

An active verb that represents the mutation one wishes to perform on the aggregate.

Dispatcher

Responsible for retrieving or instantiates the aggregate, executes the command, and saving the the resulting event(s) back to the repository.

Creating dynamodb tables

Eventsource comes with a utility to simplify creating / deleting the dynamodb tables.

eventsource dynamodb create-table --name {table-name}
eventsource dynamodb delete-table --name {table-name}

Development

To run the tests locally, execute the following:

docker-compose up
export DYNAMODB_ENDPOINT=http://localhost:8080
go test ./...

Testing

The scenario package simplifies testing.

    scenario.New(t, &Order{}).  // &Order{} implements both Aggregate and CommandHandler
        Given().                // an initial set of events
        When(&CreateOrder{}).   // command is applied
        Then(&OrderCreated{})   // expect the following events to be emitted

Todo

  • [ ] document singleton usage
  • [ ] implement dynamodb to sns lambda function
  • [ ] implement dynamodb to kinesis firehose lambda function
  • [ ] document stream replay via s3
  • [ ] add support for terraform in tooling
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].