Coder Social home page Coder Social logo

wireforce-llc / m3 Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 142 KB

☕ Data Orchestrator. Without abstractions

Dockerfile 1.85% JavaScript 0.36% TypeScript 96.98% CSS 0.06% Python 0.49% Shell 0.25%
airflow cloud cloud-functions dags data-orchestration data-orchestrator data-science data-structures

m3's Introduction

M3Flow (in developing)

M3Flow helps teams and individuals manage data and operations quickly and without abstractions

M3Flow

Install

Installing the M3 is very easy. You must have Docker pre-installed

git clone https://github.com/Wireforce-LLC/m3
cd m3
docker-compose up -d

Understanding M3

M3 has a simple ideology. Every file you create is an object. There is only one entity in the system, this is an Object. The purpose of the object is to process the data and return the result (or return Unit). One object can borrow information from another, this behavior is called dependency. An object can also be called according to a schedule, perform an operation on data, but return the result to nothing. M3 will understand the markup of your objects based on Runtime. All of your object lifecycle descriptions are hooks (just like in React).

Your first Object

To start, let's create an object called hello. This is a simple object that returns a string.

// hello.js

await useMeta({
    id: 'hello',
    description: undefined,
    schedule: undefined
})

return useFlow(async function() {
    return 'Hello world'
})

Dependencies

Okay, we can create object. But, how do we create dependency? If you have an object called hello and another object called world, you can create a dependency like this:

// world.js

await useMeta({
    id: 'world'
})

const hello = await useDep('hello')

return useFlow(async function() {
    return hello
})

Schedules

M3 also supports schedules. You code can be executed every certain time. You can also create a schedule like this:

// schedule.js

await useMeta({
    id: 'schedule',
    schedule: [
        "* * * * *", // every minute
        "* */15 * * *", // every 15 minutes
    ]
})

Object schedule will execute every minute and every 15 minutes.

Auto Object Map

M3 creates an object map automatically based on your Runtime. This means that you should make the first call after creating an object and every time you change useMeta. In debug mode, your useFlow and useDep will be ignored. Let's create three simple objects called a, b, and c, and merge them into an abc object. Call the abc function and see the interactive graph.

// a.js, b.js, and c.js

await useMeta({
    id: "a", // different in each
})

return useFlow(() => {
    return Math.random()
})

M3 understands the object map automatically. And understand return types. Also if you will use Object or Array instance.

m3's People

Contributors

masloffvs 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.