Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ghurtchu/braindrill
distributed remote code execution engine
https://github.com/ghurtchu/braindrill
actor-model cluster concurrency container distributed-systems docker master pekko pekko-cluster pekko-http pekko-streams remote-code-execution-engine scala scala3 worker
Last synced: 3 months ago
JSON representation
distributed remote code execution engine
- Host: GitHub
- URL: https://github.com/ghurtchu/braindrill
- Owner: Ghurtchu
- Created: 2024-05-08T20:04:32.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-07-12T09:36:13.000Z (6 months ago)
- Last Synced: 2024-10-14T20:01:14.685Z (3 months ago)
- Topics: actor-model, cluster, concurrency, container, distributed-systems, docker, master, pekko, pekko-cluster, pekko-http, pekko-streams, remote-code-execution-engine, scala, scala3, worker
- Language: Scala
- Homepage:
- Size: 1.94 MB
- Stars: 12
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Distributed Remote Code Execution Engine
Send code, we will run it :)
Blog version: https://blog.rockthejvm.com/remote-code-execution-engine/
Video demo: https://www.youtube.com/watch?v=sMlJC7Kr330
Requirements for deploying locally:
- docker engineRunning locally (startup may be slow for the first time since it needs to pull a few docker images):
- clone the project and navigate to the root directory
- start the docker engine
- `chmod +x deploy.sh`
- `./deploy.sh`In case you change code and want to run the new version you should execute:
- `./deploy.sh rebuild`Example:
- sending `POST` request at `localhost:8080/lang/python`
- attaching `python` code to request body![My Image](assets/python_example.png)
Supported programming languages, HTTP paths and simple code snippets for request body, respectively:
- `Java` - `localhost:8080/lang/java`
```java
public class BrainDrill {
public static void main(String[] args) {
System.out.println("drill my brain");
}
}
```- `Python` - `localhost:8080/lang/python`
```python
print("drill my brain")
```- `Ruby` - `localhost:8080/lang/ruby`
```ruby
puts "drill my brain"
```- `Perl` - `localhost:8080/lang/perl`
```perl
print "drill my brain\n";
```- `JavaScript` - `localhost:8080/lang/javascript`
```javascript
console.log("drill my brain");
```- `PHP` - `localhost:8080/lang/php`
```javascript```
Architecture Diagram:
![My Image](assets/diagram.png)
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 - ❌