<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Fabio Kung &#187; maglev</title>
	<atom:link href="http://fabiokung.com/tag/maglev/feed/" rel="self" type="application/rss+xml" />
	<link>http://fabiokung.com</link>
	<description>Deleting code. Better than writing good code.</description>
	<lastBuildDate>Tue, 27 Dec 2011 02:37:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='fabiokung.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/4774c20e8f8313df1d4528a77be5a951?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Fabio Kung &#187; maglev</title>
		<link>http://fabiokung.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://fabiokung.com/osd.xml" title="Fabio Kung" />
	<atom:link rel='hub' href='http://fabiokung.com/?pushpress=hub'/>
		<item>
		<title>Play with JMaglev yourself</title>
		<link>http://fabiokung.com/2008/11/22/play-with-jmaglev-yourself/</link>
		<comments>http://fabiokung.com/2008/11/22/play-with-jmaglev-yourself/#comments</comments>
		<pubDate>Sat, 22 Nov 2008 20:59:04 +0000</pubDate>
		<dc:creator>Fabio Kung</dc:creator>
				<category><![CDATA[cluster]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jruby]]></category>
		<category><![CDATA[maglev]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[terracotta]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[jmaglev]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://fabiokung.wordpress.com/?p=109</guid>
		<description><![CDATA[JMaglev is finally public available! I&#8217;m releasing my experiments with JRuby and Terracotta, so you can play with JMaglev and contribute some code. The project is in Github. I had to patch JRuby to make RubyObjects a little less dependent from the JRuby Runtime. It isn&#8217;t perfect yet, but is working. The patch against the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fabiokung.com&amp;blog=3424388&amp;post=109&amp;subd=fabiokung&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>JMaglev is finally public available!</p>
<p>I&#8217;m releasing my experiments with <a href="http://fabiokung.com/2008/10/08/jruby-sharing-objects-across-multiple-runtimes-jmaglev">JRuby and Terracotta</a>, so you can play with JMaglev and contribute some code. The project is in <a href="http://github.com/fabiokung/clustered-jruby/tree/master">Github</a>.</p>
<p>I had to patch <a href="http://jruby.codehaus.org">JRuby</a> to make RubyObjects a little less dependent from the JRuby Runtime. It isn&#8217;t perfect yet, but is working. The <a href="http://github.com/fabiokung/clustered-jruby/tree/master/clustering_jruby.patch">patch against the current jruby trunk</a> (<em>rev. 8091</em>) and the patched jruby-complete are included in the <a href="http://github.com/fabiokung/clustered-jruby/tree/master">project</a>.</p>
<p>The code in Github is just a <strong>TIM</strong> (<strong>T</strong>erracotta <strong>I</strong>ntegration <strong>M</strong>odule) with a sample maven project and the JMaglev use-case included. Unfortunately, I haven&#8217;t any time yet to upload the TIM to Terracotta Forge. BTW, does anyone know how to do this?</p>
<p>For those who want to reproduce my JMaglev demo, here is a step-by-step. You must have <a href="http://git.or.cz/">GIT</a>, <a href="http://maven.apache.org">Maven 2</a> and the <a href="http://java.sun.com">JDK</a> properly installed. It only works on Linux and OS X. Is anyone wanting to contribute support for Windows users?</p>
<ol>
<li><code>git clone git://github.com/fabiokung/clustered-jruby.git</code></li>
<li>long time waiting, because terracotta-2.7.1 (vanilla) and jruby-complete (patched) are bundled.</li>
<li><code>cd clustered-jruby</code></li>
<li><code>mvn install</code> (although <code>mvn package</code> is enough)</li>
<li><code>cd jmaglev</code></li>
<li>start the terracotta server: <br />
<code>lib/terracotta-2.7.1/bin/start-tc-server.sh</code></li>
<li>open another two terminals</li>
<li>run the simplified jirb inside them:</li>
<p><code>
<pre>cd clustered-jruby/jmaglev
./bin/jmaglev jmaglev.rb</pre>
<p></code></li>
<li>Follow the demo. You will be able to share global variables among all jmaglevs:<br />
<pre class="brush: ruby;">
require 'hat'
$hat
require 'rabbit'
$hat.put(Rabbit.new)
</pre>
</li>
<li>in the other terminal, try to see the <strong>magic hat</strong> contents:<br />
<pre class="brush: ruby;">
$hat
</pre>
</li>
</ol>
<p>I haven&#8217;t tested it with rails applications, but right now, it isn&#8217;t able to run IRB. I never thought that running IRB could be <strong>so</strong> hard. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>More drawbacks and limitations are being discussed in the <a href="http://archive.codehaus.org/lists/org.codehaus.jruby.user/msg/da6044750811221230q2d7d6d20jc1fd16cd52d6707e@mail.gmail.com">JRuby Users Mailing List</a>.</p>
<p>I hope to see many contributions. Happy hacking!</p>
<br />Posted in cluster, java, jruby, maglev, ruby, terracotta Tagged: cluster, github, jmaglev, jruby, maglev, opensource, terracotta <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fabiokung.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fabiokung.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fabiokung.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fabiokung.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fabiokung.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fabiokung.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fabiokung.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fabiokung.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=fabiokung.com&amp;blog=3424388&amp;post=109&amp;subd=fabiokung&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://fabiokung.com/2008/11/22/play-with-jmaglev-yourself/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/251c190c5a8277a3bc6197491f32da51?s=96&#38;d=wavatar&#38;r=PG" medium="image">
			<media:title type="html">Fabio Kung</media:title>
		</media:content>
	</item>
	</channel>
</rss>
