github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

MagLev / maglev

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 214
    • 7
  • Source
  • Commits
  • Network (7)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (13)
    • MagLev-22816
    • MagLev-22804
    • MagLev-22780
    • MagLev-22725
    • MagLev-22710
    • MagLev-22683
    • MagLev-22635
    • MagLev-22624
    • MagLev-22619
    • MagLev-22603
    • MagLev-22578
    • MagLev-22549
    • MagLev-22477
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

GemStone Maglev Ruby Repository — Read more

  cancel

http://maglev.gemstone.com

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Merge in latest submodules 
Monty Williams (author)
Tue Feb 09 10:14:28 -0800 2010
commit  dcaf381de8de75ae41004582d1d056d455acd2f6
tree    cf5ed5eb093b5def477575e61952a35f952bea0e
parent  91b2d594a991d66481b7e6dd9ed29ca6e87443c8 parent  ab46671e97995e693f39c063948955278302e735
maglev /
name age
history
message
file .gitignore Tue Dec 15 18:22:12 -0800 2009 Another attempt to reduce bloat from unneeded f... [Monty Williams]
file .gitmodules Mon Apr 13 14:56:49 -0700 2009 Added ruby-benchmark-suite submodule [Monty Williams]
file Changes Wed Feb 03 09:14:21 -0800 2010 Fixed type in Changes. Modified maglev-irb desc... [Monty Williams]
file LICENSES.txt Mon Dec 22 18:10:43 -0800 2008 Renamed LICENSES back to LICENSES.txt for Mac O... [pbm]
directory Licenses/ Wed Dec 09 10:26:18 -0800 2009 Added a GeoNames.org attribution in the License... [Monty Williams]
file README.rdoc Tue Feb 02 18:13:04 -0800 2010 Update docs for 22816 [Monty Williams]
file README2.rdoc Wed Feb 03 09:14:21 -0800 2010 Fixed type in Changes. Modified maglev-irb desc... [Monty Williams]
file Rakefile Mon Nov 23 22:43:36 -0800 2009 Backing out last change. Problem was a regex pr... [Monty Williams]
file THANKS Tue Jan 12 10:56:36 -0800 2010 Updates to docs for upcoming release. [Monty Williams]
submodule benchmark - 2f30e9a Tue Feb 09 10:11:10 -0800 2010 Updated submodules to 9-Feb-2010 version [Monty Williams]
directory bin/ Mon Feb 01 15:26:16 -0800 2010 Add two of Markus' fixes to get IRB to run [pbm]
file debug.mspec Tue Jul 21 13:37:47 -0700 2009 Tweak spec debug target [pbm]
file default.mspec Mon Aug 10 11:15:24 -0700 2009 Update spec files and tags so that rake spec:ci... [pbm]
directory docs/ Wed Feb 03 09:14:21 -0800 2010 Fixed type in Changes. Modified maglev-irb desc... [Monty Williams]
directory etc/ Tue Feb 02 18:27:45 -0800 2010 Added updated SunOS keyfile [Monty Williams]
directory examples/ Mon Jan 25 14:41:42 -0800 2010 kdtree: removed workaround for Trac 634 [pbm]
directory gci/ Mon Jul 21 08:10:27 -0700 2008 Initial copy of maglev repository, before Allen... [Monty Williams]
file install.sh Mon Jan 11 17:20:28 -0800 2010 DRY'd up installer a bit in prep for working un... [Monty Williams]
directory lib/ Tue Feb 02 16:17:13 -0800 2010 IRB: Back out workaround for Trac 659 [pbm]
file passing.mspec Wed Oct 21 21:28:09 -0700 2009 Fixed regex problem in passing.mspec that cause... [Monty Williams]
directory rakelib/ Tue Feb 09 10:11:10 -0800 2010 Updated submodules to 9-Feb-2010 version [Monty Williams]
directory spec/ Tue Feb 09 10:11:10 -0800 2010 Updated submodules to 9-Feb-2010 version [Monty Williams]
directory src/ Tue Feb 09 10:14:28 -0800 2010 Merge in latest submodules [Monty Williams]
file update.sh Mon Jan 11 17:20:28 -0800 2010 DRY'd up installer a bit in prep for working un... [Monty Williams]
file version.txt Tue Feb 02 18:14:50 -0800 2010 Updates for 22816 [Monty Williams]
README.rdoc

MagLev Alpha

Minimum Requirements

  • 64-bit hardware. There are no plans for a 32-bit version.
  • 64-bit Linux, Mac OS X, or Solaris X86 operating system
  • a version of ruby and rake to use during installation
  • root access so you can increase default shared memory settings (only during initial install)

Getting started

Create a MagLev directory. Its name doesn’t matter. Put the installer or git clone there. It needs to be writable, as files are put there by installations and updates. If you install using RVM (rvm.beginrescueend.com), it will use ~/.rvm or the rvm_path specified in your .rvmrc.

Installing the zipped version

We recommend this version unless you want to participate in MagLev development or want access to the absolute latest code. It changes more slowly than the github version, and it has undergone more testing.

You’ll need to know a version number to install. The MagLev Alpha version on 02-Feb-10 is 22816. Check for later versions on Twitter or the MagLev Discussion Google Group.

First, download and unzip the installer from maglev.gemstone.com/files/MagLev-installer.zip

The first time you install MagLev use installMaglev.sh. It checks that your hardware will run MagLev, and sets appropriate shared memory settings. It’s safe to run multiple times, it won’t overwrite things it’s already done. Subsequently, use upgradeMaglev.sh. It skips the checks run by installMaglev.sh. You must supply the version number as a parameter, e.g.

  ./installMaglev.sh 22816
  ./upgradeMaglev.sh 22816

The installer is somewhat verbose. That’s so you can more easily debug installation problems.

Note: This installer/updater creates a separate (sub)directory for each new version of MagLev. Reverting to an older version is as simple as stopping MagLev, changing $MAGLEV_HOME to point to the prior version, and restarting.

Installing from the github repository

This version is best for MagLev contributors and for developers who want to live on the bleeding edge or use git functionality. It can be less stable than the zipped version.

First, clone the MagLev github repository, i.e.

  git clone git://github.com/MagLev/maglev.git

and cd to the resulting directory.

To use MagLev, you need to run install.sh at least once. After that, everytime you do a ‘git pull’ you need to run update.sh to ensure you have the corresponding GemStone 3.x binaries. Otherwise, you might get version skew that prevents MagLev from running correctly. I’ll tweet about any ‘git only’ updates, but if you’re more than one update behind you still might need to run update.sh. You don’t need to know a version number to install. The installer/updater figures that out from the version.txt file.

You’ll have all the functionality of git, but unless you create a new clone for each release, you may be unable to revert to an earlier version. Why? The install/upgrade script creates a new copy of the MagLev data repository including persistent kernel code. The scripts make one level of backup, but we won’t be providing migration scripts during Alpha.

Installing under RVM

RVM is useful if you want to compare behavior of various Ruby implementations or versions of MagLev. Install using rvm install maglev. See rvm.beginrescueend.com for details of using RVM.

RVM will automatically start a MagLev server when you rvm use maglev. That server is left running if you rvm use any_other_Ruby. To stop your MagLev server run rvm use maglev; maglev stop.

Note: maglev stop will only stop the version of MagLev currently in use. If you’re using more than one, you’ll have to maglev stop each of them — e.g. rvm use maglev-22816; maglev stop; rvm use maglev-head; maglev stop.

ProTip: To kill all the MagLev servers rather than shut them down gracefully, run ps -ef | grep /sys/stoned and kill the stoned processes that show up. It takes a short time before they shut down, as they do a bit of cleanup first.

Note: When running rake from MagLev, you cannot perform tasks which affect MagLev itself, like rake maglev:stop. You have to use the bin/maglev shell script instead.

Running MagLev

Start the server by either running rake maglev:start from within your $MAGLEV_HOME directory tree, or running maglev start (which counts on $MAGLEV_HOME being set and $MAGLEV_HOME/bin being in your $PATH. If you have RVM installed, you can run rvm use maglev.

Useful commands include maglev-irb, maglev-ruby, and maglev-gem. MagLev code is in src, examples are in examples, some docs are in html. You’ll find a few README files, too.

Stop the server by running rake maglev:stop or maglev stop.

Tips and troubleshooting

  • rake needs to be in your PATH. It’s needed to install and to bootstrap MagLev. You shouldn’t install the rake gem into MagLev — it won’t work.
  • You need to start MagLev before running "maglev-ruby", "maglev-gem", or "maglev-irb". Either "rake maglev:start" or "maglev start" will do that. While not strictly required it’s better to stop MagLev before turning off your machine. i.e. "rake maglev:stop" or "maglev stop".
  • If you get this error when running maglev:start:
      rake aborted!
      Don't know how to build task 'maglev:start'
    

    it indicates rake wasn’t found during installation and so important steps were skipped. You can re-run the installer, or try this:

      rake stone:create[maglev]
    
  • if you get an error starting maglev-irb, try "maglev-irb -f". It’s likely something in your .irbrc is breaking maglev-irb.
  • RubyGems 1.3.5 is preinstalled. The command to use it is "maglev-gem". For example: "maglev-gem install sinatra" will install both Sinatra and Rack into MagLev. Gems that use C extensions won’t work. Many other gems may install, but not work correctly at this time. :-(
  • If you get an error like this when running "maglev-gem":
      line 8: require: command not found
    

    it indicates your system thinks "maglev-gem" is a shell script. The first line of "maglev-gem" should be:

      #!/usr/bin/env maglev-ruby
    

    If it’s not, either reinstall MagLev or correct the first line of bin/maglev-gem

  • If you get a "NoMethodError" such as the following:
          Coercion error: nil.to_str => String failed:
      (NoMethodError: undefined method `to_str' for )
    

    It will help us debug it if you send a stack trace. Setting "-d" in the environment variable MAGLEV_OPTS should leave you at a topaz prompt when you hit the error. Then execute the following sequence of commands. Be aware you may see a lot of output, which will also wind up in the file "stack.out"

      output push stack.out
      where
      stack
      output pop
    

    Other useful MAGLEV_OPTS switches include "traceload", i.e.:

      export MAGLEV_OPTS="-d -MtraceLoad"
    

    for more info on MAGLEV_OPTS type "maglev-ruby -h"

  • MagLev has ACID transactions. To share persistent objects between two running VM’s you need to make use of Maglev.commit_transaction and Maglev.abort_transaction. Read the persistence-api docs for more info.
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server