<?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>Elastic Grid Blog &#187; rio</title>
	<atom:link href="http://blog.elastic-grid.com/category/rio/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.elastic-grid.com</link>
	<description>Where Dynamicity Meets the Cloud</description>
	<lastBuildDate>Fri, 05 Feb 2010 13:15:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Slides of the Elastic Grid BoF at JavaZone 08</title>
		<link>http://blog.elastic-grid.com/2008/09/21/slides-of-the-elastic-grid-bof-at-javazone-08/</link>
		<comments>http://blog.elastic-grid.com/2008/09/21/slides-of-the-elastic-grid-bof-at-javazone-08/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 10:25:03 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[amazon s3]]></category>
		<category><![CDATA[amazon sqs]]></category>
		<category><![CDATA[elastic grid]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[rio]]></category>
		<category><![CDATA[typica]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/?p=73</guid>
		<description><![CDATA[
The slides of the BoF on Elastic Grid and EC2 are finally available!
Thanks for all of you who could come. We had some interesting discussions and feedback after the talk.
This is the first time I had a chance to go to JavaZone and I must say it&#8217;s been quite interesting. A few friends and I [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><object width="425" height="348"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=javazone08bof-1222018393337662-8"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=javazone08bof-1222018393337662-8"  type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="348"></embed></object><!-- ysttest:Array
(
    [id] => 610165&amp;doc=javazone08bof-1222018393337662-8&amp;w=425
)
--></p>
<p><a href="https://elastic-grid-presentations.s3.amazonaws.com/JavaZone08-BoF.pdf">The slides of the BoF on Elastic Grid and EC2 are finally available</a>!</p>
<p>Thanks for all of you who could come. We had some interesting discussions and feedback after the talk.<br />
This is the first time I had a chance to go to <a href="http://www.javazone.no">JavaZone</a> and I must say it&#8217;s been quite interesting. A few friends and I had the opportunity to discuss with <a href="http://javazone.no/incogito/session/How+to+please+your+wife+-+The+leap+from+strategy+to+implementation+.html">Tom J. Bang</a> who gave us the opportunity to taste local stuff.</p>
<p>I also had the opportunity to discuss with a lot of people there: my friends from our local user group (<a href="http://glaforge.free.fr/weblog/">Guillaume Laforge</a>, <a href="http://blog.julienviet.com/">Julien Viet</a>, <a href="http://blogs.sun.com/alexismp">Alexis Moussine-Pouchkine</a>, <a href="http://www.coffeebreaks.org/blogs/">Jerome Lacoste</a>) but also <a href="http://www.davisworld.org">Scott Davis</a> and <a href="http://weblogs.java.net/blog/eitan/">Eitan Suez</a>. (Sorry for all the other ones I forgot to cite.)</p>
<p>For those of you who could not make it for <a href="http://blog.elastic-grid.com/2008/08/29/elastic-grid-talk-at-javazone-08/">our BoF session</a>, the organizers of the JavaZone event will provide a video. I&#8217;ll update the blog when the video is available.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/09/21/slides-of-the-elastic-grid-bof-at-javazone-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rio 4.0 M1</title>
		<link>http://blog.elastic-grid.com/2008/08/21/rio-40-m1/</link>
		<comments>http://blog.elastic-grid.com/2008/08/21/rio-40-m1/#comments</comments>
		<pubDate>Thu, 21 Aug 2008 10:07:04 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/?p=58</guid>
		<description><![CDATA[We are pleased to announce that Rio 4.0 M1 has been released and is available for download at http://www.rio-project.org and also on https://rio.dev.java.net
This milestone release is significant, and provides important enhancements and bug fixes. An overview of some of the enhancements follow:
External Service executionThe Rio execution framework provides the ability to encapsulate the control and monitoring of [...]]]></description>
			<content:encoded><![CDATA[<p>We are pleased to announce that Rio 4.0 M1 has been released and is available for download at <a href="https://www.rio-project.org/" target="_blank">http://www.rio-project.org</a> and also on <a href="https://rio.dev.java.net/" target="_blank">https://rio.dev.java.net</a></p>
<p>This milestone release is significant, and provides important enhancements and bug fixes. An overview of some of the enhancements follow:</p>
<p><strong>External Service execution</strong><br/>The Rio execution framework provides the ability to encapsulate the control and monitoring of external services. Service control adapters represent applications/services, adding network wide visibility and control. Using this approach, we can attach monitoring, metering and SLA control to existing applications. You can have a look at the tutorial here:<br/><a href="http://www.rio-project.org/confluence/display/rug/Service+Exec+Introduction" target="_blank">http://www.rio-project.org/confluence/display/rug/Service+Exec+Introduction</a>
</p>
<p><strong>Data staging</strong><br/>Provides the ability to download artifacts that a service needs to process. More information can be obtained here:<br/><a href="http://www.rio-project.org/confluence/display/rug/Data+Staging+and+Persistent+Provisioning" target="_blank">http://www.rio-project.org/confluence/display/rug/Data+Staging+and+Persistent+Provisioning</a>
</p>
<p><strong>ServiceBean fork &amp; exec</strong><br/>The ability to instantiate a service in it&#8217;s own JVM. This option provides the flexibility to create a new JVM for a service that is best executed in it&#8217;s own JVM, instead of contained withint the CYbernode in a multi-service JVM
</p>
<p><strong>Groovy integration</strong><br/>The parsing of the OperationalString is quite complex. Adding groovy to make this part of Rio more maintainable is a key contribution. Based on this ability we will also be creating a Groovy Domain Specific Language (DSL). You can view examples both in the distribution and online here:<br/><a href="http://www.rio-project.org/confluence/display/rug/Instantiation+Properties" target="_blank">http://www.rio-project.org/confluence/display/rug/Instantiation+Properties</a>
</p>
<p><strong>Package name change</strong><br/>We are moving from the org.jini.rio namespace to the org.rioproject namespace. We realize this is a big change, but it is a needed change. The current package namespace has Rio under <a href="http://jini.org/" target="_blank">jini.org</a>. This namespace is no longer relevant
</p>
<p><strong>License change</strong><br/>We have moved to LGPLv3
</p>
<p><strong>UI enhancements</strong><br/>A number of enhancements have been added to the new Rio UI, including better visualization of contained services, Watch Viewer value displays and deployment graph orientation
</p>
<p><strong>Service selection strategies</strong><br/>All association proxies have a service selection strategy. The service selection strategy provides a way to determine how services in the collection of discovered services are invoked. The current service selection strategies are fail-over, round-robin and utilization (note all service selection strategies will also prefer local services over remote services).
</p>
<p>The release notes are available on Jira:<br/><a href="http://www.rio-project.org/jira/secure/ReleaseNote.jspa?projectId=10000&amp;styleName=Html&amp;version=10010" target="_blank">http://www.rio-project.org/jira/secure/ReleaseNote.jspa?projectId=10000&amp;styleName=Html&amp;version=10010</a></p>
<p>Please note also that some work has been started in the Wiki:<br/><a href="http://www.rio-project.org/confluence" target="_blank">http://www.rio-project.org/confluence</a></p>
<p>We welcome you to download and try the 4.0 M1 release. All feedback is  welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/08/21/rio-40-m1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to write a Groovy DSL for Rio</title>
		<link>http://blog.elastic-grid.com/2008/07/08/how-to-write-a-groovy-dsl-for-rio/</link>
		<comments>http://blog.elastic-grid.com/2008/07/08/how-to-write-a-groovy-dsl-for-rio/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 15:14:08 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[groovy]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2008/07/08/how-to-write-a-groovy-dsl-for-rio/</guid>
		<description><![CDATA[Rio currently uses deployment descriptor files written in XML, which indicates the services you&#8217;d like to deploy, which cybernodes your service could run into, how you&#8217;d like to scale or relocate your services, etc.
That XML format, although quite extensible is also quite verbose, so a Domain Specific Language (DSL for short), means a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>Rio currently uses deployment descriptor files written in XML, which indicates the services you&#8217;d like to deploy, which cybernodes your service could run into, how you&#8217;d like to scale or relocate your services, etc.</p>
<p>That XML format, although quite extensible is also quite verbose, so a Domain Specific Language (<acronym title="Domain Specific Language">DSL</acronym> for short), means a lot of sense in that context in order to reduce verbosity.</p>
<p>In order to ease the code for such a <acronym title="Domain Specific Language">DSL</acronym>, Rio deployment descriptors (called OpStrings) parsing was rewritten using Groovy. This is something which turned out to be quite easy actually and is mostly done. I spent about 4 or 5 days on this task, including writing some Groovy Tests in order to reduce the risk of regression. This work is interesting because I was able to at least cut the code to half its initial size and it is now more easy to read, hence maintain.</p>
<p>Armed with this test suite, I started to work on the <acronym title="Domain Specific Language">DSL</acronym>. The option I have taken is to transform the <acronym title="Domain Specific Language">DSL</acronym> syntax into the current XML file and then use the <em>usual</em> XML parser. The trade off is that it minimize the work needed to be done but of course it would be better to use the <acronym title="Domain Specific Language">DSL</acronym> in order to create the Java model already using when parsing the XML format (this is still being discussed).</p>
<p>So here is how it looks like. Below is the XML format taken from one of Rio examples:<br />
[sourcecode language='xml']<br />
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?><br />
<!DOCTYPE opstring SYSTEM "java://org/jini/rio/dtd/rio_opstring.dtd"><br />
<opstring><br />
    <operationalString Name="Calculator"><br />
        <groups><br />
            <group>rio</group><br />
        </groups></p>
<p>        <resources id="impl.jars"><br />
            <jar>calculator/lib/calculator.jar</jar><br />
        </resources></p>
<p>        <resources id="client.jars"><br />
            <jar>calculator/lib/calculator-dl.jar</jar><br />
        </resources></p>
<p>        <serviceBean Name="Calculator"><br />
            <interfaces><br />
                <interface>calculator.Calculator</interface><br />
                <resources ref="client.jars"/><br />
            </interfaces><br />
            <implementationClass Name="calculator.service.CalculatorImpl"><br />
               <resources ref="impl.jars"/><br />
            </implementationClass></p>
<p>            <associations><br />
                <association Name="Add" Type="requires" Property="add"/><br />
                <association Name="Subtract" Type="requires" Property="subtract"/><br />
                <association Name="Multiply" Type="requires" Property="multiply"/><br />
                <association Name="Divide" Type="requires" Property="divide"/><br />
            </associations></p>
<p>            <maintain>1</maintain><br />
        </serviceBean></p>
<p>        <serviceBean Name="Add"><br />
            <interfaces><br />
                <interface>calculator.Add</interface><br />
                <resources ref="client.jars"/><br />
            </interfaces><br />
            <implementationClass Name="calculator.service.AddImpl"><br />
                <resources ref="impl.jars"/><br />
            </implementationClass><br />
            <maintain>1</maintain><br />
        </serviceBean></p>
<p>        <serviceBean Name="Subtract"><br />
            <interfaces><br />
                <interface>calculator.Subtract</interface><br />
                <resources ref="client.jars"/><br />
            </interfaces><br />
            <implementationClass Name="calculator.service.SubtractImpl"><br />
                <resources ref="impl.jars"/><br />
            </implementationClass><br />
            <maintain>1</maintain><br />
        </serviceBean></p>
<p>        <serviceBean Name="Multiply"><br />
            <interfaces><br />
                <interface>calculator.Multiply</interface><br />
                <resources ref="client.jars"/><br />
            </interfaces><br />
            <implementationClass Name="calculator.service.MultiplyImpl"><br />
                <resources ref="impl.jars"/><br />
            </implementationClass><br />
            <maintain>1</maintain><br />
        </serviceBean></p>
<p>        <serviceBean Name="Divide"><br />
            <interfaces><br />
                <interface>calculator.Divide</interface><br />
                <resources ref="client.jars"/><br />
            </interfaces><br />
            <implementationClass Name="calculator.service.DivideImpl"><br />
                <resources ref="impl.jars"/><br />
            </implementationClass><br />
            <maintain>1</maintain><br />
        </serviceBean></p>
<p>    </operationalString><br />
</opstring><br />
[/sourcecode]</p>
<p>Here is now the <acronym title="Domain Specific Language">DSL</acronym> in action for the same example:<br />
[sourcecode language='java']<br />
opstring(name:&#8217;Calculator&#8217;) {<br />
    groups(&#8216;rio&#8217;)</p>
<p>    resources(id: &#8216;impl.jars&#8217;, &#8216;calculator/lib/calculator.jar&#8217;)<br />
    resources(id: &#8216;client.jars&#8217;, &#8216;calculator/lib/calculator-dl.jar&#8217;)</p>
<p>    service(name: &#8216;Calculator&#8217;) {<br />
        interfaces {<br />
            classes(&#8216;calculator.Calculator&#8217;)<br />
            resources(ref: &#8216;client.jars&#8217;)<br />
        }<br />
        implementation(class: &#8216;calculator.service.CalculatorImpl&#8217;) {<br />
            resources(ref: &#8216;impl.jars&#8217;)<br />
        }<br />
        associations {<br />
            association(name: &#8216;Add&#8217;, type: &#8216;requires&#8217;, property: &#8216;add&#8217;)<br />
            association(name: &#8216;Subtract&#8217;, type: &#8216;requires&#8217;, property: &#8217;subtract&#8217;)<br />
            association(name: &#8216;Multiply&#8217;, type: &#8216;requires&#8217;, property: &#8216;multiply&#8217;)<br />
            association(name: &#8216;Divide&#8217;, type: &#8216;requires&#8217;, property: &#8216;divide&#8217;)<br />
        }<br />
        maintain 1<br />
    }</p>
<p>    service(name: &#8216;Add&#8217;) {<br />
        interfaces {<br />
            classes(&#8216;calculator.Add&#8217;)<br />
            resources(ref: &#8216;client.jars&#8217;)<br />
        }<br />
        implementation(class: &#8216;calculator.service.AddImpl&#8217;) {<br />
            resources(ref: &#8216;impl.jars&#8217;)<br />
        }<br />
        maintain 1<br />
    }</p>
<p>    service(name: &#8216;Subtract&#8217;) {<br />
        interfaces {<br />
            classes(&#8216;calculator.Subtract&#8217;)<br />
            resources(ref: &#8216;client.jars&#8217;)<br />
        }<br />
        implementation(class: &#8216;calculator.service.SubtractImpl&#8217;) {<br />
            resources(ref: &#8216;impl.jars&#8217;)<br />
        }<br />
        maintain 1<br />
    }</p>
<p>    service(name: &#8216;Multiply&#8217;) {<br />
        interfaces {<br />
            classes(&#8216;calculator.Multiply&#8217;)<br />
            resources(ref: &#8216;client.jars&#8217;)<br />
        }<br />
        implementation(class: &#8216;calculator.service.MultiplyImpl&#8217;) {<br />
            resources(ref: &#8216;impl.jars&#8217;)<br />
        }<br />
        maintain 1<br />
    }</p>
<p>    service(name: &#8216;Divide&#8217;) {<br />
        interfaces {<br />
            classes(&#8216;calculator.Divide&#8217;)<br />
            resources(ref: &#8216;client.jars&#8217;)<br />
        }<br />
        implementation(class: &#8216;calculator.service.DivideImpl&#8217;) {<br />
            resources(ref: &#8216;impl.jars&#8217;)<br />
        }<br />
        maintain 1<br />
    }<br />
}<br />
[/sourcecode]</p>
<p>What&#8217;s interesting is that if you have a close look at the above syntax, you will notice that the Add, Sutract, Divide and Multiply services are configured quite the same. Wouldn&#8217;t it be nicer to define the configuration once for all those services?</p>
<p>This is something which is accomplished for free because the <acronym title="Domain Specific Language">DSL</acronym> is a Groovy script, so any Groovy syntax is valid in it:<br />
[sourcecode language='java']<br />
opstring(name:&#8217;Calculator&#8217;) {<br />
    groups &#8216;rio&#8217;</p>
<p>    resources id:&#8217;impl.jars&#8217;, &#8216;calculator/lib/calculator.jar&#8217;<br />
    resources id:&#8217;client.jars&#8217;, &#8216;calculator/lib/calculator-dl.jar&#8217;</p>
<p>    service(name: &#8216;Calculator&#8217;) {<br />
        interfaces {<br />
            classes &#8216;calculator.Calculator&#8217;<br />
            resources ref:&#8217;client.jars&#8217;<br />
        }<br />
        implementation(class:&#8217;calculator.service.CalculatorImpl&#8217;) {<br />
            resources ref:&#8217;impl.jars&#8217;<br />
        }<br />
        associations {<br />
            association name:&#8217;Add&#8217;, type:&#8217;requires&#8217;, property:&#8217;add&#8217;<br />
            association name:&#8217;Subtract&#8217;, type:&#8217;requires&#8217;, property:&#8217;subtract&#8217;<br />
            association name:&#8217;Multiply&#8217;, type:&#8217;requires&#8217;, property:&#8217;multiply&#8217;<br />
            association name:&#8217;Divide&#8217;, type:&#8217;requires&#8217;, property:&#8217;divide&#8217;<br />
        }<br />
        maintain 1<br />
    }</p>
<p>    ['Add', 'Subtract', 'Multiply', 'Divide'].each { s -><br />
        println &#8220;Service is $s&#8221;<br />
        service(name: s) {<br />
            interfaces {<br />
                classes &#8220;calculator.$s&#8221;<br />
                resources ref:&#8217;client.jars&#8217;<br />
            }<br />
            implementation(class: &#8220;calculator.service.${s}Impl&#8221;) {<br />
                resources ref:&#8217;impl.jars&#8217;<br />
            }<br />
            maintain 1<br />
        }<br />
    }<br />
}<br />
[/sourcecode]</p>
<p>Our OpString file has now been reduced from 71 lines to 34 ones!</p>
<p>The only drawback in that case is that using the <acronym title="Domain Specific Language">DSL</acronym> you loose the autocompletion provided by any good XML editor.</p>
<p>So how does the code look like for that DSL:<br />
[sourcecode language='java']<br />
class GroovyDSLOpStringParser implements OpStringParser {<br />
    def OpStringParser xmlParser = new XmlOpStringParser()<br />
    def static final Logger logger = Logger.getLogger(GroovyDSLOpStringParser.class.name);</p>
<p>    public List<opString> parse(Object source, ClassLoader loader, boolean verify, String[] defaultExportJars,<br />
                                String codebaseOverride, String[] defaultGroups, boolean processingOverrides,<br />
                                Object loadPath) {<br />
        logger.info &#8220;Parsing source $source&#8221;<br />
        ExpandoMetaClass.enableGlobally()</p>
<p>        def tempFile = File.createTempFile(&#8216;rio-dsl&#8217;, &#8216;xml&#8217;)<br />
        def writer = new FileWriter(tempFile)<br />
        def builder = new groovy.xml.MarkupBuilder(writer)<br />
        Script dslScript = new GroovyShell().parse(source)</p>
<p>        dslScript.metaClass = createEMC(dslScript.class, {<br />
            ExpandoMetaClass emc -><br />
            emc.opstring = { Map attributes, Closure cl -><br />
                builder.printer.println(&#8216;<!DOCTYPE opstring SYSTEM "java://org/jini/rio/dtd/rio_opstring.dtd">&#8216;)<br />
                builder.opstring {<br />
                    OperationalString(Name: attributes.name) { cl() }<br />
                }<br />
                writer.close()<br />
                xmlParser.parse(tempFile, loader, verify, defaultExportJars, codebaseOverride, defaultGroups,<br />
                                processingOverrides, loadPath)<br />
            }<br />
            emc.groups = { String&#8230; groups -><br />
                builder.Groups {<br />
                    groups.each { Group(it) }<br />
                }<br />
            }<br />
            emc.cluster = { String&#8230; machines -><br />
                builder.Cluster {<br />
                    machines.each { Machine(it) }<br />
                }<br />
            }<br />
            emc.service = { Map attributes, Closure cl -><br />
                builder.ServiceBean(Name: attributes.name) { cl() }<br />
            }<br />
            emc.serviceExec = { Map attributes, Closure cl -><br />
                builder.ServiceExec(Name: attributes.name) { cl() }<br />
            }<br />
            emc.spring = { Map attributes, Closure cl -><br />
                builder.SpringBean(Name: attributes.name, config: attributes.config) { cl() }<br />
            }<br />
            emc.interfaces = { Closure cl -><br />
                builder.Interfaces { cl() }<br />
            }<br />
            emc.implementation = { Map attributes, Closure cl -><br />
                builder.ImplementationClass(Name: attributes.class) { cl() }<br />
            }<br />
            emc.execute = { Map attributes -><br />
                builder.Exec(nohup: attributes.nohup ? &#8216;yes&#8217; : &#8216;no&#8217;) {<br />
                    if (attributes.inDirectory)<br />
                        WorkingDirectory(attributes.inDirectory)<br />
                    def String[] cmd = attributes.command.split()<br />
                    CommandLine(cmd[0])<br />
                    if (cmd.size() &#8211; 1 > 0)<br />
                        cmd[1..cmd.size() - 1].each { InputArg(it) }<br />
                }<br />
            }<br />
            emc.classes = { String&#8230; interfaceClasses -><br />
                interfaceClasses.each { builder.Interface(it) }<br />
            }<br />
            emc.resources = { String&#8230; resources -><br />
                builder.Resources {<br />
                    resources.each { JAR(it) }<br />
                }<br />
            }<br />
            emc.resources = { Map attributes -><br />
                builder.Resources(attributes)<br />
            }<br />
            emc.resources = { Map attributes, String&#8230; resources -><br />
                builder.Resources(id: attributes.id) {<br />
                    resources.each { JAR(it) }<br />
                }<br />
            }<br />
            emc.configuration = { String configuration -><br />
                builder.Configuration(configuration)<br />
            }<br />
            emc.associations = { Closure cl -><br />
                builder.Associations { cl() }<br />
            }<br />
            emc.association = { Map attributes -><br />
                builder.Association(Name: attributes.name, Type: attributes.type,<br />
                                    Property: attributes.property, MatchOnName: attributes.matchOnName ? &#8216;yes&#8217; : &#8216;no&#8217;)<br />
            }<br />
            emc.maintain = { Integer maintain -><br />
                builder.Maintain(maintain)<br />
            }<br />
            emc.maxPerMachine = { Integer max -><br />
                builder.MaxPerMachine(max)<br />
            }<br />
            emc.maxPerMachine = { Map attributes, Integer max -><br />
                if (attributes.type)<br />
                    builder.MaxPerMachine(max, type: attributes.type)<br />
                else<br />
                    builder.MaxPerMachine(max)<br />
            }<br />
            emc.software = { Map attributes -><br />
                builder.SystemRequirements {<br />
                    SystemComponent(Name: &#8216;SoftwareSupport&#8217;) {<br />
                        Attribute(Name: &#8216;Name&#8217;, Value: attributes.name)<br />
                        Attribute(Name: &#8216;Version&#8217;, Value: attributes.version)<br />
                    }<br />
                }<br />
            }<br />
            emc.software = { Map attributes, Closure cl -><br />
                builder.SystemRequirements {<br />
                    SystemComponent(Name: &#8216;SoftwareSupport&#8217;) {<br />
                        Attribute(Name: &#8216;Name&#8217;, Value: attributes.name)<br />
                        Attribute(Name: &#8216;Version&#8217;, Value: attributes.version)<br />
                        builder.SoftwareLoad(removeOnDestroy: attributes.removeOnDestroy ? &#8216;yes&#8217; : &#8216;no&#8217;) { cl() }<br />
                    }<br />
                }<br />
            }<br />
            emc.download = { Map attributes -><br />
                builder.Download(InstallRoot: attributes.installRoot,<br />
                                 Unarchive: attributes.unarchive ? &#8216;yes&#8217; : &#8216;no&#8217;, Source: &#8221;) {<br />
                    Location(attributes.source)<br />
                }<br />
            }<br />
            emc.postInstall = { Map attributes, Closure cl -><br />
                builder.PostInstall(RemoveOnCompletion: attributes.removeOnCompletion ? &#8216;yes&#8217;: &#8216;no&#8217;) { cl() }<br />
            }<br />
            emc.serviceLevelAgreements = { Closure cl -><br />
                builder.ServiceLevelAgreements { cl() }<br />
            }<br />
            emc.sla = { Map attributes, Closure cl -><br />
                builder.SLA(ID: attributes.id, Low: attributes.low, High: attributes.high) { cl() }<br />
            }<br />
            emc.policy = { Map attributes -><br />
                builder.PolicyHandler(type: attributes.type, max: attributes.max,<br />
                                      lowerDampener: attributes.lowerDampener, upperDampener: attributes.upperDampener)<br />
            }<br />
            emc.logging = { Closure cl -><br />
                builder.Logging { cl() }<br />
            }<br />
            emc.logger = { String name, Level level = Level.INFO, Closure cl -><br />
                builder.Logger(Name: name, Level:level.toString()) { cl() }<br />
            }<br />
            emc.handler = { String name, Level level = Level.INFO -><br />
                builder.Handler(ClassName: name, Level:level.toString())<br />
            }<br />
        })<br />
        List<opString> opstrings = dslScript.run()<br />
        return opstrings<br />
    }</p>
<p>    public parseElement(Object element, GlobalAttrs global, ParsedService sDescriptor, OpString opString) {<br />
        throw new UnsupportedOperationException()<br />
    }</p>
<p>    static ExpandoMetaClass createEMC(Class clazz, Closure cl) {<br />
        ExpandoMetaClass emc = new ExpandoMetaClass(clazz, false)<br />
        cl(emc)<br />
        emc.initialize()<br />
        return emc<br />
    }</p>
<p>}<br />
[/sourcecode]</p>
<p>As you can see, the above code uses the XML MarkupBuilder which makes it very easy to generate the XML format. After that, it&#8217;s just a matter of delegating the real work to the XML parser!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/07/08/how-to-write-a-groovy-dsl-for-rio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New tutorial on how to start Rio in Amazon EC2</title>
		<link>http://blog.elastic-grid.com/2008/04/28/new-tutorial-on-how-to-start-rio-in-amazon-ec2/</link>
		<comments>http://blog.elastic-grid.com/2008/04/28/new-tutorial-on-how-to-start-rio-in-amazon-ec2/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 06:07:32 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[elastic grid]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2008/04/28/new-tutorial-on-how-to-start-rio-in-amazon-ec2/</guid>
		<description><![CDATA[A new HOW-TO called How To Start Rio on Amazon EC2 has been published.
]]></description>
			<content:encoded><![CDATA[<p>A new HOW-TO called <a href="http://blog.elastic-grid.com/elastic-grid/how-to-start-rio-on-amazon-ec2/" title="How To Start Rio on Amazon EC2">How To Start Rio on Amazon EC2</a> has been published.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/04/28/new-tutorial-on-how-to-start-rio-in-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaOne BoF and let&#8217;s meet there&#8230;</title>
		<link>http://blog.elastic-grid.com/2008/04/18/javaone-bof-and-lets-meet-there/</link>
		<comments>http://blog.elastic-grid.com/2008/04/18/javaone-bof-and-lets-meet-there/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 07:10:41 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[amazon s3]]></category>
		<category><![CDATA[amazon sqs]]></category>
		<category><![CDATA[elastic grid]]></category>
		<category><![CDATA[rio]]></category>
		<category><![CDATA[bof]]></category>
		<category><![CDATA[javaone]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2008/04/18/javaone-bof-and-lets-meet-there/</guid>
		<description><![CDATA[As said previously, I&#8217;m going to JavaOne this year for a BoF on Elastic Grid.
I will arrive at San Francisco on April, 30th and leave by May, 13th.
If you&#8217;d like to talk to me when I&#8217;m there, feel free to drop me an email at jerome DOT bernard AT elastic-grid DOT com.
I would be pleased talking [...]]]></description>
			<content:encoded><![CDATA[<p>As said previously, I&#8217;m going to <a href="http://blog.elastic-grid.com/2008/02/02/elastic-grid-bof-at-javaone-08/">JavaOne this year for a BoF on Elastic Grid</a>.</p>
<p>I will arrive at San Francisco on April, 30th and leave by May, 13th.</p>
<p>If you&#8217;d like to talk to me when I&#8217;m there, feel free to drop me an email at jerome DOT bernard AT elastic-grid DOT com.</p>
<p>I would be pleased talking with you about Amazon services, Rio and Jini, or whatever else&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/04/18/javaone-bof-and-lets-meet-there/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IntelliJ plugin for Rio updated</title>
		<link>http://blog.elastic-grid.com/2008/04/10/intellij-plugin-for-rio-updated/</link>
		<comments>http://blog.elastic-grid.com/2008/04/10/intellij-plugin-for-rio-updated/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 10:06:54 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[IntelliJ IDEA]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2008/04/10/intellij-plugin-for-rio-updated/</guid>
		<description><![CDATA[The plugin for Rio has been updated in order to fix compatibility with the Mac platform, and in order to update the viewer to the latest changes in Rio.

]]></description>
			<content:encoded><![CDATA[<p>The plugin for Rio has been updated in order to fix compatibility with the Mac platform, and in order to update the viewer to the latest changes in Rio.<br />
<a href="http://blog.elastic-grid.com/wp-content/uploads/2008/04/rio-plugin-screenshot.PNG" title="Screenshot of IntelliJ plugin for Rio in action…"><img src="http://blog.elastic-grid.com/wp-content/uploads/2008/04/rio-plugin-screenshot.PNG" alt="Screenshot of IntelliJ plugin for Rio in action…" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/04/10/intellij-plugin-for-rio-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Update to the IntelliJ plugin for Rio</title>
		<link>http://blog.elastic-grid.com/2008/03/04/update-to-the-intellij-plugin-for-rio/</link>
		<comments>http://blog.elastic-grid.com/2008/03/04/update-to-the-intellij-plugin-for-rio/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 20:39:16 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[IntelliJ IDEA]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2008/03/04/update-to-the-intellij-plugin-for-rio/</guid>
		<description><![CDATA[The Rio plugin has been updated a few hours ago in order to provide support for Rio 3.3 M1.
Here is on the left a screenshot of it in action&#8230;

]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://blog.elastic-grid.com/intellij/rio/">Rio plugin</a> has been updated a few hours ago in order to provide support for <a href="https://rio.dev.java.net/download.html">Rio 3.3 M1</a>.</p>
<p>Here is on the left a screenshot of it in action&#8230;</p>
<p><a href="http://blog.elastic-grid.com/wp-content/uploads/2008/03/intellij-rio-plugin-07.png" title="IntelliJ IDEA plugin for Rio"><img src="http://blog.elastic-grid.com/wp-content/uploads/2008/03/intellij-rio-plugin-07.png" alt="IntelliJ IDEA plugin for Rio" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/03/04/update-to-the-intellij-plugin-for-rio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Elastic Grid BoF at JavaOne 08</title>
		<link>http://blog.elastic-grid.com/2008/02/02/elastic-grid-bof-at-javaone-08/</link>
		<comments>http://blog.elastic-grid.com/2008/02/02/elastic-grid-bof-at-javaone-08/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 08:26:03 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[elastic grid]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2008/02/02/elastic-grid-bof-at-javaone-08/</guid>
		<description><![CDATA[Update: the slides have been published!
Dennis Reedy and I have been selected as speakers for JavaOne 08.
Here is the abstract of our session called How can Amazon EC2 benefic from the Elastic Grid solution?
Amazon Elastic Compute Cloud (EC2) provides a fantastic way to deploy scalable machine images, but what to do when you want an [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update</strong>: <a href="http://blog.elastic-grid.com/2008/05/08/slides-of-the-elastic-grid-bof-at-javaone-08/">the slides have been published</a>!</p>
<p>Dennis Reedy and I have been selected as speakers for JavaOne 08.</p>
<p>Here is the abstract of our session called <em>How can Amazon EC2 benefic from the Elastic Grid solution?</em></p>
<blockquote><p>Amazon Elastic Compute Cloud (EC2) provides a fantastic way to deploy scalable machine images, but what to do when you want an application to scale across the machine images you have provisioned? This session discusses the Elastic Grid, an approach that provides dynamic allocation, management, and scalability of applications, using Amazon EC2 as the backbone. It also introduces the open-source technologies Elastic Grid is based on: Rio and Apache River (Jini™ network technology).The Elastic Grid provides an architecture for developing, deploying, and managing distributed applications composed of services. Key to the architecture are a set of dynamic capabilities and reliance on policy-based and quality-of-service mechanisms. The Elastic Grid reduces the complexity surrounding the development of dynamic services by introducing Jini network technology remoting for POJOs as well as by providing a simple component model.</p>
<p>The Elastic Grid extends Amazon EC2’s virtual grid environment, enabling users to manage and dynamically scale Amazon Machine Images (AMIs) based on declarable SLAs, as well as deal with partial failure of AMI instances. Rio reduces the complexity surrounding the development of dynamic services by introducing dynamic Jini network technology remoting for POJOs, as well as providing a simple component model.</p>
<p>The presentation demonstrates how IntelliJ plug-ins for Amazon EC2 and Rio ease building and deploying a sample application distributed over the Amazon EC2 grid. With the Elastic Grid solution, the application will scale on the Amazon EC2 grid by starting and stopping Amazon EC2 instances accordingly to declared SLAs (service-level agreements).</p></blockquote>
<p>We hope to see you there!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2008/02/02/elastic-grid-bof-at-javaone-08/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Control your Rio environment within IntelliJ IDEA</title>
		<link>http://blog.elastic-grid.com/2007/12/26/control-your-rio-environment-within-intellij-idea/</link>
		<comments>http://blog.elastic-grid.com/2007/12/26/control-your-rio-environment-within-intellij-idea/#comments</comments>
		<pubDate>Wed, 26 Dec 2007 17:36:05 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[elastic grid]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2007/12/26/control-your-rio-environment-within-intellij-idea/</guid>
		<description><![CDATA[We have released a few days ago a plugin for IntelliJ IDEA allowing you to control your Rio environment.
Basically this plugin allows to deploy new services, undeploy them and visually watch the state of the deployments. You can also launch administration UI of the services, which also mean increasing/trimming the number of instances of your services.
There [...]]]></description>
			<content:encoded><![CDATA[<p>We have released a few days ago <a href="http://blog.elastic-grid.com/intellij/rio/">a plugin for IntelliJ IDEA</a> allowing you to control your <a href="http://rio.dev.java.net">Rio</a> environment.</p>
<p>Basically this plugin allows to deploy new services, undeploy them and visually watch the state of the deployments. You can also launch administration UI of the services, which also mean increasing/trimming the number of instances of your services.</p>
<p>There is a screenshot of this plugin in <a href="http://blog.elastic-grid.com/intellij/rio/">the dedicated page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2007/12/26/control-your-rio-environment-within-intellij-idea/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rio on Amazon EC2</title>
		<link>http://blog.elastic-grid.com/2007/11/19/rio-on-amazon-ec2/</link>
		<comments>http://blog.elastic-grid.com/2007/11/19/rio-on-amazon-ec2/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 18:04:16 +0000</pubDate>
		<dc:creator>jeje</dc:creator>
				<category><![CDATA[amazon ec2]]></category>
		<category><![CDATA[elastic grid]]></category>
		<category><![CDATA[rio]]></category>

		<guid isPermaLink="false">http://blog.elastic-grid.com/2007/11/19/rio-on-amazon-ec2/</guid>
		<description><![CDATA[Today, we have been able to use a custom AMI in order to run Rio on many Amazon EC2 instances.
The test we did was quite simple: one instance of our Amazon image (let&#8217;s call it server1) ran Rio (rio start all), whereas another instance (let&#8217;s call it server2) ran CLI (Rio command-line interface). Multicast being [...]]]></description>
			<content:encoded><![CDATA[<p>Today, we have been able to use a custom <acronym title="Amazon Machine Image">AMI</acronym> in order to run <a href="http://rio.dev.java.net">Rio</a> on many <a href="http://aws.amazon.com/ec2">Amazon EC2</a> instances.</p>
<p>The test we did was quite simple: one instance of our Amazon image (let&#8217;s call it <em>server1</em>) ran <a href="http://rio.dev.java.net">Rio</a> (<code>rio start all</code>), whereas another instance (let&#8217;s call it <em>server2</em>) ran CLI (<a href="http://rio.dev.java.net">Rio</a> command-line interface). Multicast being disabled between <a href="http://aws.amazon.com/ec2">Amazon EC2</a> instances, we had to use a Unicast lookup. This can be done in CLI with the following command:<br />
<code>set locators jini://PRIVATE_DNS_NAME_OF_RIO_SERVER_1</code></p>
<p>We were able to list from <em>server2</em> the services running on <em>server1</em>. CLI uses the default ServiceDiscoveryManager settings, so when we stop <a href="http://rio.dev.java.net">Rio</a> on <em>server1</em>, we had to wait 10 minutes before the services disappeared.</p>
<p>So, do not forget to customize your <a href="http://rio.dev.java.net">Rio</a>/Jini environment when using <a href="http://aws.amazon.com/ec2">Amazon EC2</a>.</p>
<p>We will soon provide a public <acronym title="Amazon Machine Image">AMI</acronym>, with a customized <a href="http://rio.dev.java.net">Rio</a> distribution tuned for <a href="http://aws.amazon.com/ec2">Amazon EC2</a>.</p>
<p><strong>Update</strong>: there is now <a href="http://blog.elastic-grid.com/elastic-grid/how-to-start-rio-on-amazon-ec2/">a tutorial for running Rio on Amazon EC2 and Rio AMI</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elastic-grid.com/2007/11/19/rio-on-amazon-ec2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
