Giter VIP home page Giter VIP logo

harmonicio's Introduction

Harmonic IO Streaming Framework

Framework for distributed task execution, key components:

Master Node - maintains queue of tasks, workers, their containers, etc. Worker Node - manages and hosts docker containers. Stream_Connector - client for sending tasks for distributed execution.

This version has support for containers.

Forked from https://github.com/beirbear/HarmonicIO

Update from Oliver:

  • Autoscaling:

An important feature added is auto-scaling, but to not break production it can be disabled. To enable/disable, set the field "auto_scaling_enabled" to true/false in the master's configuration.json file

  • Hosting containers:
curl -X POST "http://<master_ip>:/jobRequest?token=None&type=new_job" --data '{"c_name" : <container_image>, "num" : , "volatile" : <true/false>}' 

NOTE: spelling is important, true=volatile container, false=involatile container. responds with an ID of the container creation job

  • Polling status of container request:
curl http://<master_ip>:/jobRequest?token=None&type=poll_job&job_id=<job id, see above>

, checks status of the container hosting job with provided ID, READY means all contaiers are started and running, INITIALIZING means not all have started yet, FAILED means not all could be started but some may still be available

  • Stream connector

Use just as before

Quickstart

Setup with master and worker on a single node:

  • Install Docker

  • Install python3, pip

  • Clone and Install:

$ git clone https://github.com/HASTE-project/HarmonicIO.git
$ cd HarmonicIO
$ pip3 install -e .
  • Edit harmonicIO/master/configuration.json and harmonicIO/worker/configuration.json so that the addresses are for the local machine (localhost seems problematic).

  • Start the master and worker (separate screen windows recommended):

$ sudo ./runMaster.sh
$ sudo ./runWorker.sh
  • Start an (example) processing container on the worker (localhost) node (replacing <local-ip>):

We use the example container benblamey/hio-example:latest, which can be built from https://github.com/HASTE-project/HarmonicPE

$ curl -X POST "http://<local-ip>:8081/docker?token=None&command=create" --data '{"c_name" : "benblamey/hio-example:latest", "num" : 1}'
  • Check the container is running:
$ sudo docker ps
CONTAINER ID        IMAGE                          COMMAND               CREATED             STATUS              PORTS                  NAMES
5c6146b750ab        benblamey/hio-example:latest   "python example.py"   33 minutes ago      Up 33 minutes       0.0.0.0:9000->80/tcp   happy_jepsen
  • Use the Stream Connector to send data:

(Modify the script to use the correct IP address):

$ python3 example_stream_connector.py
  • Print the logs of the container to check the output of the executed task (message was bytes ...):
$ docker logs happy_jepsen 
Listening for tasks...
attempting to open local port: 0.0.0.0:80
Streaming from  172.17.0.1 : 40742
message was bytes: 125

Install the Streaming Connector only

  • Install python3, pip

  • Clone and Install:

$ git clone https://github.com/HASTE-project/HarmonicIO.git
$ cd HarmonicIO
$ pip3 install -e .

harmonicio's People

Contributors

beirbear avatar snapple49 avatar benblamey 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.