Go to file
Colin Surprenant 4438c208e2 fix paths and jar generation 2011-11-04 17:47:48 -04:00
bin maven deps, unpacking, jar generation 2011-11-04 16:04:29 -04:00
examples remote production cluster example topology 2011-11-04 17:47:14 -04:00
lib fix paths and jar generation 2011-11-04 17:47:48 -04:00
src/main/redstorm/storm/jruby using ruby-maven gem, refactored dir layout and build strategy 2011-11-03 18:33:33 -04:00
.gitignore using ruby-maven gem, refactored dir layout and build strategy 2011-11-03 18:33:33 -04:00
CHANGELOG.md gem rake task wrapper for executable 2011-11-04 00:23:00 -04:00
LICENSE.md added license info 2011-10-31 17:44:14 -04:00
README.md added license info 2011-10-31 17:44:14 -04:00
Rakefile fix paths and jar generation 2011-11-04 17:47:48 -04:00
pom.xml pom output directory 2011-11-04 16:32:43 -04:00
redstorm.gemspec maven deps, unpacking, jar generation 2011-11-04 16:04:29 -04:00

README.md

Storm JRuby integration

This project is a first try for integrating JRuby in Storm. It is currently possible to write bolts and spouts and also the topology creation/launcher in Ruby.

The Exclamation Topology and the Word Count Topology have been rewritten in Ruby in the examples/ directory.

disclaimer/limitations

  • No effort yet has been made to produce better/idiomatic Ruby interface. This is as close as possible to the Java interface. Over time I may introduce a more Ruby-esque interface.

  • I haven't deployed JRuby topologies into a real Storm cluster yet. Currently all this has been only tested dev mode on the LocalCluster. I will be working on packaging & deployment next.

dependencies

This has been tested on OSX 10.6.8 using Storm 0.5.3 and JRuby 1.6.4 & 1.6.5

Ruby gems support is provided by jruby-complete.jar. By default only jruby.jar is included with the JRuby installation but does not support gems.

Until this is better integreted in this project, you MUST download jruby-complete.jar from http://jruby.org/download and edit the Rakefile and bin/redstorm to update JRUBY_JAR with the path to your jruby-complete.jar

environment

setup

IMPORTANT these two steps MUST be done otherwise nothing will run!

  • Edit Rakefile and set JRUBY_JAR to your jruby-complete.jar, see dependencies section
  • Edit bin/redstorm and set JRUBY_JAR to your jruby-complete.jar, see dependencies section

Also, if you don't use RVM, you should! :P

build

Building is typically required only once.

$ rake deps
$ rake build
  • rake deps will call the lein script to install the required Java libraries in the storm/lib directory.
  • rake build will compile the required Java & Ruby bindings.

usage

run

  • First create a topology class that implements the start method. The underscore class filename MUST correspond to the CamelCase class name.

  • Use the bin/redstorm launcher with the path to your Ruby topology class file as parameter. See examples below.

examples

$ bin/redstorm examples/ruby_exclamation_topology.rb
$ bin/redstorm examples/ruby_exclamation_topology2.rb
$ bin/redstorm examples/ruby_word_count_topology.rb

This next example requires the use of a Redis server on localhost:6379

$ bin/redstorm examples/ruby_redis_word_count_topology

author

Colin Surprenant, @colinsurprenant, colin.surprenant@needium.com, colin.surprenant@gmail.com, http://github.com/colinsurprenant

license

Apache License, Version 2.0. See the LICENSE.md file.