disbatch 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README +28 -0
  2. data/lib/disbatch.rb +1 -1
  3. metadata +12 -1
data/README CHANGED
@@ -0,0 +1,28 @@
1
+ Disbatch is a distributed, multi-language batch processing platform. This package provides both a client library and execution node implementation.
2
+
3
+ The current packaging is a bit raw, but an earlier version of this has been successfully used in production for a number of tasks, including mass mailing, user migrations and load generation.
4
+
5
+ If you have mongod installed and running, the daemon should start without parameters or configuration, and queues and tasks can be created interactively through a ruby shell or programatically through a script:
6
+
7
+ [mberg@c6 ~]$ irb
8
+ irb(main):001:0> require 'rubygems'
9
+ => true
10
+ irb(main):002:0> require 'disbatch'
11
+ => true
12
+ irb(main):003:0> q = Disbatch::Queue.create('Disbatch::Plugin::Hello')
13
+ => #<Disbatch::Queue:0x7f9e38d78948 @id="4eea39ce250c600d5d000001", @plugin="Disbatch::Plugin::Hello">
14
+ irb(main):004:0> q.push( { 'name' => 'Matt' } )
15
+ => #<Disbatch::Queue:0x7f9e38d78948 @id="4eea39ce250c600d5d000001", @plugin="Disbatch::Plugin::Hello">
16
+
17
+ In order to facilitate plugin development, tasks can also be executed without running an execution node; e.g.
18
+
19
+ irb(main):005:0> require 'disbatch/plugin/hello.rb'
20
+ Registered Disbatch::Plugin::Hello
21
+ irb(main):006:0> t = q.pop
22
+ => #<Disbatch::Queue::Task:0x7f9e38d56460 @id=BSON::ObjectId('4eea3a9a250c600d5d000003'), @parameters=#<BSON::OrderedHash:0x3fcf1c6abf14 {"name"=>"Matt"}>, @queue=#<Disbatch::Queue:0x7f9e38d78948 @id="4eea39ce250c600d5d000001", @plugin="Disbatch::Plugin::Hello">>
23
+ irb(main):007:0> t.execute!
24
+ Executed task with params: #<BSON::OrderedHash:0x3fcf1c6abf14 {"name"=>"Matt"}>
25
+ => 1
26
+
27
+
28
+ Feel free to ask questions or feedback through mail, or message me on freenode. I'm usually logged in as "mberg" even if I am not available.
data/lib/disbatch.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Disbatch
2
2
 
3
3
  # engine version
4
- VERSION = 'rdisbatch 0.0.5'
4
+ VERSION = 'rdisbatch 0.0.6'
5
5
  # specification version
6
6
  SPEC_VERSION = '1.9'
7
7
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: disbatch
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.5
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Matthew Berg
@@ -57,6 +57,17 @@ dependencies:
57
57
  version: "0"
58
58
  type: :runtime
59
59
  version_requirements: *id004
60
+ - !ruby/object:Gem::Dependency
61
+ name: eventmachine
62
+ prerelease: false
63
+ requirement: &id005 !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ type: :runtime
70
+ version_requirements: *id005
60
71
  description: "\t\tDisbatch is a distributed, multi-language batch processing\n\
61
72
  \t\tplatform.\tThis package provides both a client library and\n\
62
73
  \t\texecution node implementation.\n"