GithubHelp home page GithubHelp logo

globalwebindex / saturator Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 0.0 179 KB

Finite State Machine that is satisfying dependencies in partitioned/layered DAG until it is fully saturated

License: MIT License

Scala 100.00%
legacy-code

saturator's Introduction

saturator

DroneCI saturator-api saturator-core

Finite State Machine that is satisfying dependencies within partitioned/layered directed acyclic graph until it is fully saturated

                               +--+
                               |P1|
              +---------------->P2|
              |             V2 |X3|
              |                |  |                +--+
              |                +--+---------------->P1|
              |                                 V5 |X2|
              |                                    |X3|
            +-++               +------------------->  |            +--+
            |P1|               |P1|                +--+------------>P1|
         V1 |P2+--------------->X2|                             V8 |X2|
            |P3|            V3 |X3|                                |X3|
P4 --------->  |               |  |                +--------------->  |
            +-++               +--+                |P1|            +^-+
              |                                 V6 |P2|             |
              |                                    |X3|             |
              |                +------------------->  |             |
              |                |P1|                +--+             |
              +---------------->P2|                                 |
                            V4 |P3|                                 |
                               |  |                +----------------+
                               +--+---------------->P1|
                                                V7 |X2|
                                                   |X3|
                                                   |  |
                                                   +--+
  • V1-8 = Graph Vertices
  • P1-4 = Partitions
  • X1-3 = Missing partitions, ie. graph edge P3 - X3 is a dependency that needs to be satisfied

Use case

This system was designed to orchestrate an ETL pipeline or a system of microservices, it could be used together with mawex as a task/job execution engine. Ie. your pipeline would let :

  • saturator decide what should be done based on changes in user system like new/created or changed partitions or outcome of job executions
  • mawex take care about the actual ETL job or microservice execution

Saturator Flow

  1. DagFSM is provided with initial state that represents state of the outer world (eg. partitioned storages)
  2. DagFSM starts saturating (issuing commands to the user system) dependencies until all vertices in all partition DAGs are Complete and the FSM is idle
  3. In the mean time, DagFSM asks user system for :
    • newly created partitions that are added as a new layer to partitioned DAG
    • partitions that changed in the user system so that it can re-evaluate particular partition DAG

how-to

libraryDependencies += "net.globalwebindex" %% "saturator" % "x.y.x"

or

dependsOn(ProjectRef(uri("https://github.com/GlobalWebIndex/saturator.git#vx.y.x"), "saturator-core"))

Note that this library is tested on :

But can run on different plugin like akka-persistence-cassandra, it is just a matter of how high your throughput is.

See demo at example/ :

$ cd docker
$ docker-compose -f saturator-$plugin.yml up

saturator's People

Contributors

l15k4 avatar pribor avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

saturator's Issues

Graph nodes should be singletons instead of living instances

In layered/partitioned DAG, each partition has the same set of vertices, so that partitions must be instances but vertices should be singletons.

Otherwise in a DAG of 50 000 partitions, there could be 2M of redundant living instances on heap.

Missing License

I think it would be appropriate to add license to this repository.

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.