Git Product home page Git Product logo

transcripter's Introduction

transcripter

A "change data capture" library for MySQL / MariaDB

Important: Not ready yet – work in progress

Motivation

Change data capture (CDC) is a nice mechanism for transferring data from one source to another. Imagine a scenario in which you have a service that writes data into a MySQL / MariaDB based database. What if you want to use that data in a different service as well, but in a slightly different format? This is where CDC comes to play. It helps to observe the mutations that happens on the specific records within the database and generates events out of it. An example:

Imagine you have the following user in the users entity:

---------------------
| ID     | Name     |
---------------------
| 1      | André    |
---------------------

Updating that user via UPDATE users SET name = "André König" WHERE ID = 1; would lead to the following change event when using transcripter:

const event = {
    id: 1567,
    schema: "myService"
    domain: "users",
    type: "update",
    payload: {
        before: {
            id: 1,
            name: "André"
        },
        after: {
            id: 1,
            name: "André König"
        }
    }
};

This event could be taken and pushed to, let's say, a message broker which puts it onto a queue. From there, a different service could consume the event and generate a completely different data structure out of it. This is especially handy when you want to enforce CQRS in order to populate a highly optimized read model.

Goals

transcripter is a module that helps you to observe a database and consume the change events in order to transfer it to different destinations. The main goals are:

  • Easy to use API surface
  • Data Consistency - Due to the fact that the binlog won't contain the whole history, the library will create a snapshot before streaming the log
  • Resilient – when you start to observe after a certain time period, it will start where it left off
  • Handles backpressure
  • Output sink agnostic – you can decide where to send the change events

Usage

TBD

License

MIT © André König

transcripter's People

Contributors

akoenig avatar

Stargazers

Wilhelm Behncke avatar

Watchers

 avatar James Cloos avatar Wilhelm Behncke avatar  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.