Skip to content
forked from sylvaingir/Olymp

The simple distributed compute engine

License

Notifications You must be signed in to change notification settings

alexmandt/Olymp

 
 

Repository files navigation

Build Status Coverage Status Downloads Version License Chat

Olymp is an open source distributed compute engine which allows you to build and deploy distributed compute applications fast without writing any boilerplate communication code. Write an application, upload it to your private Olymp cloud and look at it go!

Olymp supports multiple languages & runtimes (like Node, C#, Java, Python or Ruby). This means that you can write certain parts of your application in the language which is best suitable for it. Stop limiting yourself to one language when you can use the right tool for the job.

Currently, we are in pre-alpha stage. To stay updated, just leave a star.

Getting started 📈

Run master node 🏃 👴

Master machine (IP: 192.168.0.100)

$ olymp --master --name master.local --webui

Run child nodes 🏃 👶 👶

Machine 1

$ olymp --child olymp://192.168.0.100/connect --name child1.local --user admin --password admin

or with a simple connection string:

$ olymp --child olymp://192.168.0.100/connect?user=admin&password=admin --name child1.local

Machine 2

$ olymp --child olymp://192.168.0.100:17930/connect --name child2.local --user admin --password admin

Connect to master node CLI configuration 🔌 👴

$ olymp --configure olymp://localhost/configure --user admin --password admin
master.local>

calc.js 🔢 🤓 👷

...
module.exports.add = function (event, context, callback){
  ...
  callback (null, result);
}

module.exports.default = function (event, context, callback){
  switch(event.type){
    case "add":
      module.exports.add(event, context, callback);
    ...
  }
}
...

Upload worker program to master node ⬆️ 👷

We will upload a simple calculator program that we wrote.

master.local> put program "/home/u1/calc.js" as "calculator" on "nodejs"

Hook the worker program 🎣 👷

master.local> hook "calculator" to "/api/calculator/*"

Distribute worker program to child nodes 🚢 👷

When distributed to multiple child nodes, the worker program is automatically load balanced.

master.local> distribute "calculator" to "child1.local"
master.local> distribute "calculator" to "child2.local"

Write a simple pipeline ✍️ 📨

This pipeline can access our calculator program and use it from our master node.

module.exports.default = function(event, context, callback){

    var w = context.param.w, x = context.param.x, y = context.param.y, z = context.param.z;

    var calculator = workers.get("calculator");
    
    simultan([
        function(){r1 = calculator.add(w,x);},
        function(){r2 = calculator.add(y,z);}
    ]);
    /* 
    Because Olymp automatically balances the load,
    the first add operation is executed on child1.local,
    the second on child2.local
    */
    
    callback(null, r1 + r2);
}

Internally, nodes communicate over the Olymp protocol over TCP. Client to master communication can either be over TCP or over HTTP (through HTTP hooks).

Deploy the pipeline ⬆️ 📨

master.local> put pipeline "/home/u1/add.js" as "add"
master.local> distribute "add" to self
master.local> hook "add" to "/api/pipelines/add"

Contributors ✨

Ariel Simulevski
Ariel Simulevski

💻🤔🚧💬👀
Dimitar Rusev
Dimitar Rusev

💻🤔💬🔧
Ali Sheikh
Ali Sheikh

💻🎨💬⚠️

Contributing

GitHub issues by-label

About

The simple distributed compute engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%