All Projects → geeknam → esser

geeknam / esser

Licence: other
Event Sourcing Serverlessly

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to esser

Eventsource
Serverless Go event sourcing library built on top of dynamodb
Stars: ✭ 217 (+648.28%)
Mutual labels:  dynamodb, event-sourcing
ddes
JS/TypeScript framework for Distributed Event Sourcing & CQRS
Stars: ✭ 28 (-3.45%)
Mutual labels:  dynamodb, event-sourcing
Eventsourcing
.NET Core event sourcing framework
Stars: ✭ 134 (+362.07%)
Mutual labels:  dynamodb, event-sourcing
Dynasty
Dynasty - Promise-based, clean DynamoDB API
Stars: ✭ 157 (+441.38%)
Mutual labels:  dynamodb
Sqs Worker Serverless
Example for SQS Worker in AWS Lambda using Serverless
Stars: ✭ 164 (+465.52%)
Mutual labels:  dynamodb
Yoyo
A dead simple comment engine built on top of AWS lambda and React, alternative comment service to Disqus.
Stars: ✭ 210 (+624.14%)
Mutual labels:  dynamodb
tactical-ddd
lightweight helpers that I find myself implementing over and over again related to DDD/Event Sourcing tactical patterns, such as Value Objects, Entities, AggregateRoots, EntityIds etc...
Stars: ✭ 33 (+13.79%)
Mutual labels:  event-sourcing
Aws Sdk Perl
A community AWS SDK for Perl Programmers
Stars: ✭ 153 (+427.59%)
Mutual labels:  dynamodb
Komiser
☁️ Cloud Environment Inspector 👮🔒 💰
Stars: ✭ 2,684 (+9155.17%)
Mutual labels:  dynamodb
Aws Mobile React Native Starter
AWS Mobile React Native Starter App https://aws.amazon.com/mobile
Stars: ✭ 2,247 (+7648.28%)
Mutual labels:  dynamodb
Faraday
DynamoDB client for Clojure
Stars: ✭ 193 (+565.52%)
Mutual labels:  dynamodb
Aws Cost Saver
A tiny CLI tool to help save costs in development environments when you're asleep and don't need them!
Stars: ✭ 178 (+513.79%)
Mutual labels:  dynamodb
Terraform Aws Tfstate Backend
Terraform module that provision an S3 bucket to store the `terraform.tfstate` file and a DynamoDB table to lock the state file to prevent concurrent modifications and state corruption.
Stars: ✭ 229 (+689.66%)
Mutual labels:  dynamodb
Dynamo Types
Typescript AWS DynamoDB ORM
Stars: ✭ 191 (+558.62%)
Mutual labels:  dynamodb
Dynamodb Geo.js
A node-friendly typescript port of https://github.com/awslabs/dynamodb-geo
Stars: ✭ 161 (+455.17%)
Mutual labels:  dynamodb
Aws Toolkit Eclipse
AWS Toolkit for Eclipse – an open-source plugin for developing, deploying, and managing AWS applications.
Stars: ✭ 252 (+768.97%)
Mutual labels:  dynamodb
Fake dynamo
local hosted, inmemory Amazon DynamoDB emulator.
Stars: ✭ 154 (+431.03%)
Mutual labels:  dynamodb
Realworld Dynamodb Lambda
λ serverless backend implementation for RealWorld using AWS DynamoDB + Lambda
Stars: ✭ 185 (+537.93%)
Mutual labels:  dynamodb
Dialetus Service
API to Informal dictionary for the idiomatic expressions that each Brazilian region It has
Stars: ✭ 202 (+596.55%)
Mutual labels:  dynamodb
aws-developer-associate-certificate
Note to pass the AWS Developer Associate Exam
Stars: ✭ 53 (+82.76%)
Mutual labels:  dynamodb

esser - [E]vent [S]ourcing [Ser]verlessly

pypi version pypi package Build Status Coverage Status Code Issues Slack

  • Serverless + Pay-As-You-Go
  • Aggregates
  • Snapshots
  • Projections

Architectural Design

[Esser Diagram]

Features

  • Command validation
  • Datastore agnostic read layer
  • Push based messaging via DynamoDB Stream
  • Built-in Snapshotting
  • Publish / subscribe style signalling
  • Generated Cloudformation templates (Infrastructure as Code)

Components

  • Runtime: AWS Lambda (Python)
  • Append Only Event Store: DynamoDB
  • Event Source Triggers: DynamoDB Stream
  • Read / Query Store: PostgreSQL / Elasticsearch (via contrib)

Example Usage

Add first entity

items/aggregate.py

from esser.entities import Entity
from esser.registry import register
from items import commands
from items import receivers
from items.event_handler import ItemEventHandler


@register
class Item(Entity):
    
    # set event handler to aggregate state
    event_handler = ItemEventHandler()
    created = commands.CreateItem()
    price_updated = commands.UpdatePrice()

Add commands that can be issued

items/commands.py

from esser.commands import BaseCommand, CreateCommand


class CreateItem(CreateCommand):

    event_name = 'ItemCreated'
    schema = {
        'name': {'type': 'string'},
        'price': {'type': 'float'}
    }


class UpdatePrice(BaseCommand):

    event_name = 'PriceUpdated'
    schema = {
        'price': {'type': 'float', 'diff': True}
    }

Add event handler to fold event stream

items/event_handler.py

from esser.event_handler import BaseEventHandler

class ItemEventHandler(BaseEventHandler):

    def on_item_created(self, aggregate, next_event):
        return self.on_created(aggregate, next_event)

    def on_price_updated(self, aggregate, next_event):
        aggregate['price'] = next_event.event_data['price']
        return aggregate

Subscribe to events

items/receivers.py

from esser.signals.decorators import receiver
from esser.signals import event_pre_save, event_received, event_post_save
from esser.handlers import LambdaHandler
from items.commands import UpdatePrice


@receiver(event_pre_save, sender=UpdatePrice)
def presave_price_updated(sender, **kwargs):
    # Do something before saving the event
    pass


@receiver(event_received, sender=LambdaHandler)
def received_command(sender, **kwargs):
    # when the command is received
    pass

@receiver(event_post_save)
def handle_event_saved(sender, **kwargs):
    # when the event has already been saved
    pass
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].