Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Cluster Configuration for JRuby, using Terracotta.
Java Shell JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
jmaglev
src
.gitignore
Readme.markdown
clustering_jruby.patch
pom.xml

Readme.markdown

Step-by-step to run the JMaglev demo

  1. Pull from github:

    git clone git://github.com/fabiokung/clustered-jruby.git
    
  2. Long time waiting, because terracotta-2.7.1 (vanilla) and jruby-complete (patched) are bundled.

  3. Change to the project directory:

    cd clustered-jruby
    
  4. Build it:

    mvn install
    

    (although mvn package is enough)

  5. Change to the jmaglev demo directory:

    cd jmaglev
    
  6. Start the terracotta server:

    lib/terracotta-2.7.1/bin/start-tc-server.sh
    
  7. Open another two terminals

  8. Run the simplified jirb inside them:

    cd clustered-jruby/jmaglev
    ./bin/jmaglev jmaglev.rb
    
  9. Follow the demo. You will be able to share global variables among all jmaglevs:

    require 'hat'
    $hat
    require 'rabbit'
    $hat.put(Rabbit.new)
    
  10. in the other terminal, try to see the magic hat contents:

    $hat
    
Something went wrong with that request. Please try again.