Permalink
Browse files

add "ruote 2.3.0 released" post

  • Loading branch information...
1 parent 02e2e08 commit 82a31687f1dd60938a9cbb2142e74179f7494c12 @jmettraux committed Sep 3, 2012
Showing with 177 additions and 0 deletions.
  1. +177 −0 _posts/2012-09-03-ruote-2.3.0.md
  2. BIN images/2012-09-03-screenshot.png
@@ -0,0 +1,177 @@
+---
+layout: post
+title: ruote 2.3.0 released
+---
+
+Just released version 2.3.0 of [ruote](http://ruote.rubyforge.org), a workflow engine for Ruby.
+
+The [last release](http://jmettraux.wordpress.com/2011/03/02/ruote-2-2-0-released/) was beginning March 2011, it was the 2.2.0. Many things happened, I couldn't find the time to release a new version, although the developement was very active. Blame it on [Bundler](http://gembundler.com/), it makes it so easy to just point at a master branch.
+
+It could have been released as a 2.2.1 since there are no breaking changes, but I prefer to label it 2.3.0.
+
+What's new in this release, what's improved? The [changelog](https://github.com/jmettraux/ruote/blob/master/CHANGELOG.txt) might be a bit dry. Here are some highlights:
+
+* Participants get a new callback: [on_apply](http://ruote.rubyforge.org/implementing_participants.html#on_apply). It gives an opportunity to implementers to do something with the workitem before it gets dispatched to the (real) participant.
+
+* New [flanking](http://ruote.rubyforge.org/common_attributes.html#flank) concept: parallel workflow lanes that get cancelled as soon as the sequence they belong to finishes.
+
+* [Timers](http://ruote.rubyforge.org/common_attributes.html#timers) are like super timeouts. They list time deltas and what's supposed to happen at that point.
+
+* Participants are given the opportunity to implement [#rtimers](http://ruote.rubyforge.org/implementing_participants.html#rtimeout) and [#rtimeout](http://ruote.rubyforge.org/implementing_participants.html#rtimeout) to specify their default timers/timeout. The process definition timers and the option timers take precedence.
+
+* Ruote::Dashboard preferred over Ruote::Engine. To emphasize that the engine is the whole dashboard(s) + worker(s) + storage system.
+
+* A template class for observing ruote events got added: [Ruote::Observer](https://github.com/jmettraux/ruote/blob/a5411e75dba1ce3d5ed0544119e819068724b953/lib/ruote/observer.rb). [Hartog de Mik](https://github.com/coffeeaddict) contributed a more refined version: [Ruote::ProcessObserver](https://github.com/jmettraux/ruote/blob/a5411e75dba1ce3d5ed0544119e819068724b953/lib/ruote/util/process_observer.rb). Implementations of these templates can be registered in ruote and log/observe/react on workflow activity.
+
+* etc...
+
+Now some more detailed highlights:
+
+
+## participants
+
+A 2.2.0 ruote participant would look like:
+
+{% highlight ruby linenos %}
+class Scout
+ include Ruote::LocalParticipant
+
+ def consume(workitem)
+
+ result = [ workitem.participant_name, (20 * rand + 1).to_i ]
+ workitem.fields['spotted'] << result
+
+ reply_to_engine(workitem)
+ end
+
+ def cancel(flavour)
+
+ # no need for a special implementation
+ end
+end
+{% endhighlight %}
+
+Here is the 2.3.0 version. It favours "on_" methods, with implicit information (workitem, flavour, fei, ...) Note that ruote 2.3.0 still accepts the above version.
+
+{% highlight ruby linenos %}
+class Scout < Ruote::Participant
+
+ def on_workitem
+
+ result = [ workitem.participant_name, (20 * rand + 1).to_i ]
+ workitem.fields['spotted'] << result
+
+ reply
+ end
+
+ # Ruote::Participant provides an empty default #on_cancel
+end
+{% endhighlight %}
+
+
+## radial
+
+Until now, process definitions where mostly expressed in Ruby or in XML, or directly as (JSON) abstract trees.
+
+There is a new mini-language called *Radial* available in the latest ruote. It aims for terseness, looks like a mix of JSON and Python (yes, significant indentation), and is not far from what it would look like in Ruby 1.9.
+
+Radial:
+
+{% highlight python linenos %}
+define
+ concurrence merge_type: concat
+ scout_alice
+ scout_bob
+ scout_charly
+ leader_doug
+{% endhighlight %}
+
+Ruby 1.9:
+
+{% highlight ruby linenos %}
+Ruote.define do
+ concurrence merge_type: concat do
+ scout_alice
+ scout_bob
+ scout_charly
+ end
+ leader_doug
+end
+{% endhighlight %}
+
+Radial is used as well in the "noisy" mode for debugging workflow activity, each time a workflow is launched, its radial version is displayed along with expression ids for easier activity deciphering.
+
+[<img src="images/2012-09-03-screenshot.png" style="width: 700px; height: 483px;" />](images/2012-09-03-screenshot.png)
+
+The radial mini-language is parsed thanks to [Parslet](http://kschiess.github.com/parslet/).
+
+
+## ruote-amqp rework
+
+[ruote-amqp](https://github.com/kennethkalmer/ruote-amqp) needed some rework, it was too focused on queues for publishing whereas it should have been talking to exchanges. Hopefully the new version of ruote-amqp more closely follows the AMQP philosophy.
+
+Note that [Naoto Takai](https://github.com/takai) is working on a [NATS](https://github.com/derekcollison/nats) pair of participant/listener (for ruote 2.2.x), it should work nicely with ruote 2.3.0. A valuable alternative to ruote-amqp.
+
+There is [ruote-stomp](https://github.com/maestrodev/ruote-stomp) too, maintained by [Kit Plummer](http://kitplummer.github.com/).
+
+
+## storage implementations
+
+Persistence is important for a workflow engine, some processes are expected to run for long times and survive engine failures and restarts. At the heart of ruote are storage implementations.
+
+### ruote-sequel
+
+[ruote-sequel](https://github.com/jmettraux/ruote-sequel) is based on the powerful [sequel](http://sequel.rubyforge.org) tool. It persists workflows to relational databases (MySQL, PostgreSQL, and co).
+
+To spare time, I decided to stop the developement of [ruote-dm](https://github.com/jmettraux/ruote-dm) in favour of ruote-sequel. Ruote-sequel also benefitted from a recent rework in order to decrease the traffic between the worker(s) and the database (ruote is quite the query gun). Hopefully, as time flows and experience and feedback accumulate, workers and storage implementations get better.
+
+### ruote-mon
+
+This new [ruote-mon](https://github.com/jmettraux/ruote-mon) storage implementation is backed by [MongoDB](http://www.mongodb.org), it started out as [ruote-mongodb](https://github.com/PlasticLizard/ruote-mongodb) under the lead of [Nathan Stults](https://github.com/PlasticLizard). Ruote-mon is a rewrite that I personally maintain.
+
+It's currently quite the vanilla storage implementation. I hope to find some time to port some of the improvements in ruote-sequel to ruote-mon to decrease traffic between the worker(s) and MongoDB.
+
+### ruote-redis
+
+[ruote-redis](https://github.com/jmettraux/ruote-redis) slowly matured into 2.3.0. There were a few issues uncovered by various people. They are fixed by now.
+
+### ruote-swf
+
+Unfortunately ruote-swf, backed by [Amazon SWF](http://aws.amazon.com/swf) is still behind a corporate wall. It's an interesting implementation, it helped mature the worker and other storage implementations. It should be available by the end of the year.
+
+### other storage implementations
+
+[ruote-couch](https://github.com/jmettraux/ruote-couch) hasn't made it to 2.3.0. I'd like to work on it, but since I have to make sure 2.3.0 reads couches written by 2.2.0, I'm a bit hesitant. I hope to find the time for an upgrade sprint (or two), I probably want a complete rewrite.
+
+
+## graphical process visualization (ruote-fluo)
+
+[ruote-fluo](https://github.com/jmettraux/ruote-fluo) was rendering graphically process definitions to browser canvases. It had a few issues with big processes (memory leaks).
+
+The new version leverages SVG (and CSS) instead, along with [jQuery](http://jquery.com/). I still have to implement a proper rendering for "if" expressions and then wrap it into [ruote-kit](https://github.com/kennethkalmer/ruote-kit).
+
+
+## remaining work
+
+There are a few bugs reported by [Chris Conley](https://github.com/chrisconley) that have to be fixed (2.3.1 hopefully).
+
+[Marco Sehrer](https://github.com/pixelvitamina) and other have reported inconsistencies with the StorageParticipant. They have to be addressed. Maybe the solution is a rework of the storage participant or a new participant (InboxParticipant?). I'd like to see that work in 2.3.1
+
+
+## ruote inside
+
+[Dan Ryan](https://github.com/danryan/) started the [mastermind](https://github.com/danryan/mastermind) project, an infrastructure orchestration engine, full of ideas and energy.
+
+
+## links
+
+* [website](http://ruote.rubyforge.org)
+* [mailing list](https://groups.google.com/forum/?fromgroups#!forum/openwferu-users)
+* IRC freenode.net #ruote
+
+&nbsp;
+
+Many thanks for all the feedback and the contributions.
+
+This release is dedicated to the memory of Claudio Petasecca-Donati, fellow developer, thanks for all your help.
+
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 82a3168

Please sign in to comment.