New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

workaholic

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

workaholic

workaholic

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

Workaholic

Travis

Workaholic is distributed execFile worker using Redis for work(task) assign, written with javascript(node.js)

Architecture

workaholic architecture v1.1

workaholic data structure v1.2

  • Redis : use for task queueing, ticket storing

  • boss/boss.js : fork and control workers forever

    • worker/worker.js : workers, get tasks from Redis
  • front/front.js : front-desk, registers task to Redis

Installation

git clone https://github.com/flrngel/workaholic
cd workaholic
npm install

worklist.json

worklist.json is for use to execute file(execFile)

It is highly recommended not to use interpreter applications for security reasons, execute as your own signle script.

{
	"<task name>": {
		"execFile" : "<File to execute>",
		"options": {
			// see available options from http://nodejs.org/api/child_process.html#child_process_child_process_execfile_file_args_options_callback
		}
	}
}

config.json

config.json is for use to control Workaholic(boss, worker, front)

{
	// redis configuration
	"redis":{
		"host": "localhost",
		"port": 6379,
		// ticket time to live - work ticket(key in redis) expire time(redis expire). -1 to permanent
		"ticket_ttl": 60,
		// authentication using redis auth command, removable
		"password": "<insert_your_redis_auth_password>"
	},
	// front-desk configuration
	"front":{
		// listening port
		"port": 8007,
		// authentication for front-desk, removable
		"password": "<insert_your_password>"
	},
	// worker configuration
	"worker":{
		// number of workers
		"number": 4,
		// wait time
		"sleeptime": 100
	}
}

front/front.js (response type: json)

GET /info

Get Workaholic package information

POST /work/new

request

{
	"ticketing(optional;boolean type)": true,
	"data": {
		"taskName(string type)": "<task anme>",
		"argument(array type, strings)": ["<arg1>","<arg2>..."]
	}
}

response

{
	"result": (true|false),
	"ticket(optional)": <ticket uuid>
}

GET /work/status

request

/work/status?ticket=<ticket uuid>

response

  • queue: task is in queue pool

  • assigned: worker assigned task

  • end: task was successfully ended

  • error: task had error

Roadmap (todo list)

  • architecture security improvement (status: unstable)
  • front-desk access list
  • benchmark test
  • worker status
  • thin worker
  • task tracking
  • boss controller
  • workers with different tasklist

Keywords

workaholic

FAQs

Package last updated on 03 Jun 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts