Code Monkey home page Code Monkey logo

braindrill's Introduction

Distributed Remote Code Execution Engine

Drill your brain, because why the heck not.

Video demo: https://www.youtube.com/watch?v=sMlJC7Kr330

Requirements for deploying locally:

  • docker engine

Running locally:

  • clone the project and navigate to the root directory
  • docker volume create engine
  • docker-compose up

Example:

  • sending POST request at localhost:8080/lang/python
  • attaching python code to request body

My Image

Supported programming languages:

  • Java 17: localhost:8080/lang/java
  • Python 3: localhost:8080/lang/python
  • JavaScript / Node 16: localhost:8080/lang/javascript

Simple code snippets for testing:

  • Java
public class BrainDrill {
    public static void main(String[] args) {
        System.out.println("drill my brain");
    }
}
  • Python
print("drill my brain") 
  • JavaScript:
console.log("drill my brain");

DONE:

  • implement POC - ✅
  • introduce http layer (pekko-http) - ✅
  • introduce local master and worker pekko actors - ✅
  • introduce Pekko Cluster - ✅
  • turn local master actor into load balancer node - ✅
  • create 3 worker nodes - ✅
  • distribute worker actors equally on each node (e.g 25 actors on each node, awaiting tasks) - ✅
  • run cluster via docker-compose - ✅
  • implement timeouts & cleanup for long-running code, limit CPU and RAM, add secure layer - ✅
  • write basic load test to check how system behaves during high load - ✅
  • perform aggregation statistics in load test - ✅

TODO:

  • add support for C, Go, Rust and others - ❌
  • use other pekko libraries to make cluster bootstrapping and management flexible and configurable - ❌
  • wrap the cluster in k8s and enable autoscaling - ❌
  • deploy two separate clusters and enable RoundRobin load balancing via k8s - ❌

Architecture Diagram:

My Image

braindrill's People

Contributors

ghurtchu avatar

Stargazers

 avatar

Watchers

 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.