Git Product home page Git Product logo

yshurik / momyre Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 87 KB

MOngo to MYsql simple REplicator. The package is the missing link to run replication process from the mongo cluster to the mysql databse

License: Other

Dockerfile 0.85% Go 99.15%
database databases mongo mongodb mysql mysql-database replica replica-set replicaset replicate replication replication-package replicator mariadb mariadb-database mariadb-replication mongo-mysql mongo-mariadb docker mongo-replication

momyre's Introduction

MOMYRE

What is it?

MOngo to MYsql simple REplicator

Intro

The repository is missing link to run replication process from the mongo cluster to the mysql databse

That way the data from mongo databse can be used with any compliant application for making sql queries over the data replicated from mongo databse.

Also note Momyre is a work in progress and currently has some limitations.

The docker image is compact (~20MB) alpine-based, can run on Linux / Mac / Windows with appropriate setup of Mongo custer and MySQL databse

Disclaimer

I am not a database expert and I don't know whether Momyre is actually perfectly safe for replication. I wouldn't recommend using for anything highly sensitive until you proof it fill your needs with appropriate restrictions.

Download the software

PC: linux/amd64:

docker pull yshurik/momyre:latest

Run stages

First momyre gets list of exisiting tables and compare with list of mappings.

If there are extra tables it will create them.

Also momyre gets list of columns in tables and compare with list of mappings.

If there are extra columns it will create them.

If some table/column is not present in mappings, momyre wil want to remove it.

To have it removed the momyre needs to run with --force options

Examples of mapping data

  emails:
    from: "varchar(100)"
    rcpt: "varchar(100)"
    subj: "varchar(100)"
    body: "blob"

Can also map arrays into blobs as json:

  emails:
    from: "varchar(100)"
    rcpts: "blob"
    subj: "varchar(100)"
    body: "blob"

In last case if you have an mongo object with multiple recipients like:

{
  "from" : "[email protected]",
  "rcpts" : [
    "[email protected]",
    "[email protected]"
  ],
  "subj" : "test",
  "body" : "test"
}

Then mysql/mariadb column "rcpts" will have blob with json

Running momyre docker container

The docker container can be started with appropriate config mappings.

docker run -v ./momyre.yml:/momyre/momyre.yml -d --name momyre yshurik/momyre:latest

momyre's People

Contributors

dependabot[bot] avatar yshurik avatar

Stargazers

 avatar  avatar

Watchers

 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.