<?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/"
	>

<channel>
	<title>Xavier Llorà &#187; Crochet</title>
	<atom:link href="http://www.xavierllora.net/tag/crochet/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.xavierllora.net</link>
	<description>A notebook about data-intensive computing, genetics-based machine learning, semantic-web technology, cloud computing,  and more.</description>
	<lastBuildDate>Thu, 15 Jul 2010 19:50:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Meandre 2.0 Alpha Preview = Scala + MongoDB</title>
		<link>http://www.xavierllora.net/2010/07/15/meandre-2-0-alpha-preview-scala-mongodb/</link>
		<comments>http://www.xavierllora.net/2010/07/15/meandre-2-0-alpha-preview-scala-mongodb/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 19:45:00 +0000</pubDate>
		<dc:creator>Xavier</dc:creator>
				<category><![CDATA[Data-Intensive Computing]]></category>
		<category><![CDATA[Meandre]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Crochet]]></category>
		<category><![CDATA[Derby]]></category>
		<category><![CDATA[JENA]]></category>
		<category><![CDATA[meandre]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[RDF]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[Snare]]></category>

		<guid isPermaLink="false">http://www.xavierllora.net/?p=697</guid>
		<description><![CDATA[A lot of water under the bridge has gone by since the first release of Meandre 1.4.X series. In January I went back to the drawing board and start sketching what was going to be 1.5.X series. The slide deck embedded above is a extended list of the thoughts during the process. As usual, I [...]


Related posts:<ol><li><a href='http://www.xavierllora.net/2010/01/21/fast-rest-api-prototyping-with-crochet-and-scala/' rel='bookmark' title='Permanent Link: Fast REST API prototyping with Crochet and Scala'>Fast REST API prototyping with Crochet and Scala</a></li>
<li><a href='http://www.xavierllora.net/2009/12/01/meandre-is-going-scala/' rel='bookmark' title='Permanent Link: Meandre is going Scala'>Meandre is going Scala</a></li>
<li><a href='http://www.xavierllora.net/2008/12/02/meandre-infrastructure-14-rc1-tagged/' rel='bookmark' title='Permanent Link: Meandre Infrastructure 1.4 RC1 tagged'>Meandre Infrastructure 1.4 RC1 tagged</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><center><br />
<object width="425&type=s" height="348"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=meandre2-0alpha-preview-100715140140-phpapp01"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=meandre2-0alpha-preview-100715140140-phpapp01"  type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425&type=s" height="348"></embed></object><br />
</center></p>
<p>A lot of water under the bridge has gone by since the first release of <a href="http://seasr.org/meandre/download/">Meandre 1.4.X series</a>. In January I went back to the drawing board and start sketching what was going to be 1.5.X series. The slide deck embedded above is a extended list of the thoughts during the process. As usual, I started collecting feedback from people using 1.4.X in production, things that worked, things that needed improvement, things that were just plain over complicated. The hot recurrent topics that people using 1.4.X could be mainly summarized as:</p>
<ul>
<li>Complex execution concurrency model based on traditional semaphores written in Java (mostly my maintenance nightmare when changes need to be introduced)</li>
<li>Server performance bounded by <a href="http://jena.sourceforge.net/">JENA</a>&#8216;s persistent model implementation</li>
<li>State caching on individual servers to boost performance increases complexity of single-image cluster deployments</li>
<li>Could-deployable infrastructure, but not cloud-friendly infrastructure</li>
</ul>
<p>As I mentioned, these elements where the main ingredients to target for 1.5.X series. However as the redesign moved forward, the new version represented a radical disruption from 1.4.X series and eventually turned up to become the 2.0 Alpha version described here. The main changes that forced this transition are:</p>
<ul>
<li>Cloud-friendly infrastructure required rethinking of the core functionalities</li>
<li>Drastic redesign of the back-end state storage</li>
<li>Revisited flow execution engine to support flow execution</li>
<li>Changes on the API that render returned JSON documents incompatible with 1.4.X</li>
</ul>
<p>Meandre 2.0 (currently already available in the the <a href="http://dev-tools.seasr.org/fisheye/browse/Meandre-Infrastructure">SVN trunk</a>) has been rewritten from scratch using <a href="http://www.scala-lang.org/">Scala</a>. That decision was motivated to benefit from the Actor model provided by <a href="http://www.scala-lang.org/">Scala</a> (modeled after <a href="http://www.erlang.org/">Erlang</a>&#8216;s actors). Such model greatly simplify the mechanics of the infrastructure, but it also powered the basis of Snowfield (the effort to create a scalable distributed flow execution engine for Meandre flows). Also, the <a href="http://www.scala-lang.org/">Scala</a> language expressiveness has greatly reduced the code based size (2.0 code base is roughly 1/3 of the size of 1.4.X series) greatly simplifying the maintenance activities the infrastructure will require as we move forward.</p>
<p>The second big change that pushed the 2.0 Alpha trigger was the redesign of the back end state storage. 1.4.X series heavily relied on the relational storage for persistent RDF models provided by JENA. For performance reasons, <a href="http://jena.sourceforge.net/">JENA</a> caches the model in memory and mostly assumes ownership of the model. Hence, if you want to provide a single-image Meandre cluster you need to inject into <a href="http://jena.sourceforge.net/">JENA</a> cache coherence mechanics, greatly increasing the complexity. Also, the relational implementation relies on the mapping model into a table and triple into a row (this is a bit of a simplification). That implies that large number of SQL statements need to be generated to update models, heavily taxing the relational storage when changes on user repository data needs to be introduced.</p>
<p>An ideal cloud-friendly Meandre infrastructure should not maintain state (neither voluntarily, neither as result of <a href="http://jena.sourceforge.net/">JENA</a> back end). Thus, a fast and scalable back end storage could allow infrastructure servers to maintain no state and be able to provide the appearance of a single image cluster. After testing different alternatives, their community support, and development roadmap, the only option left was <a href="http://www.mongodb.org/">MongoDB</a>. Its setup simplicity for small installations and its ability to easily scale to large installations (including cloud-deployed ones) made <a href="http://www.mongodb.org/">MongoDB</a> the candidate to maintain state for Meandre 2.0. This was quite a departure from 1.4.x series, where you had the choice to store state via <a href="http://jena.sourceforge.net/">JENA</a> on an embedded <a href="http://db.apache.org/derby/">Derby</a> or an external <a href="http://www.mysql.com/">MySQL</a> server.</p>
<p>A final note on the building blocks that made possible 2.0 series. Two other side projects where started to support the development of what will become Meandre 2.0.X series:</p>
<ol>
<li><a href="http://github.com/xllora/Crochet">Crochet</a>: <a href="http://github.com/xllora/Crochet">Crochet</a> targets to help quickly prototype REST APIs relying on the flexibility of the Scala language. The initial ideas for Crochet were inspired after reading Gabriele Renzi post on creating a picoframework with Scala (see <a href="http://www.riffraff.info/2009/4/11/step-a-scala-web-picoframework">http://www.riffraff.info/2009/4/11/step-a-scala-web-picoframework</a>) and the need for quickly prototyping APIs for pilot projects. Crochet also provides mechanisms to hide repetitive tasks involved with default responses and authentication/authorization piggybacking on the mechanics provided by application servers.</li>
<li><a href="http://github.com/xllora/Snare">Snare</a>: <a href="http://github.com/xllora/Snare">Snare</a> is a coordination layer for distributed applications written in Scala and relies and <a href="http://www.mongodb.org/">MongoDB</a> to implement its communication layer. <a href="http://github.com/xllora/Snare">Snare</a> implements a basic heartbeat system and a simple notification mechanism (peer-to-peer and broadcast communication). Snare relies on <a href="http://www.mongodb.org/">MongoDB</a> to track heartbeat and notification mailboxes.</li>
</ol>


<p>Related posts:<ol><li><a href='http://www.xavierllora.net/2010/01/21/fast-rest-api-prototyping-with-crochet-and-scala/' rel='bookmark' title='Permanent Link: Fast REST API prototyping with Crochet and Scala'>Fast REST API prototyping with Crochet and Scala</a></li>
<li><a href='http://www.xavierllora.net/2009/12/01/meandre-is-going-scala/' rel='bookmark' title='Permanent Link: Meandre is going Scala'>Meandre is going Scala</a></li>
<li><a href='http://www.xavierllora.net/2008/12/02/meandre-infrastructure-14-rc1-tagged/' rel='bookmark' title='Permanent Link: Meandre Infrastructure 1.4 RC1 tagged'>Meandre Infrastructure 1.4 RC1 tagged</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xavierllora.net/2010/07/15/meandre-2-0-alpha-preview-scala-mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fast REST API prototyping with Crochet and Scala</title>
		<link>http://www.xavierllora.net/2010/01/21/fast-rest-api-prototyping-with-crochet-and-scala/</link>
		<comments>http://www.xavierllora.net/2010/01/21/fast-rest-api-prototyping-with-crochet-and-scala/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 14:59:59 +0000</pubDate>
		<dc:creator>Xavier</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[APIs]]></category>
		<category><![CDATA[Crochet]]></category>
		<category><![CDATA[meandre]]></category>
		<category><![CDATA[REST]]></category>
		<category><![CDATA[scala]]></category>
		<category><![CDATA[SEASR]]></category>

		<guid isPermaLink="false">http://www.xavierllora.net/?p=650</guid>
		<description><![CDATA[I just finished committing the last changes to Crochet and tagged version 0.1.4vcli now publicly available on GitHub (http://github.com/xllora/Crochet). Also feel free to visit the issues page in case you run into question/problems/bugs. Motivation Crochet is a light weight web framework oriented to rapid prototyping of REST APIs. If you are looking for a Rails [...]


Related posts:<ol><li><a href='http://www.xavierllora.net/2010/07/15/meandre-2-0-alpha-preview-scala-mongodb/' rel='bookmark' title='Permanent Link: Meandre 2.0 Alpha Preview = Scala + MongoDB'>Meandre 2.0 Alpha Preview = Scala + MongoDB</a></li>
<li><a href='http://www.xavierllora.net/2009/12/01/meandre-is-going-scala/' rel='bookmark' title='Permanent Link: Meandre is going Scala'>Meandre is going Scala</a></li>
<li><a href='http://www.xavierllora.net/2008/11/13/fast-mutation-implementation-for-genetic-algorithms-in-python/' rel='bookmark' title='Permanent Link: Fast mutation implementation for genetic algorithms in Python'>Fast mutation implementation for genetic algorithms in Python</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I just finished committing the last changes to <em>Crochet</em> and tagged version 0.1.4vcli now publicly available on GitHub (<a href="http://github.com/xllora/Crochet">http://github.com/xllora/Crochet</a>).  Also feel free to visit the <a href="http://github.com/xllora/Crochet/issues">issues</a> page in case you run into question/problems/bugs.</p>
<h2>Motivation</h2>
<p><em>Crochet</em> is a light weight web framework oriented to rapid prototyping of REST APIs. If you are looking for a <a href="http://rubyonrails.org/">Rails</a> like framework written in <a href="http://www.scala-lang.org/">Scala</a>, please take a look at Lift at <a href="http://liftweb.net/">http://liftweb.net/</a> instead.</p>
<p><a href="http://github.com/xllora/Crochet">Crochet</a> targets quick prototyping of REST APIs relying on the flexibility of the <a href="http://www.scala-lang.org/">Scala</a> language. The initial ideas for Crochet were inspired while reading Gabriele Renzi post on creating the <a href="http://www.riffraff.info/2009/4/11/step-a-scala-web-picoframework">STEP</a> picoframework with <a href="http://www.scala-lang.org/">Scala</a> and the need for quickly prototyping APIs for pilot projects. <em>Crochet</em> also provides mechanisms to hide repetitive tasks involved with default responses and authentication/authorization piggybacking on the mechanics provided by application servers.</p>
<h2>Who uses Crochet?</h2>
<p><em>Crochet</em> was born from the need for quickly prototyping REST APIs which required exposing legacy code written in Java. I have been actively using <a href="http://github.com/xllora/Crochet">Crochet</a> to provide REST APIs for a variety of projects developed at the <a href="http://www.ncsa.illinois.edu">National Center for Supercomputing Applications</a>. One of the primary adopters and movers of <em>Crochet</em> is the <a href="http://seasr.org/meandre/">Meandre</a> Infrastructure for data-intensive computing developed under the <a href="http://seasr.org/">SEASR</a> project.</p>
<h2>Crochet in 2 minuts</h2>
<p>Before you start please check you have <a href="http://www.scala-lang.org/">Scala</a> installed on your system. You can find more information on how to get Scala up and running <a href="http://www.scala-lang.org/downloads">here</a>.</p>
<ol>
<li>Get the latest <em>Crochet</em> jar from the <a href="http://github.com/xllora/Crochet/downloads">Downloads</a> section at <a href="http://github.com/xllora/Crochet/">GitHub</a> and the third party dependencies. </li>
<li>Copy the following code into a file named <code>hello-world.scala</code>.

<div class="wp_syntax"><div class="code"><pre class="scala" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">import</span> crochet.<span style="color: #000080;">_</span>
<span style="color: #0000ff; font-weight: bold;">new</span> Crochet <span style="color: #F78811;">&#123;</span>
     get<span style="color: #F78811;">&#40;</span><span style="color: #6666FF;">&quot;/message&quot;</span><span style="color: #F78811;">&#41;</span> <span style="color: #F78811;">&#123;</span> 
         <span style="color: #000080;">&lt;</span>html<span style="color: #000080;">&gt;</span>
               <span style="color: #000080;">&lt;</span>head<span style="color: #000080;">&gt;&lt;</span>title<span style="color: #000080;">&gt;</span>Hello World<span style="color: #000080;">&lt;</span>/title<span style="color: #000080;">&gt;&lt;</span>/head<span style="color: #000080;">&gt;</span>
               <span style="color: #000080;">&lt;</span>body<span style="color: #000080;">&gt;&lt;</span>h1<span style="color: #000080;">&gt;</span>Hello World<span style="color: #000080;">!&lt;</span>/h1<span style="color: #000080;">&gt;&lt;</span>/body<span style="color: #000080;">&gt;</span>
         <span style="color: #000080;">&lt;</span>/html<span style="color: #000080;">&gt;</span>
     <span style="color: #F78811;">&#125;</span>
<span style="color: #F78811;">&#125;</span> on <span style="color: #F78811;">8080</span></pre></div></div>

</li>
<li>Get your server up and running by running (please change the version number if needed)
<pre>$ scala -cp crochet-0.1.4.jar:crochet-3dparty-libraries-0.1.X.jar hello-world.scala</pre>
</li>
<p>You just have your first _Crochet_ API up and running. You can check the API working by opening your browser and pointing it to <a href="http://localhost:8080/message">http://localhost:8080/message</a> and you should get the message <code>Hello World!</code> back.</p>
<h2>Where to go from here?</h2>
<p>You will find more information on the <a href="http://wiki.github.com/xllora/Crochet/">Crochet wiki</a> at <a href="http://github.com/xllora/Crochet">GitHub</a>. The wiki contains basic information as a QuickStart guide (which also includes how to deal with static content), descriptions of the basic concepts used in <em>Crochet</em>, and several examples that can get up and running fast. </p>


<p>Related posts:<ol><li><a href='http://www.xavierllora.net/2010/07/15/meandre-2-0-alpha-preview-scala-mongodb/' rel='bookmark' title='Permanent Link: Meandre 2.0 Alpha Preview = Scala + MongoDB'>Meandre 2.0 Alpha Preview = Scala + MongoDB</a></li>
<li><a href='http://www.xavierllora.net/2009/12/01/meandre-is-going-scala/' rel='bookmark' title='Permanent Link: Meandre is going Scala'>Meandre is going Scala</a></li>
<li><a href='http://www.xavierllora.net/2008/11/13/fast-mutation-implementation-for-genetic-algorithms-in-python/' rel='bookmark' title='Permanent Link: Fast mutation implementation for genetic algorithms in Python'>Fast mutation implementation for genetic algorithms in Python</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.xavierllora.net/2010/01/21/fast-rest-api-prototyping-with-crochet-and-scala/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
