Code Monkey home page Code Monkey logo

pg-journal's Introduction

๐Ÿ˜ pg-journal

license beta

๐Ÿ˜ pg-journal is a Proof of Concept Application Layer Event Sourcing inspired by:

The Goal:

  • Rely completely on ๐Ÿ˜ PostgreSQL for the entire OLTP/messaging stack to reduce operational complexity
  • Provide a composable set of packages without lock-in that can be used to selectively apply CQRS/Event Sourcing in real world apps where its needed
  • Provide non-CRUD examples of modeling real world complex domains

Update

I've decided to not spend further time developing this approach due to its high cost and complexity (event sourcing on the application layer). Cons discovered:

  • Reinventing powerful SQL operation such as group by/joins on the application layer
  • Slow read model rebuild times with a large dataset
  • Versionining online read models becomes a huge problem

Approaches such as Lambda Architecture and Kappa Architecture have been shown to be scalable to petabytes whereas this approach does not. The batch processing side can be implemented by reading Postgres disk files and running a large Spark cluster on it, and stream processing done using Kinesis + Spark Streams.

I will start another project investigating Lambda Architecture using Postgres (with CDC) for the entire stack with Spark + Kinesis.

๐Ÿท Features

  • โœ… Event store
  • โœ… Guaranteed global ordering/gap handling for read models (projections)
  • โœ… Opinionated projectors for postgres
  • โœ… Real world example apps
  • โœ… Performance tests & reports

๐Ÿงช Contributing

Pull requests/maintainers are welcome! ๐Ÿ˜ƒ

  • Tests should be green
  • Linting should pass

Install dev dependencies & run tests in a specific package:

$ yarn
$ yarn workspace fact-pg-journal test

๐Ÿ’ก License

This project is licensed under the terms of the Apache 2.0 license.

pg-journal's People

Contributors

stevepavlin avatar

Stargazers

 avatar

Watchers

 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.