Step-by-step to run the JMaglev demo
-
Pull from github:
git clone git://github.com/fabiokung/clustered-jruby.git
-
Long time waiting, because terracotta-2.7.1 (vanilla) and jruby-complete (patched) are bundled.
-
Change to the project directory:
cd clustered-jruby
-
Build it:
mvn install
(although
mvn package
is enough) -
Change to the jmaglev demo directory:
cd jmaglev
-
Start the terracotta server:
lib/terracotta-2.7.1/bin/start-tc-server.sh
-
Open another two terminals
-
Run the simplified jirb inside them:
cd clustered-jruby/jmaglev ./bin/jmaglev jmaglev.rb
-
Follow the demo. You will be able to share global variables among all jmaglevs:
require 'hat' $hat require 'rabbit' $hat.put(Rabbit.new)
-
in the other terminal, try to see the magic hat contents:
$hat