1.0.0 • Published 6 years ago

quirkbot-compiler v1.0.0

Weekly downloads
165
License
-
Repository
github
Last release
6 years ago

Quirkbot Compiler Stack

A stack that provides a service that compiles Quirkbot programs.

The service is divided into 2 processes: a webserver and compiler worker.

Webserver

Takes in compilation requests (as c++ source code), and queues them in a database.

After a program has been queued and is waiting for compilation, clients can check query the compilation status by providing the build id.

The programs will only be stored in the server for 15 seconds! Clients should request the compilation and check it's status immediately after.

Compiler worker

Reads queued compilation requests out of a database and compiles them. It doesn't serve any content to external clients.

Requirements

  • Node.js
  • NPM
  • Mongo

Supported platforms

The service is depends on OS specific precompiled packages:

These packages simply mirror the files officially distributed by Arduino.

Installation

Clone repository

$ git clone https://github.com/Quirkbot/QuirkbotCompilerStack.git
$ cd QuirkbotCompilerStack

Install node dependencies

$ sudo npm install

Environment variables

PORT

ConfigureS in which port the server will respond to.

Defaults to 8080.

MONGO_URL

ConfigureS in which database the services will connect to.

Defaults to mongodb://localhost:27017/quirkbot-compiler.

WEB_CONCURRENCY

The number of forks that will be spawned for each process.

On Heroku, it defaults to [Total available memory] / WEB_MEMEORY , so the best way to configure is to set WEB_MEMORY according to what is best for your dyno.

If WEB_CONCURRENCY is falsey, it will default to the number of cores of the machine.

Initialization

Database

If Mongo is not running, start it up with:

$ mongod

Webserver

Start the webserver with

$ node server.js

Compiler

Start the compiler worker

$ node compiler.js

Updating

Quirkbot Board and library

See package.json.

1.0.0

6 years ago

0.9.8

6 years ago

0.9.7

7 years ago

0.9.4

7 years ago

0.9.3

7 years ago

0.9.2

7 years ago

0.9.1

7 years ago

0.9.0

8 years ago

0.8.1

8 years ago

0.8.0

8 years ago

0.7.10

8 years ago

0.7.9

8 years ago

0.7.8

8 years ago

0.7.7

8 years ago

0.7.6

8 years ago

0.7.5

8 years ago

0.7.4

8 years ago

0.7.2

8 years ago

0.7.1

8 years ago

0.7.0

8 years ago

0.6.1

8 years ago

0.6.0

8 years ago

0.5.6

8 years ago

0.5.4

8 years ago

0.5.3

8 years ago

0.5.2

8 years ago

0.5.1

8 years ago

0.5.0

8 years ago

0.4.8

8 years ago

0.4.7

8 years ago

0.4.6

8 years ago

0.4.5

8 years ago

0.4.4

8 years ago

0.4.3

8 years ago

0.4.2

8 years ago

0.4.1

8 years ago

0.3.0

8 years ago

0.2.4

8 years ago

0.2.3

8 years ago

0.2.2

8 years ago

0.2.1

8 years ago