/LoadWorker

LoadWorker

Primary LanguageJavaScript

LoadWorker


Description

Load Worker is the individual task execution unit of the Load Effect application.

Load Worker instances are spun up by the Master Server and actively communicate with the Master Server. Load Workers will immediately perform a POST request to the Master Server, requesting a bundle of jobs. Load Workers will then execute each piece of work using site-script's library. Results of the work are returned to the Load Worker, and the Load Worker writes results to the database. Then the Load Worker, again, sends a POST request to the Master Server and will shut itself down if it receives no tasks from the Master Server.

Features

  • Retrieval of tasks from master server
  • Automatic shutdown of server upon completion of task
  • Synchronous saving of results to database

Worker Server Architecture

image

Table of Contents

  1. Usage
  2. Getting Started
    1. Prerequisites
    2. Installing Dependencies
  3. Core Team
  4. Contributing
  5. Licensing

Getting Started

Prerequisites

Installing Dependencies

From within the root directory:

npm install

Running The App

npm start

Testing

npm test

Run:

npm test

Core Team

Contributing

  1. Fork the repo.
  2. Clone it to your local computer
  3. Cut a namespaced feature branch from master and name it appropriately
  4. Make commits and prefix each commit with the type of work you were doing
  5. BEFORE PUSHING UP YOUR CHANGES, rebase upstream changes into your branch, fix any potential conflicts, and then push to your fork.
  6. Submit a pull request directly to the master
  7. Someone else will perform code review to keep codebase clean
  8. Fix any errors or issues raised by the reviewer and push the fixes as a single new commit
  9. Repeat until the pull request is merged.

See CONTRIBUTING.md for contribution guidelines in detail.

License

M.I.T