IronWorker
An easy-to-use scalable task queue that gives cloud developers a simple way to offload front-end tasks, run scheduled jobs, and process tasks in the background and at scale.
Code Samples Easy to use. Multi-Language. Massively Scalable.
- Create Workers
- Upload Workers
- Queue Workers
- Schedule Workers
- cURL
- Ruby
- Python
- PHP
- Node.js
- Java
- .NET
- Go
- cURL
- Ruby
- Python
- PHP
- Node.js
- Java
- .NET
- Go
- cURL
- Ruby
- Python
- PHP
- Node.js
- Java
- .NET
- Go
- cURL
- Ruby
- Python
- PHP
- Node.js
- Java
- .NET
- Go
# Create zip file containing all of the files your project needs.
# Worker code can be anything you want.
puts "Payload: #{params}"
puts "Simulating hard work for 5 seconds..."
5.times do |i|
puts "Sleep #{i}..."
sleep 1
end
puts "Completed at #{Time.now}"
print "Hello from IronWorker!\n"
// Worker code can be anything you want.
echo "payload:";
print_r(getPayload());
echo "Simulating hard work for 5 seconds...";
for ($i = 1; $i <= 5; $i++) {
echo "Sleep $i\n";
sleep(1);
}
echo "Completed at ".date('r');
console.log("Hello from IronWorker!")
public class HelloWorker {
public static void main(String[] args) {
System.out.println("Hello from IronWorker");
}
}
using System;
using System.IO;
public class HelloWorld
{
static public void Main(string[] args)
{
Console.WriteLine( "Starting HelloWorker at " + string.Format("{0:HH:mm:ss tt}", DateTime.Now));
int ind = Array.IndexOf(args, "-payload");
}
}
package main
import "fmt"
func main() {
fmt.Println("Hello from IronWorker!\n")
}
# Upload Worker
curl -H "Authorization: OAuth TOKEN" -X POST \
-F "file=@worker.zip;type=application/zip" \
-F 'data={"file_name": "hello_worker.rb","name": "hello","runtime": "ruby"}' \
"https://worker-aws-us-east-1.iron.io/2/projects/PROJECT_ID/codes"
# define the runtime language
runtime 'ruby'
# exec is the file that will be executed:
exec 'hello_worker.rb'
Step 2: Upload Worker
$ iron_worker upload hello
# define the runtime language
runtime 'python'
# exec is the file that will be executed:
exec 'hello_worker.py'
Step 2: Upload Worker
$ iron_worker upload hello
# define the runtime language
runtime 'php'
# exec is the file that will be executed:
exec 'hello_worker.php'
Step 2: Upload Worker
$ iron_worker upload hello
# define the runtime language
runtime 'node'
# exec is the file that will be executed:
exec 'hello_worker.js'
Step 2: Upload Worker
$ iron_worker upload hello
# define the runtime language
runtime 'java'
# exec is the file that will be executed:
exec 'hello_worker.jar'
Step 2: Upload Worker
$ iron_worker upload hello
# define the runtime language
runtime 'mono'
# exec is the file that will be executed:
exec 'hello_worker.exe'
Step 2: Upload Worker
$ iron_worker upload hello
# define the runtime language
runtime 'go'
# exec is the file that will be executed:
exec 'hello_worker.go'
Step 2: Upload Worker
$ iron_worker upload hello
# Queue task with payload {"foo": "bar"}
curl -H "Authorization: OAuth TOKEN" -H "Content-Type: application/json" \
-d '{"tasks": [{"code_name": "hello", "payload": "{\"foo\": \"bar\"}"}]}' \
"https://worker-aws-us-east-1.iron.io/2/projects/PROJECT_ID/tasks"
require "iron_worker_ng"
client = IronWorkerNG::Client.new
# launch 100 tasks in parallel
100.times do
client.tasks.create("hello", foo: "bar")
end
from iron_worker import *
worker = IronWorker(token="IRON_IO_TOKEN", project_id="IRON_IO_PROJECT_ID")
response = worker.postTask(name="hello", payload={"foo": "bar"})
<?php
require("phar://iron_worker.phar");
$worker = new IronWorker();
$worker->postTask("hello", array('foo' => bar));
var ironWorker = require('iron_worker');
var client = new ironWorker.Client();
client.tasksCreate('hello', {foo: 'bar'}, {}, function(error, body) {
console.log(body);
});
import io.iron.ironworker.client.Client;
import io.iron.ironworker.client.entities.TaskEntity;
import io.iron.ironworker.client.builders.Params;
import io.iron.ironworker.client.builders.TaskOptions;
Client client = new Client("IRON_IO_TOKEN", "IRON_IO_PROJECT_ID");
TaskEntity t = client.createTask("hello", Params.create("foo", "bar"));
# Queuing from code not supported yet but you can queue from the command line
$ iron_worker queue hello -p '{"foo":"bar"}'
# Queuing from code not supported yet but you can queue from the command line
$ iron_worker queue hello -p '{"foo":"bar"}'
# Run task once per hour
curl -H "Authorization: OAuth TOKEN" -H "Content-Type: application/json" \
-d '{"schedules":[{"payload":"{}","name":"hello","code_name":"hello","run_every": 3600}]}' \
"https://worker-aws-us-east-1.iron.io/2/projects/PROJECT_ID/schedules"
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
# Run task once per hour at high priority
$ iron_worker schedule hello --start-at "2013-01-01T00:00:00-04:00" \
--run-every 3600 --priority 2
Features
-
Easy to UseUpload workers and run them seamlessly in the cloud. Get running in minutes and add instant scheduling and background / big-data processing.
-
Runs Your CodeWrite workers as if to run in your app but then simply upload and run them in IronWorker. Works with Ruby, Python, PHP, Java, .NET, Node, Go and more.
-
Massively ScalableRun many tasks at once – tens, hundreds, thousands. No need to stand up servers or manage queues. Scales to handle whatever workload you send it.
-
Reliable and SecureUses SSL connections and runs each task in a Linux-protected LXC sandbox. Uses OAuth2 to provide simplicity, flexibility, scalability, and security.
-
Multi-PlatformConnect to it directly or through cloud platforms such as Heroku, AppFog, EngineYard, and AppHarbor. Runs on industrial-strength cloud infrastructure.
-
AffordableOnly your actual processing time is counted. Gain instant scalability and eliminate having to manage your own servers, worker queues, and schedulers.
-
Flexible SchedulingSchedule jobs to run in the future using flexible scheduling options. Run once, a set number of times, on a recurring schedule, and many options in between.
-
Monitoring / NotificationsCheck the status of tasks and view logs. View graphs of task usage, get alerts and notifications, and stay on top of queued, running, and completed tasks.
-
Celery/Resque/Delayed Job Easy replacement for Celery, Resque, Delayed Job, and other worker systems. Switch from self-managed to a scalable service with no setup / no maintenance.
Comparison Matrix How IronWorker compares with other task queues.
| IronWorker | Heroku Workers | Celery | Resque | |
|---|---|---|---|---|
| High Performance Task Queue | YES | YES | YES | YES |
| Workers as a Service(no maintenance) | YES | YES | NO | NO |
| High Availability | YES | NO | NO | NO |
| Massively Scalable | YES | NO | NO | NO |
| Elastic(automatic scaling) | YES | NO | NO | NO |
| Automatic Retries | YES | NO | NO | NO |
| Max Concurrency(fine grained) | YES | NO | NO | NO |
| Redundant/Failover | YES | NO | NO | NO |
| Backed Up | YES | NO | NO | NO |
| Webhook Support | YES | NO | NO | NO |
| Shareable | YES | NO | NO | NO |
| Dashboard | YES | NO | NO | NO |
| Reporting & Analytics | YES | NO | NO | NO |
| Email Reports | YES | NO | NO | NO |
| Authentication | OAuth2 | None | None | None |
| Languages | Python, Ruby, PHP, .NET, Java, Clojure, Node.js, Go + binary code | Python, Ruby, Java, Node.js | Python | Ruby |
Screenshots Our HUD/Dashboard helps you manage your workers and tasks.
Resources
No credit card required. All the more reason to move async processing to the cloud.