Coder Social home page Coder Social logo

jawns's Introduction

JAWNS: Job scheduling with Amazon Web services and Nothing Shared

Running a series of batch jobs on a set of machines is a frequent, but annoying, task. Running things manually scales ok up to a few jobs, but beyond that it is hard to track progress. Setting up a proper cluster job management system like Slurm or Sun/Oracle Grid Engine takes a bit of work. Additionally, proper cluster job managers aren't happy with a time-varying set of worker nodes, e.g., if your cluster is built out of AWS EC2 instances or CloudLab nodes. Jawns is designed to bootstrap itself from scratch in under a minute.

The core idea of JAWNS is to use Amazon Web Services to manage the job queue, and all communication to/from worker nodes. All communication takes place via AWS data structures, making communication fast and reliable in the face of network outages. The Jawns programs themselves can then maintain as little state as possible.

Requirements

  • the worker nodes need Java โ‰ฅ1.8 installed (just the JRE, no JDK needed)
  • the startup command needs passwordless-ssh access to each worker node, to launch the worker daemon
  • the worker nodes, and Jawns commands, need internet access

No shared filesystem (e.g., NFS), or direct communication between Jawns components (e.g., via sockets), is required.

Building & Running

After clong the repo, fill in your AWS credentials (access key and secret key) in src/main/resources/aws-credentials.properties (see the sample file for the required format). These credentials need to grant full access to the AWS services that Jawns uses: SQS, SES, S3 and DynamoDB.

Then build the JAR file via maven:

mvn package

Then create a list of worker node hostnames, one line per file, in workers.txt. Finally, you can run a Jawns command:

java -jar target/jawns-1.0-SNAPSHOT-jar-with-dependencies.jar --workers workers.txt --project test --command status

Typical workflow

  1. Write a Java program that links against the Jawns JAR and calls boolean submitJobs(List<Job> theJobs) to submit jobs to the cluster. See example code.
  2. Launch worker daemons on the worker nodes via the startup command
  3. Gather results from the worker daemons via the gather command
  4. There are a variety of other commands for checking job status, cancelling jobs, etc. Run Jawns with --help for more details.

There's no need for the job submission, startup, gather or other commands to be run from the same machine, since all state is stored in AWS, making each command essentially stateless. A notable exception is the gather command, which saves output to the local machine.

Features

  • send email on job completion/failure
  • transfer files to/from workers before/after job completes
  • a job can be killed after a timeout is hit
  • can create multiple, independent Jawns clusters

jawns's People

Contributors

devietti avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.