Skip to content

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
openmason committed Dec 27, 2012
1 parent b143871 commit a1c5b9a
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 18 deletions.
1 change: 1 addition & 0 deletions History.md
@@ -1,4 +1,5 @@
# release 0.2.0
* cloudd with new structures ready on npm
* major change, kue is dropped and new data structures introduced

# release 0.1.0
Expand Down
89 changes: 71 additions & 18 deletions README.md
Expand Up @@ -2,24 +2,77 @@
# cloudd
node.js cloud engine

# Features
* allows user to define a workflow (set of tasks together constitute a job)
1. Job `HelloWorld` could comprise of two tasks
* `Hello` Task
* `World` Task, this step to be executed only on successful completion of `Hello`
* Any time you run `HelloWorld`, both these tasks would be run one after another
* instantiate jobs _cron_ style
* see examples for couple of real world examples

**ALPHA product, use at your risk**
# Basics
* Task - is an smallest unit of processing, should be idempotent
* Job - collection of tasks with dependencies (acyclic)

## API's
1. cloudd.submit (identifier, workflow-definition) - submit job once
1. cloudd.submitAt(cron-config, identifier, workflow-definition) - submit job as specified by cron-config

## Debug logs
To enable full debug logs, add these two lines to your code
# Features
* job execution engine
* Task could be a javascript unit or executable that would be exec'ed
* Command line to check the status of jobs, tasks and current running processes
* Command line Submit of jobs
* instantiate jobs _cron_ style
* Good unit test coverage

winston=require('winston');
winston.default.transports.console.level = 'info';
## Upcoming
* Failure of tasks to be handled
* Job load balancing among cloudd hosts
* Persistence of state
* clustering among cloudd hosts

# Example
* Lets see how to define a Hello My World Job
1. Job `Hello My World` comprise of three tasks
* `Hello` Task
* `My` Task
* `World` Task
2. Dependencies
* `My` would be run only after `Hello`
* `World` would be run only after `My`
* Sample yaml config file would look like (see in examples/hellomyworld.yaml)
```yaml
name: Hello World
description:
Sample 'hello my world' job
jobs:
my:
executable: echo "my"
hello:
executable: echo "hello"
world:
executable: echo "world"
dependencies:
- my-world:
parent: [my]
child: [world]
- hello-my:
parent: [hello]
child: [my]
```
* To run this example

# terminal 1
cloudd server

# terminal 2
cloudd examples/hellomyworld.yaml

## Usage
To run the server

cloudd server

Command line utilities

# to show current running tasks
cloudd ps

# to show total tasks that are ready to run (ordered list)
cloudd tasks

# to show total jobs in the system (non-completed)
cloudd jobs

# to submit a new job
cloudd submit sample-job-file.yaml

0 comments on commit a1c5b9a

Please sign in to comment.