<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>merb &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/merb/</link>
	<description>Feed of posts on WordPress.com tagged "merb"</description>
	<pubDate>Sat, 26 Dec 2009 03:22:29 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Quick guide to Merb dependency resolution]]></title>
<link>http://szyzygycode.wordpress.com/2009/11/10/quick-guide-to-merb-dependency-resolution/</link>
<pubDate>Tue, 10 Nov 2009 09:28:42 +0000</pubDate>
<dc:creator>syzygy</dc:creator>
<guid>http://szyzygycode.wordpress.com/2009/11/10/quick-guide-to-merb-dependency-resolution/</guid>
<description><![CDATA[Playing with Merb again on an old box with a positively geriatric install of Ruby, I discovered afte]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Playing with Merb again on an old box with a positively geriatric install of Ruby, I discovered after some pain that github needs Ruby gems to be at least version 1.2. I subsequently discovered that Ruby also needs to be at 1.8.6 or higher (/cry) &#8211; there&#8217;s no clean upgrade path for Ruby yet for Windows which means a fresh install. </p>
<p>Add github as a source if you don&#8217;t already have it (you can check quickly with &#8220;gem sources&#8221;)</p>
<p>gem sources &#8211;add http://gems.github.com</p>
<p>You will probably have issues with previously installed versions of <em>addressable</em> in which case you&#8217;ll need to get the latest version:</p>
<p>gem install addressable</p>
<p>Then all you (probably) have to do is install Merb &#8211; there may be issues though which I didn&#8217;t experience.</p>
<p>gem install &#8211;remote merb</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Rails 3 – Merb Implications]]></title>
<link>http://timbauerblog.wordpress.com/2009/10/11/rails-3-merb-implications/</link>
<pubDate>Sun, 11 Oct 2009 15:56:25 +0000</pubDate>
<dc:creator>bauertim</dc:creator>
<guid>http://timbauerblog.wordpress.com/2009/10/11/rails-3-merb-implications/</guid>
<description><![CDATA[So as I ramp up to do some automation in my business I am looking at Rails as the baseline. So the w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>So as I ramp up to do some automation in my business I am looking at Rails as the baseline. So the work going on with Rails 3 caught my eye and I took a spin through an overview given by Yehuda Katz back in May.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td></td>
<td valign="top"><strong><img class="alignnone size-medium wp-image-202" title="image005" src="http://timbauerblog.wordpress.com/files/2009/10/image005.png?w=25" alt="image005" width="25" height="16" /></strong></td>
<td valign="top">· <strong>Why it caught my eye</strong></p>
<p>Supposedly Merb allows plug in play w/ Rails so you aren’t trapped w/ pieces you don’t like.</p>
<p>· <strong>Would I recommend you watch it?</strong>:</p>
<p>If you are hard core into Rails yes as the conversation is very detailed. If you want a layman overview of what Rails 3 is about this is probably not the best angle.</p>
<p>· <strong>Most Notable Point</strong>:</p>
<p>Ability to plug and play w/ Rails 3 is the goal and looks viable. Both on ORM and other pieces.</p>
<p>· <strong>When should you fast forward?</strong></p>
<p>No notable slow segments … very detailed.</p>
<p>· <strong>What some might of missed</strong>:</p>
<p>Rails Boost looks interesting (a template approach layered on top of rails 2.3)</td>
</tr>
</tbody>
</table>
<p>Seems cool. Not sure if I will work from the alpha rails3 due out shortly or just poke up 2.3. Need to ponder more.</p>
<p>As always, for those amused here are my raw notes:</p>
<p>*** START OF RAW SCRIBBLE TAKEN WHILE RUNNING ***</p>
<p>• Actual presentation <span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/k2vp5xBEvYY&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/k2vp5xBEvYY&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p>• What to Expect in Rails 3.0 (Rails and Merb)</p>
<p>• Yehuda Katz &#8211; 5/22/09</p>
<p>• 0:33.296</p>
<p>&#8230;..○ Intro commentary</p>
<p>&#8230;..○ Worked on merb full time prior to merge</p>
<p>&#8230;..○ Defining audience</p>
<p>&#8230;&#8230;&#8230;.§ Merb targets the developer that wants to develop apps and extend RoR framework potentially</p>
<p>• 3:53.22 &#8211; ORM Agnostic</p>
<p>&#8230;..○ Merb</p>
<p>&#8230;&#8230;&#8230;.§ Form_for … allow activerecord or other types</p>
<p>&#8230;&#8230;&#8230;.§ Two valid types (valid, errors, new_record)</p>
<p>&#8230;&#8230;&#8230;.§ Net to two interfaces</p>
<p>&#8230;..○ ActionORM (name can change)</p>
<p>&#8230;&#8230;&#8230;.§ Upgrade on MERB</p>
<p>&#8230;&#8230;&#8230;.§ Have drivers to make other things pretend to be active records</p>
<p>&#8230;&#8230;&#8230;.§ I.e. Sequel driver</p>
<p>&#8230;..○ Two options &#8211; compliance or proxy</p>
<p>&#8230;&#8230;&#8230;.§ Object.to_model</p>
<p>&#8230;..○ 8:21.632 &#8211; Code changes required to do above in RoR</p>
<p>&#8230;&#8230;&#8230;.§ Error_messages_for changes</p>
<p>&#8230;..○ Community Extensions</p>
<p>&#8230;&#8230;&#8230;.§ Adaptor for sql for example</p>
<p>• 10:41.838 &#8211; Rack</p>
<p>&#8230;..○ MERB 0.05 &#8211; No rack, mongrel supported by support</p>
<p>&#8230;..○ Support pure rack (Mongrel, Thin, Ebb, CGI, FCGI, Webrick, IRB, Runner)</p>
<p>&#8230;..○ Merb 1 &#8211; Add some middleware</p>
<p>&#8230;&#8230;&#8230;.§ PathPrefix, ConditonalGet, Static</p>
<p>• 14:24.377 &#8211; Router#call</p>
<p>&#8230;..○ Get some rails to behave like rack in certain parts</p>
<p>&#8230;..○ Controller.action(:index) … rack object returns …</p>
<p>&#8230;..○ Middleware</p>
<p>&#8230;&#8230;&#8230;.§ Param Parsing (JSON, XML, etc &#8211; merge)</p>
<p>&#8230;&#8230;&#8230;.§ Rescuing &#8211; in RoR 2.3 in controller … in 3.0 just another middleware</p>
<p>&#8230;&#8230;&#8230;.§ Config.middleware.uss Foo to use</p>
<p>&#8230;..○ Integration Tests</p>
<p>&#8230;&#8230;&#8230;.§ Can test app w/ rack aspects with special handling</p>
<p>• 17:16.904 &#8211; End Game</p>
<p>&#8230;..○ Treat all aspects of Rails, Merb, Sinatra etc as one thing</p>
<p>&#8230;..○ Most will use RoR as it works today … but if you want to mount Merb or Sinatra apps … easily to your RoR app</p>
<p>• 18:24.169 &#8211; Refactoring Rails internals</p>
<p>&#8230;..○ Callbacks</p>
<p>&#8230;&#8230;&#8230;.§ Around Filters &#8211; Unify them &#8211; ActionPack, TestCase, Dispatcher, ActiveRecord</p>
<p>&#8230;&#8230;&#8230;.§ Speed</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Like hello world request returning JSON (10-20% of time)</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Every before_filter fires a ton of stuff (20:38.694)</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Create _run_action_filters … rails compile to one tight method</p>
<p>&#8230;..○ ActionDispatch (22:26.253)</p>
<p>&#8230;&#8230;&#8230;.§ Not controller related … so move to action_dispatch (new)</p>
<p>&#8230;&#8230;&#8230;.§ Make controllers as fast as Rails Metal</p>
<p>&#8230;..○ AbstractController</p>
<p>&#8230;&#8230;&#8230;.§ Rails mailer, rails controller &#8211; same but forks</p>
<p>&#8230;&#8230;&#8230;.§ Rebuild controller on module approach that is more robust</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Ability to super</p>
<p>&#8230;&#8230;&#8230;.§ Add new sugar to modules … include will setup super chain correctly</p>
<p>&#8230;&#8230;&#8230;.§ Layout module depends on renderer</p>
<p>&#8230;..○ Example of Rendering (25:51.864)</p>
<p>&#8230;&#8230;&#8230;.§ Render &#8220;foo&#8221; &#8211; render action foo</p>
<p>&#8230;&#8230;&#8230;.§ Render :template =&#62; &#8220;/foo&#8221; .. Removes slash (no lookup in abs dir)</p>
<p>&#8230;&#8230;&#8230;.§ Get Template object … AC::Renderer</p>
<p>&#8230;&#8230;&#8230;.§ Render Template object … Abstract::Renderer .. gets Template object</p>
<p>&#8230;&#8230;&#8230;.§ Set HTTP response .. Http base controller</p>
<p>&#8230;&#8230;&#8230;.§ Set response_body … main AbstractController</p>
<p>&#8230;&#8230;&#8230;.§ … so top down … normalize as you move up (top down in my list)</p>
<p>• ActionView (28:31.943)</p>
<p>&#8230;..○ ViewPathSet#find (single way in) … get Template object</p>
<p>&#8230;&#8230;&#8230;.§ Ask each of its paths (resolvers) do you have something that matches</p>
<p>&#8230;&#8230;&#8230;.§ Abstract file system physical from request for a template</p>
<p>&#8230;..○ Returns template</p>
<p>&#8230;..○ Template#render(self) &#8211; controller</p>
<p>&#8230;..○ ActionView.long_meth</p>
<p>• Public API (31:30.369)</p>
<p>&#8230;..○ Rails has … public doc is the API … one API</p>
<p>&#8230;..○ Merb 1 …</p>
<p>&#8230;&#8230;&#8230;.§ Public</p>
<p>&#8230;&#8230;&#8230;.§ Private</p>
<p>&#8230;&#8230;&#8230;.§ Plugin</p>
<p>• Rails 3 (32:43.202)</p>
<p>&#8230;..○ TBD</p>
<p>• Debugging</p>
<p>&#8230;..○ Rack::Bug (33:11.266)</p>
<p>&#8230;..○ Port of Django debug toolbar</p>
<p>&#8230;..○ Works in rails 2.3</p>
<p>&#8230;..○ Pluggable</p>
<p>&#8230;..○ Solution &#8211; Orchestra (34:23.441)</p>
<p>&#8230;&#8230;&#8230;.§ Event system in rails … 100 lines of code</p>
<p>&#8230;&#8230;&#8230;.§ Hook to &#8216;render&#8217; event … not system</p>
<p>&#8230;&#8230;&#8230;.§ Publish a render event … works across stacks</p>
<p>&#8230;&#8230;&#8230;.§ Longer term goal … one place to override renderer and sequel</p>
<p>&#8230;&#8230;&#8230;.§ Make alerts custom … don’t block main thread w/ 10 callbacks</p>
<p>• Exception Middleware (36:38.514)</p>
<p>&#8230;..○ Rack thing</p>
<p>• Javascript</p>
<p>&#8230;..○ Rails 2.3 Bad</p>
<p>&#8230;..○ Merb .. Bring your own javascript</p>
<p>&#8230;..○ jQuery .. jRails (hard link to rails API &#8211; breaks)</p>
<p>&#8230;..○ Rails 3</p>
<p>&#8230;&#8230;&#8230;.§ Instead get javascript out of inline .. Semantic markup</p>
<p>&#8230;&#8230;&#8230;.§ jQuery example (38:44.851) of what you need</p>
<p>&#8230;&#8230;&#8230;.§ Separate behavior from markup</p>
<p>&#8230;&#8230;&#8230;.§ Generate Markup</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Rails.prototype.js (HTML 5 question)</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Rails.dojo.js</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Rails.mootools.js</p>
<p>&#8230;&#8230;&#8230;&#8230;&#8230;□ Etc</p>
<p>• Competition (40:27.494)</p>
<p>&#8230;..○ Remove Merb reduces competition</p>
<p>&#8230;..○ Why merger is good</p>
<p>&#8230;..○ ActiveRecord and DataMapper .. Allow choice</p>
<p>&#8230;..○ ActionController and MetalController … allow choice (for speed)</p>
<p>&#8230;..○ Known interfaces (drop our rails parts you don’t want)</p>
<p>&#8230;..○ Allow you to drop out pieces of rails that doesn&#8217;t work</p>
<p>&#8230;..○ Template Engines (42:59.934)</p>
<p>&#8230;&#8230;&#8230;.§ Good in 2.1 and up (so use rails)</p>
<p>&#8230;&#8230;&#8230;.§ Merb and ORMs &#8211; Work</p>
<p>&#8230;..○ Rails Boost (44:10.906)</p>
<p>&#8230;&#8230;&#8230;.§ Build part of stack .. Custom rails … create your stack on options</p>
<p>&#8230;&#8230;&#8230;.§ Don&#8217;t take away &#8216;rails foo&#8217; experience</p>
<p>• Q&#38;A (45:54.318)</p>
<p>&#8230;..○ Rails 3 release?</p>
<p>&#8230;&#8230;&#8230;.§ When its ready. Not prior to google summer of code. 2-3 months after that.</p>
<p>&#8230;&#8230;&#8230;.§ Get more plug-ins ready … goal stables are more stable</p>
<p>&#8230;..○ Will you do something like Rails Boost (48:2.728)</p>
<p>&#8230;&#8230;&#8230;.§ DHH is against a bunch of questions</p>
<p>&#8230;..○ Ease up upgrade from 2.3 to 3 (49:43.843)</p>
<p>&#8230;&#8230;&#8230;.§ API focus (don&#8217;t break that)</p>
<p>&#8230;..○ Help</p>
<p>&#8230;&#8230;&#8230;.§ Run apps and plugins on Master</p>
<p>&#8230;..○ Will rails 3 work 1.8.6 ruby … yes</p>
<p>&#8230;..○ Rails 3 trunk .. Is available (github)</p>
<p>&#8230;..○ Any alpha versions? Beta releases … maybe.</p>
<p>&#8230;..○ Books on rails 3? Later.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Bunny: Publishing with Merb and Rack]]></title>
<link>http://bunnyamqp.wordpress.com/2009/09/04/bunny-publishing-with-merb-and-rack/</link>
<pubDate>Fri, 04 Sep 2009 08:55:03 +0000</pubDate>
<dc:creator>Chris Duncan</dc:creator>
<guid>http://bunnyamqp.wordpress.com/2009/09/04/bunny-publishing-with-merb-and-rack/</guid>
<description><![CDATA[The following article was written by Chris McCauley who kindly gave his permission for it to be publ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h5>The following article was written by Chris McCauley who kindly gave his permission for it to be published here.</h5>
<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } --></p>
<p style="margin-bottom:0;" align="JUSTIFY">I discovered one big gotcha while integrating <a href="http://github.com/celldee/bunny" target="_blank">Bunny</a> with <a href="http://merbivore.com/" target="_blank">Merb</a> and wanted to share the solution.</p>
<p style="margin-bottom:0;" align="JUSTIFY">The background to this is that my company uses clusters of Merb and <a href="http://rubyonrails.org/" target="_blank">Rails</a> processes to implement data validation services.  Until recently our solution for monitoring the Merb part of the infrastructure was pretty manual, reactive and time consuming. I wanted a simple way to gather stats from Merb processes in the cluster and correlate them with activity on the host server and to do this over time. I also wanted email alerts to be sent when a request fails to meet its response target.</p>
<p style="margin-bottom:0;" align="JUSTIFY">I thought that message queuing might offer a good solution, allowing the aggregation of the request data and the production of  reports to be done with the minimum impact on the actual Merb processes. The idea was that each process in the cluster would  publish the timing information for  requests  to a queue and a separate profiler process would handle the graphing and alert functionality.</p>
<p style="margin-bottom:0;" align="JUSTIFY">I chose Bunny as the interface to RabbitMQ because it was synchronous. Although we use EventMachine to great effect elsewhere in our solution, it was a poor fit with the Merb architecture so the <a href="http://github.com/tmm1/amqp" target="_blank">tmm1-amqp</a> gem wasn&#8217;t really an option.</p>
<p style="margin-bottom:0;" align="JUSTIFY">I figured that this would be a simple implementation &#8211; Merb uses <a href="http://rack.rubyforge.org/" target="_blank">Rack</a> internally and provides access to the Rack framework via a “rackup” file. This provides a way to insert custom code into the request processing chain – in effect adding your own middle-ware into Merb. Profiling and monitoring is a middleware service so integrating Bunny and Rack here was the obvious choice.</p>
<p style="margin-bottom:0;" align="JUSTIFY">The structure of a rackup file is very simple. The basic rackup file that Merb uses is&#8230;</p>
<pre><code># use PathPrefix Middleware if :path_prefix is set in Merb::Config
if prefix = ::Merb::Config[:path_prefix]
  use Merb::Rack::PathPrefix, prefix
end

# this is our main merb application
run Merb::Rack::Application.new</code></pre>
<p>… this passes the inbound request straight to Merb for processing. To add custom middle-ware into the chain, you simple require your code and “use” it&#8230;</p>
<pre><code>
require 'bunny_profiler'

# use PathPrefix Middleware if :path_prefix is set in Merb::Config
if prefix = ::Merb::Config[:path_prefix]
  use Merb::Rack::PathPrefix, prefix
end

#  an interface to RabbitMQ via Bunny
use BunnyProfiler

# this is our main merb application
run Merb::Rack::Application.new
</code></pre>
<p>Obviously the “use” can be conditional, running in test environments but not production environments, on Tuesdays but not Thursdays etc.</p>
<p style="margin-bottom:0;" align="JUSTIFY">Each rack file is simple, apart from the constructor it has only one method called &#8216;call&#8217; which gets invoked in response to an inbound request. Since the call method gets a copy of all of the request headers, I figured that code as simple as this would work&#8230;</p>
<pre><code>
def call(env)
  status, headers, body = nil, nil, nil

  request_path  = env["REQUEST_URI"]
  request_input = env["rack.input"].read

  #  Call the next Rack app in sequence.
  #  Given our rackup file, this really means
  #  call our application and get it to
  #  process the request
  tm = Benchmark.measure {
    status, headers, body = @app.call(env)
  }

  #  Note that the pid of the sending process
  #  is part of the message
  #
  @queue.publish("#{Process.pid}” + “&#124;" +
                            request_path    + "&#124;" +
                            request_input   + "&#124;" +
                            (tm.real).to_s)

  # This is the response required by Rack
  [status, headers, body]
end
</code></pre>
<p>The constructor is even simpler, we just set up a queue &#8230;</p>
<pre><code>
def initialize(app)
  @app = app

  @bunny = Bunny.new

  @bunny.start

  @queue = @bunny.queue('clavis.requests')
end
</code></pre>
<p>In the call method  we measure how long the main application code takes to process the request and then to send this to RabbitMQ. Each process in the cluster sends to the same queue and a single client process aggregates the data,  produces graphs and sends any alerts required.</p>
<p style="margin-bottom:0;" align="JUSTIFY">When I deployed this solution in the test environment, all was fine, graphs got produced, email alerts got sent. When I deployed it to one of our production servers, all was again fine –  for nearly a full day anyway.</p>
<p style="margin-bottom:0;" align="JUSTIFY">Then one-by-one each server in the cluster locked-up. When I checked the server log files, it became obvious that under heavy load, the calls to publish messages to the queue were failing. A quick check of the RabbitMQ log showed the following;</p>
<p style="margin-bottom:0;" align="JUSTIFY"><span style="font-family:Courier New,monospace;">=ERROR REPORT==== 14-Aug-2009::16:00:34 === </span></p>
<p style="margin-bottom:0;" align="JUSTIFY"><span style="font-family:Courier New,monospace;">connection &#60;0.18759.12&#62; (running), channel 1 &#8211; error: </span></p>
<p style="margin-bottom:0;" align="JUSTIFY"><span style="font-family:Courier New,monospace;">{amqp,command_invalid, </span></p>
<p style="margin-bottom:0;" align="JUSTIFY"><span style="font-family:Courier New,monospace;">&#8220;expected content header for class 60, got non content header frame instead&#8221;, </span></p>
<p style="margin-bottom:0;" align="JUSTIFY"><span style="font-family:Courier New,monospace;">none} </span></p>
<p style="margin-bottom:0;" align="JUSTIFY">This isn&#8217;t a particularly user-friendly error message. After some digging, I knew that this was somehow related to multiple messages being interleaved on the same channel causing RabbitMQ to close the socket connection. It seemed like a threading issues but I couldn&#8217;t see how my code could be wrong – it&#8217;s copied from the Bunny sample code! I didn&#8217;t want to give up on the solution; the combination of Bunny, Rabbit and Rack just seemed to be such a great approach.</p>
<p style="margin-bottom:0;" align="JUSTIFY">I had noticed one odd thing, RabbitMQ was seeing only one socket connection from all the servers in the cluster but I knew that each server was sending data &#8211; the messages being sent include the PID of the sending process. Perhaps Bunny was using a single connection to RabbitMQ and I needed to use some additional logic to handle that situation? I figured that there was nothing else for it but to try and contact the Bunny maintainer, Chris Duncan</p>
<p style="margin-bottom:0;" align="JUSTIFY">Chris was a great help. He confirmed that there&#8217;s nothing in Bunny which could cause the same connection to be reused by all the servers but perhaps I could look at the use of different channels for each server as well as turning on the Bunny debug log.</p>
<p style="margin-bottom:0;" align="JUSTIFY">Odd as it may seem, it was the second suggestion – turning on the log file which provided the big clue. Since turning on logging is part of the initialisation step (for me anyway), I changed the initialize method to be &#8230;</p>
<pre><code>
def initialize(app)
  @app = app

  @bunny = Bunny.new

  @bunny.logfile = "/var/log/bunny-#{Process.pid}.log"

  @bunny.logging = true

  @bunny.start

  @queue = @bunny.queue('clavis.requests')
end
</code></pre>
<p>&#8230; and restarted all of the servers in the test cluster. My idea was that I would try and reproduce the problem in the test environment by sending as many requests at the same time as possible and by brute-force, make the problem reoccur.</p>
<p style="margin-bottom:0;" align="JUSTIFY">I didn&#8217;t get that far, I noticed that only one log file was getting created instead of the twelve that I was expecting. That really looked like only one Merb process in the cluster was initialising Bunny – but I knew (from the reports getting produced) that each process was sending data. This was a contradiction – how could only one process have initialised Bunny yet all of the processes be sending messages?</p>
<p style="margin-bottom:0;" align="JUSTIFY">The explanation was that only one process was actually initialising Bunny and because of the name of the log file I knew which one it was –  the Merb spawner process. The  spawner process was opening the socket connection to RabbitMQ via Bunny, then forking the child processes and since children inherit the socket connections, each process was sending on the same channel and on the same socket. Sooner or later two messages would get interleaved and RabbitMQ would drop the connection.</p>
<p style="margin-bottom:0;" align="JUSTIFY">The solution was simple, I moved all of the initialisation code out of the constructor and introduced a new start_bunny method which did essentially the same thing and called this like so &#8230;</p>
<pre><code>
def call(env)
  status, headers, body = nil, nil, nil

  request_path  = env["REQUEST_URI"]
  request_input = env["rack.input"].read

  tm = Benchmark.measure {
    status, headers, body = @app.call(env)
  }

  start_bunny unless @queue

  @queue.publish("#{Process.pid}” + “&#124;" +
                            request_path    + "&#124;" +
                            request_input   + "&#124;" +
                            (tm.real).to_s)

  [status, headers, body]
end
</code></pre>
<p>Now each process in the cluster initialises Bunny as required. Since the socket connections are distinct, it&#8217;s safe to use the default channel. Testing showed multiple connection requests going from Bunny to RabbitMQ – something which Chris had been expecting and multiple log files being created – which I had expected. More importantly, ten thousand requests later, the problem hasn&#8217;t reoccurred.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Specifications to Generated Merb Project]]></title>
<link>http://royw.wordpress.com/2009/06/17/specifications-to-generated-merb-project/</link>
<pubDate>Wed, 17 Jun 2009 04:50:25 +0000</pubDate>
<dc:creator>royw</dc:creator>
<guid>http://royw.wordpress.com/2009/06/17/specifications-to-generated-merb-project/</guid>
<description><![CDATA[Introduction While in the early requirements phase of a new open source project, I was wanting to en]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><h4>Introduction</h4>
<p>While in the early requirements phase of a new open source project, I was wanting to encourage discussion on the database schema and web API.  So I wrote some <a href="http://rspec.info/">rspecs</a> to capture the models, their attributes, and their relationships.  As we played around with the schema, it was difficult to manually keep the specs accurate, particularly with the relationships.  So I wrote a script to generate a <a href="http://merbivore.com/index.html">merb</a> project from the rspecs to catch relationship problems.  This was good and also let me generate model and controller diagrams using <a href="http://github.com/royw/railroad_xing">railroad_xing</a>.<br />
<!--more--><br />
After a few iterations I was happy and ready to add a little test data so I could play with the <a href="http://en.wikipedia.org/wiki/Restful">RESTful</a> routes as the web API.  I was still reluctant to give up the flexibility of generating the project directly from the rspecs, so after a couple of iterations, ended up with two features: first having a files/directory that is copied over the generated project; and second preserving changes by using git and generating the project on a branch then rebasing back to the master branch.</p>
<p>The first feature is simply to recursively to copy the structure in a files/ directory to the project directory after generation.  The provides replacement and addition capabilities.  Actually most of this stuff (rest controller,&#8230;) might ought to be refactored into slices.</p>
<p>One note on the RESTful route generation, it is limited to a depth of 2 (ex: /foos/1/bars/3) because the complexity of my original database would cause route compilation to run out of memory when the depth was set to 3.  You can edit the config/router.rb as needed.  And yes, the script replaces the normal merb generated controllers and views with ones that support REST, although the views are geared more towards debugging than a final product.</p>
<h4>Installation</h4>
<ol>
<li>Install git on your system (http://git-scm.com/)</li>
<li>Install ruby on your system (http://www.ruby-lang.org)</li>
<li>Install rubygems on your system (http://www.ruby-lang.org/en/libraries/)</li>
<li>Update rubygems (gem update system)</li>
<li>Install SQLite3 on your system (http://www.sqlite.org/)</li>
<li>Optionally install ImageMagick (http://www.imagemagick.org) recommended</li>
<li>Optionally install Curl (http://curl.haxx.se)</li>
<li>Optionally install RestClient (http://rest-client.googlecode.com)</li>
</ol>
<p>Now you have a choice, either just install the gem with:<br />
<code><br />
gem install royw-spec2merb<br />
</code><br />
or clone the repository:</p>
<ol>
<li>Change to the directory where you want to keep your repositories<br />
(ex: cd ~/views)</li>
<li>Clone the repository (git clone git://github.com/royw/spec2merb.git)<br />
If you are intended to commit changes to the spec2merb, then fork it<br />
and clone your fork instead.</li>
<li>Change to the repository directory (cd spec2merb)</li>
<li>Install required gems (refer to or run the install file)</li>
</ol>
<h4>So let&#8217;s generate a project</h4>
<p>First there will be two &#8220;project&#8221; directories:</p>
<ul>
<li>A project definition directory which will contain the spec/, and files/ directories used to create the merb project.  This should be under version control.</li>
<li>The created project directory which will be a git repository with two branches: &#8216;master&#8217; and &#8216;generated&#8217;.</li>
</ul>
<p>The basic work flow will be:</p>
<ol>
<li>Create the project definition directory.</li>
<li>Create the defining spec in the definition directory</li>
<li>Run the script to create the merb project.</li>
<li>Rebase master from generated branch.</li>
<li>Refine the spec until the created merb project runs</li>
<li>Examine the generated diagrams and classes</li>
<li>Edit the spec and repeat the creation until you are satisfied</li>
<li>Proceed with normal web app development on the &#8216;master&#8217; branch.</li>
</ol>
<p>As you can see from the work flow, all we are doing is adding a few iterations of using the project generation tools to a normal work flow.  The goal being to spin the project quickly, see what you got, then refine it until you are satisfied.</p>
<p>So let&#8217;s get started (note, this example is located in examples/addressbook).</p>
<p><code><br />
cd ~/views<br />
mkdir addressbook-definition<br />
cd addressbook-definition<br />
mkdir spec<br />
vi spec/addressbook-db-schema_spec.rb<br />
</code></p>
<p>And type into addressbook-db-schema_spec.rb:</p>
<pre class="brush: ruby;">
# This is a stub used to attach information about a model to the spec.
def synopsis(*args)
end
# NOTES
# * NVARCHAR should be used for fields that can contain non-english content.
# * Database should be configured for Unicode
describe(&quot;Locationbook Database Schema&quot;) do
  describe(&quot;Person Model&quot;) do
    synopsis(&quot;This model describes a person in the address book&quot;)
    # attributes
    it &quot;should have a name [TEXT]&quot;
    it &quot;should have a honorific [NVARCHAR(4)]&quot;
    # relationships
    it &quot;should have a relationship of zero or more companies [has 0:n Company]&quot;
    it &quot;should have a relationship of zero or more locations [has 0:n Location]&quot;
    it &quot;should have a relationship of zero or more phones [has 0:n Phone]&quot;
    it &quot;should have a relationship of zero or more emails [has n Email]&quot;
    # additional required methods
  end
  describe(&quot;Company Model&quot;) do
    synopsis(&quot;This model describes a company or business in the address book&quot;)
    # attributes
    it &quot;should have a name [NVARCHAR(255)]&quot;
    # relationships
    it &quot;should have a relationship of zero or more people [has 0:n Person]&quot;
    it &quot;should have a relationship of zero or more locations [has 0:n Location]&quot;
    it &quot;should have a relationship of zero or more phones [has 0:n Phones]&quot;
    it &quot;should have a relationship of zero or more emails [has n Email]&quot;
    # additional required methods
  end
  describe(&quot;Location Model&quot;) do
    synopsis(&quot;This model describes a mailing address or location.&quot;,
                  &quot;Note a bug in datamapper is letting me use the name that I would prefer, 'Address'&quot;)
    # attributes
    it &quot;should have a street_location (including apt or suite number) [NVARCHAR(255)]&quot;
    it &quot;should have a city [NVARCHAR(80)]&quot;
    it &quot;should have a state [NVARCHAR(2)]&quot;
    # relationships
    it &quot;should have a relationship of zero or more people [has 0:n Person]&quot;
    it &quot;should have a relationship of zero or more companies [has 0:n Company]&quot;
    # additional required methods
    it &quot;should return the full mailing location&quot;
  end
  describe(&quot;Phone Model&quot;) do
    synopsis(&quot;This model encapsulates phone numbers&quot;)
    # attributes
    it &quot;should have a number [NVARCHAR(14)]&quot;
    # relationships
    it &quot;should have a relationship of zero or more people [has 0:n Person]&quot;
    # it &quot;should have a relationship of zero or more companies [has 0:n Company]&quot;
    # additional required methods
    it &quot;should return the area code&quot;
    it &quot;should return the exchange&quot;
  end
  describe(&quot;Email Model&quot;) do
    synopsis(&quot;This model encapsulates email addresses&quot;)
    # attributes
    it &quot;should have an location [NVARCHAR(255)]&quot;
    # relationships
    it &quot;should have a relationship to a person [has 1 Person]&quot;
    it &quot;should have a relationship to a company [has 1 Company]&quot;
    # additional required methods
    it &quot;should return the account (ex: return 'foo' when location is 'foo@bar.com')&quot;
    it &quot;should return the host service (ex: return 'bar.com' when address is 'foo@bar.com')&quot;
  end
end
</pre>
<p>As you have probably guessed, the String parameter to the it() method has some key structures:</p>
<ul>
<li>&#8220;should have&#8221; denotes a model property</li>
<li>&#8220;should have a relationship&#8221; denotes an association</li>
<li>&#8220;should reference&#8221; denotes a belongs_to or a has 1 relationship</li>
<li>&#8220;should &#8230; variable_name [...]&#8221; or &#8220;should &#8230; variable_name (comment) [...]&#8221; defines the variable name and an optional comment.  The comment will be appended to the corresponding generated code.</li>
<li>what is in square brackets are database types (see lib/model_editor::to_dmtype for supported SQL types) or relationship types (has 1, has n, has 0..n, belongs_to).  The format is &#8220;[relationship model]&#8221; where the model is the class name of the model the relationship is with (see lib/spec2_merb::it for parsing details)</li>
</ul>
<p> Any it &#8220;&#8230;&#8221; line that does not match the rules is added as a comment to the model&#8217;s class.</p>
<p>The observant may have noticed that I commented out the company relationship in the Phone model.  That&#8217;s on purpose to demonstrated missing half of a relationship a little later.</p>
<p>OK now that we have a spec, let&#8217;s generate the project:<br />
<code><br />
spec2merb --project addressbook --spec spec/addressbook-db-schema_spec.rb<br />
</code></p>
<p>Hint, I like to put the above command line in a build script file so I don&#8217;t have keep retyping it&#8230;</p>
<p>It is a good practice to look carefully at the output for any error messages.  If you see any, then you can change the spec and generate again.</p>
<p>In this case the generation succeeds.  So first do a rebase:</p>
<p><code><br />
cd addressbook<br />
git rebase generated master<br />
</code></p>
<p>then fire up you favorite SVG viewer (I use <a href="http://www.mozilla.com">Firefox</a> for viewing and <a href="http://www.gimp.org/">GIMP</a> for printing) and open up the generated doc/models.svg (if you have <a href="http://www.imagemagick.org">ImageMagick</a> installed, then you should also have a doc/models.gif):</p>
<div id="attachment_22" class="wp-caption alignnone" style="width: 918px"><img class="size-full wp-image-22" title="models" src="http://royw.wordpress.com/files/2009/06/models.gif" alt="Models Diagram Missing Phone Relationship to Company" width="908" height="550" /><p class="wp-caption-text">Models Diagram Missing Phone Relationship to Company</p></div>
<p>Notice that the CompanyPhone join model only has one connection to Company and none to the Phone model.  So go back and uncomment the company relationship in the Phone model spec and regenerate.  This time the models diagram should look like:</p>
<div id="attachment_24" class="wp-caption alignnone" style="width: 834px"><img class="size-full wp-image-24" title="models2" src="http://royw.wordpress.com/files/2009/06/models2.gif" alt="Models Diagram" width="824" height="594" /><p class="wp-caption-text">Models Diagram</p></div>
<p>Looking good, but does it work?</p>
<h4>Smoke Test Time</h4>
<p>Change to the generated project directory and fire up merb<br />
<code><br />
cd addressbook<br />
bin/merb<br />
</code></p>
<p>Now fire up your browser and look at http://localhost:4000</p>
<div id="attachment_35" class="wp-caption alignnone" style="width: 769px"><img src="http://royw.wordpress.com/files/2009/06/addressbook-1.png" alt="No route defined for /" title="Addressbook 1" width="759" height="768" class="size-full wp-image-35" /><p class="wp-caption-text">No route defined for /</p></div>
<p>While the script defined the rest routes, it did not define the home page route.  You can add the home page at the end of config/router.rb.  The title is the project name and the menu bar is the set of controllers (defined in config/init/app_config.rb).  For now click on People, Companies, Locations and you should see:</p>
<div id="attachment_36" class="wp-caption alignnone" style="width: 823px"><img src="http://royw.wordpress.com/files/2009/06/addressbook-2.png" alt="Addressbook showing history" title="Addressbook 2" width="813" height="228" class="size-full wp-image-36" /><p class="wp-caption-text">Addressbook showing history</p></div>
<p>At the bottom of the page is the history navigation.</p>
<p>Fire up your <a href="http://curl.haxx.se/">curl</a> and get the people index:</p>
<p><code><br />
curl -H "Content-Type: text/xml; charset=UTF-8" http://localhost:4000/people.xml<br />
</code></p>
<p>Still not very interesting without any data.</p>
<h4>Add Some Data</h4>
<p>So let&#8217;s add some data via rest using curl. Note you may prefer using a rest client like the one at http://rest-client.googlecode.com</p>
<p>Let&#8217;s create a work area in the project definition directory:</p>
<p><code><br />
mkdir rest-requests<br />
</code></p>
<p>Now create the request xml by adding the following to rest-requests/add-person.xml:</p>
<pre class="brush: xml;">
&lt;person&gt;
  &lt;name&gt;Roy Wright&lt;/name&gt;
  &lt;honorific&gt;Mr.&lt;/honorific&gt;
&lt;/person&gt;
</pre>
<p>And lets run it:</p>
<p><code><br />
cd rest-requests<br />
curl -H "Content-Type: text/xml; charset=UTF-8" --data-binary @add-person.xml http://localhost:4000/people.xml<br />
</code></p>
<p>And look at the data again:</p>
<p><code><br />
curl -H "Content-Type: text/xml; charset=UTF-8" http://localhost:4000/people.xml<br />
</code></p>
<p>which should return:</p>
<pre class="brush: xml;">
&lt;people type='array'&gt;
  &lt;person&gt;
    &lt;id type='datamapper::types::serial'&gt;1&lt;/id&gt;
    &lt;name type='datamapper::types::text'&gt;Joe Bob&lt;/name&gt;
    &lt;honorific type='datamapper::types::text'/&gt;
  &lt;/person&gt;
&lt;/people&gt;
</pre>
<h4>From Spec to Web Service</h4>
<p>Wow!  What we have just done is created a web service directly from specs!  As a bonus we have a primitive HTML interface too.</p>
<p>Now admittedly all we have really done is exposed our models via REST.  We will probably want to add code to have the interface do something.  </p>
<h4>Adding Code</h4>
<p>Simply edit away on the master branch.  When you find you need a change in the database schema, simply commit your master branch, edit the db schema spec, regenerate using spec2merb, then rebase the generated branch back to master.</p>
<h4>Conclusion</h4>
<p>Overall I think the experiment is showing promise by defining the database schema in one location in a readable format (rspec).  Also by using git rebasing to extend using the merb generators over the entire project life is a major benefit.</p>
<h4>Where Next?</h4>
<p>I like the simple rspec organization of:  it &#8220;should&#8230;&#8221; statements.  These are pretty easy for anybody to grasp.  At the same time I do not like imposing structure on the string.  I&#8217;m thinking of extending the rspec DSL by adding a shall() method that would let me pass in the line to put in the model, something like:</p>
<pre class="brush: ruby;">
def shall(comment, model_line)
  'should ' + comment
end

describe('Foo Model') do
  synopsis('This is an example model')
  it shall('have a name attribute', 'property :name, String, :length =&amp;#62; 40, :unique =&amp;#62; true')
  it shall('reference several bars', 'has n, :bars, :through =&amp;#62; Resource')
end
</pre>
<p>Currently both sides of a relationship must be specified.  It would be nice to only have to spec a relationship once.  I&#8217;m not sure the best way to accomplish this as having the relationship defined in the model seems most natural and all I can think of is to have a separate describe block for all of the relationships.  Thoughts?</p>
<p>Finally what other parts of the application can we spec?  Maybe whether or not to use RESTful vs. ad hoc routes?  Maybe more on the views? Ideas?</p>
<p>Have Fun,<br />
Roy</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Rails 3.0 and agnosticisms]]></title>
<link>http://dddonruby.wordpress.com/2009/05/14/rails-3-0-and-agnosticisms/</link>
<pubDate>Thu, 14 May 2009 05:34:31 +0000</pubDate>
<dc:creator>Fábio Rehm</dc:creator>
<guid>http://dddonruby.wordpress.com/2009/05/14/rails-3-0-and-agnosticisms/</guid>
<description><![CDATA[Just a side note&#8230; Have you heard about Rails 3.0: The day Merb joined Rails RailsConf 09 ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Just a side note&#8230;</p>
<p>Have you heard about Rails 3.0:</p>
<ul>
<li><a href="http://rubyonrails.org/merb" target="_blank">The day Merb joined Rails</a></li>
<li><a href="http://www.akitaonrails.com/2009/05/08/railsconf-09-dhh-the-secret-of-productivity" target="_blank">RailsConf 09 &#8211; DHH &#8211; The Secret of Productivity</a></li>
<li><a href="http://www.geekmade.co.uk/2008/12/stop-worrying-and-start-loving-rails-3/" target="_blank">Stop worrying and start loving Rails 3</a></li>
<li><a href="http://on-ruby.blogspot.com/2008/12/rails-and-merb-better-together.html" target="_blank">Rails and Merb better together?</a></li>
<li><a href="http://www.foysavas.com/blog/2008/12/25/lets-be-clear-the-rails-monoculture-is-over.html" target="_blank">Let&#8217;s Be Clear: The Rails Monoculture Is Over</a></li>
</ul>
<p>What about its effort to be ORM agnostic?</p>
<blockquote><p><a href="http://yehudakatz.com/2009/01/06/another-dispatch-step-1-of-2-complete/" target="_blank">http://yehudakatz.com/2009/01/06/another-dispatch-step-1-of-2-complete/</a></p>
<p>&#8220;[...] Lori has been working hard on the ORM adapter for Rails. Effectively, the adapter will work like: ActiveORM.for(@sequel_obj). If the object is compatible with the ActiveORM API (note that the names et al are still very much in flux), it will be passed through. For instance, ActiveORM.for(@ar_obj) will just return the ActiveRecord object. ActiveORM.for(@sequel_obj), however, will return a wrapper around the object that is compatible with Rails expectations. Example: ActiveORM.for(@sequel_obj).new_record?. Note that this paragraph is speculative and represents work that is still very much in flux. [...]&#8220;</p></blockquote>
<p>I believe that the whole thing might help us doing some &#8220;DDD on Rails&#8221;.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Café com TOM]]></title>
<link>http://leonardom.wordpress.com/2009/04/17/cafe-com-tom/</link>
<pubDate>Fri, 17 Apr 2009 22:12:25 +0000</pubDate>
<dc:creator>Leonardo</dc:creator>
<guid>http://leonardom.wordpress.com/2009/04/17/cafe-com-tom/</guid>
<description><![CDATA[Olá, Ontem eu assisti excelentes palestras on-line do Café com TOM. Para quem não conhece o Café com]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Olá,</p>
<p>Ontem eu assisti excelentes palestras on-line do Café com TOM. Para quem não conhece o <a href="http://www.treinatom.com.br/pt/cafe-com-o-tom/">Café com TOM</a> é o oferecido gratuitamente pela <a href="http://www.egenial.com.br">e-Genial</a>. Se você não pode acompanhar as palestras on-line, você pode baixar a gravação delas quando quiser, é o que eu geralmente faço. Posso dizer que a qualidade da gravação é muito boa.</p>
<p>Alias o Café com TOM usa o <a href="http://www.treinatom.com.br/pt/">Treina TOM</a>, uma excelente ferramenta colaborativa de ensino a distância, desenvolvida pelo própria e-Genial.</p>
<p>Gostaria de parabenizar a e-Genial por esse magnífico trabalho com o Treina TOM e Café com TOM.</p>
<p>Bom pra finalizar, não deixem de conferir as palestras do Café com TOM. Lá você irá encontrar palestras de RSpec, Merb, BlazeDS, entre outras.</p>
<p>Abraços,</p>
<p>Leo</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Merb impressions]]></title>
<link>http://kristiannissen.wordpress.com/2009/04/10/merb-impressions/</link>
<pubDate>Fri, 10 Apr 2009 10:38:18 +0000</pubDate>
<dc:creator>Kristian Nissen</dc:creator>
<guid>http://kristiannissen.wordpress.com/2009/04/10/merb-impressions/</guid>
<description><![CDATA[Yesterday I took Merb for a small test drive, a customer of mine asked me to develop a custom case m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Yesterday I took Merb for a small test drive, a customer of mine asked me to develop a custom case management system and I decided to try out Merb.<!--more-->I have to say, I really like Datamapper compared to ActiveRecord, not that it&#8217;s all that different, but I like being able to see the properties by opening a model. I know datamapper and activerecord can both tbe used with Merb and that datamapper is not a part of Merb.</p>
<p>The command line tool is also a bit different, instead of script/generate controller you have merb resource which is quit nice as well.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[First steps towards an API for TunkRank]]></title>
<link>http://mendicantbug.com/2009/04/04/first-steps-towards-an-api-for-tunkrank/</link>
<pubDate>Sun, 05 Apr 2009 03:08:59 +0000</pubDate>
<dc:creator>Jason Adams</dc:creator>
<guid>http://mendicantbug.com/2009/04/04/first-steps-towards-an-api-for-tunkrank/</guid>
<description><![CDATA[Earlier today, I was checking out the suggested connections provided by re-searchr (by James Ostheim]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Earlier today, I was checking out the suggested connections provided by <a href="http://www.re-searchr.com/recommended_social_connections" target="_blank">re-searchr</a> (by <a href="http://jostheim.blogspot.com/" target="_blank">James Ostheimer</a>, <a href="http://twitter.com/jostheim" target="_blank">@jostheim</a>).  A discussion arose around ranking suggested users and potentially using a measure like <a href="http://tunkrank.com" target="_blank">TunkRank</a> as a part of that ranking.  The prospect of James having to reimplement TunkRank encouraged me to implement a part of the TunkRank API I had been planning for a while:  fetching a user&#8217;s TunkRank score.</p>
<p style="text-align:justify;">Fortunately, <a href="http://merbivore.com/" target="_blank">Merb</a> is a framework that makes it particularly easy to render a page in different formats without having to add a lot of new code.  The end result is a very simple first step that returns the raw TunkRank score in JSON format.  You can access it via the following RESTful url:</p>
<p style="text-align:center;"><code>http://tunkrank.com/twitter_users/{username}.json</code></p>
<p style="text-align:justify;">If the user has not had their TunkRank score calculated yet, the return value will be 0, otherwise it will be a number greater than or equal to one.  New users are added to a queue and are ranked at various points throughout the day when usage is low.  It&#8217;s on my TODO list to make this happen more frequently. I can only blame its neglect on forgetfulness.</p>
<p style="text-align:justify;">Daniel already has <a href="http://thenoisychannel.com/2009/04/04/api-for-tunkrank-scores/" target="_blank">a write-up</a> on this fledgling API.  I&#8217;ve been busy watching the first week of <em><a href="http://www.imdb.com/title/tt0835434/" target="_blank">In Treatment</a></em> on DVD &#8212; a show that is turning out to be very intriguing.  I realize that has nothing to do with the rest of the post, but I liked the show so much I had to tell someone. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Merb y Rails se unen.]]></title>
<link>http://efrenfuentes.wordpress.com/2009/04/02/merb-y-rails-se-unen/</link>
<pubDate>Thu, 02 Apr 2009 13:40:23 +0000</pubDate>
<dc:creator>efrenfuentes</dc:creator>
<guid>http://efrenfuentes.wordpress.com/2009/04/02/merb-y-rails-se-unen/</guid>
<description><![CDATA[Bueno la verdad que es todo un acontecimiento, los desarrolladores de Merb y los de Rails, los dos f]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Bueno la verdad que es todo un acontecimiento, los desarrolladores de Merb y los de Rails, los dos frameworks ruby con más aceptación, van a unir sus fuerzas y crear un unico framework en su siguiente versión principal. Tendremos por lo tanto que Merb 2 = Rails 3.</p>
<p>Con un artículo titulado Merb gets merged into Rails 3!, David Heinemeier hace un resumen de cuáles son sus expectativas:</p>
<p>Rails será más modular. De forma análoga a Merb, al construir una aplicación con Rails se podrá partir de un &#8220;rails-core&#8221; e ir añadiendo funcionalidades a medida que sean necesarias. Así no mataremos moscas a cañonazos.<br />
El rendimiento es otro área en el que puede haber mejoras sustanciales ya que este es un aspecto en el que los desarrolladores de Merb han invertido mucho esfuerzo. De hecho, han reescrito partes de Rails con ese objetivo en mente, así que su experiencia en este sentido tiene mucho valor. Además, no les temblará la mano a la hora de modificar la arquitectura donde sea necesario.<br />
Rails 3 será &#8220;agnóstico&#8221;. La idea es que los desarrolladores puedan elegir entre diferentes ORMs (ActiveRecord, Sequel, Datamapper&#8230;), plataformas de pruebas (test unit, RSpec&#8230;), bibliotecas para AJAX (JQuery, Prototype&#8230;), otros lenguajes para plantillas como Haml, etc.<br />
Otra cosa que a Rails le falta es una API estable y clara para aquellos que desean desarrollar plugins. Según admite el propio Heinemeier, eso lleva a que al actualizar Rails se &#8220;rompan&#8221; muchos de estos plugins. Merb cuenta con una API estable cubierta con baterías de pruebas para minimizar estos problemas.<br />
Por su parte, Yehuda Katz, desarrollador de Merb, también comparte sus impresiones en su artículo Rails and Merb Merge. Pero creo que lo más destacable es su promesa de no &#8220;dejar tirados&#8221; a aquellos que están usando Merb hoy en día. Creo que la intención se puede resumir en esta afirmación suya: Merb 2 es Rails 3.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[What is your TunkRank?]]></title>
<link>http://mendicantbug.com/2009/03/05/what-is-your-tunkrank/</link>
<pubDate>Fri, 06 Mar 2009 03:09:03 +0000</pubDate>
<dc:creator>Jason Adams</dc:creator>
<guid>http://mendicantbug.com/2009/03/05/what-is-your-tunkrank/</guid>
<description><![CDATA[A couple months ago, Daniel Tunkelang posted an algorithm on his blog that attempts to emulate PageR]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;"><img class="alignright size-thumbnail wp-image-1077" style="border:0 none;margin:3px 8px;" title="tunkrank-raven" src="http://ealdent.wordpress.com/files/2009/02/raven.png?w=96" alt="tunkrank-raven" width="128" height="128" />A couple months ago, <a href="http://twitter.com/dtunkelang" target="_blank">Daniel Tunkelang</a> posted <a href="http://thenoisychannel.com/2009/01/13/a-twitter-analog-to-pagerank/" target="_blank">an algorithm</a> on his blog that attempts to emulate <a href="http://en.wikipedia.org/wiki/Page_rank" target="_blank">PageRank</a> for <a href="http://twitter.com" target="_blank">Twitter</a>.   I implemented a toy version I dubbed TunkRank, and then suggested that name on his blog.  It got some traction, so I figured what the heck and decided to implement it on <a href="http://tunkrank.com" target="_blank">TunkRank.com</a>.</p>
<p style="text-align:justify;">Now, there appeared to be a little debate about just whether it is actually emulating PageRank or something else on Daniel&#8217;s blog, but I leave it to you to read the comments  on his post if you&#8217;re interested.  There are also plenty of ideas there on the best way to establish a measure of influence.  I&#8217;ll limit the discussion in this post to the basics.</p>
<ol>
<li>The amount of attention you can give is spread out among all those you follow. The more you follow, the less attention you can give each one.</li>
<li>Your influence depends on the amount of attention your followers can give you.</li>
</ol>
<p style="text-align:justify;">As a twitterer, your influence does not depend on how many people you follow. However, your usefulness as a follower does. Having higher influence depends on having many followers who follow relatively few people but are followed by many. Followers like that are more likely to pick up on your tweets, act on them, retweet them, whatever. You gain influence through the social graph thanks to their influence.</p>
<p style="text-align:justify;">Therefore, your TunkRank score is a reflection of how much attention your followers can both directly give you and give to you.</p>
<p style="text-align:justify;">I implemented this algorithm in Ruby using <a href="http://merbivore.com/" target="_blank">Merb</a>, <a href="http://mysql.org" target="_blank">MySQL</a>, <a href="http://www.capify.org/" target="_blank">Capistrano</a>, <a href="http://nginx.net/" target="_blank">nginx</a>, and <a href="http://wiki.rubyonrails.org/rails/pages/ActiveRecord" target="_blank">ActiveRecord</a> (and, of course, <a href="http://git-scm.com/" target="_blank">Git</a> for version control).  While my job involves working on a web app, my role has mostly been on back-end NLP stuff.  I&#8217;m still quite new to the whole Rails-level-web-app-world. For those who don&#8217;t know, Merb is a framework similar Ruby on Rails.  So similar they are merging and will become Rails 3.  ActiveRecord is an <a href="http://en.wikipedia.org/wiki/Object-relational_mapping" target="_blank">Object-relational Mapping</a> (ORM) that Rails uses.  The standard ORM for Merb is <a href="http://datamapper.org/doku.php" target="_blank">DataMapper</a>, but I stuck with something I&#8217;m more familiar with to limit the variables in my little project.</p>
<p style="text-align:justify;">There are many aspects of getting a web app up and running that I had only heard about in passing &#8212; and many more I&#8217;m still lost on.  But I figured implementing TunkRank would be an interesting place to start.</p>
<h3>Phase I &#8211; Data Collection</h3>
<p style="text-align:justify;">As I said, I implemented TunkRank as a toy the same night that Daniel posted his algorithm.  Things seemed to work out quite nicely and I liked it on theoretical grounds as a measure.  When I decided to implement the real version, the task of hammering Twitter millions of times suddenly loomed.  I suppose I thought there were maybe about 1 million active accounts on Twitter.  I have harvested over 2 million before slowing my harvesting down in favor of other development.  I have also collected about 40 million edges in the social graph (user A follows user B is one edge).  Of the 2 million users I have encountered, those 40 million edges are for only 25% of them.  I still haven&#8217;t gotten the followers for the remaining 1.5 million.  When I do so, I&#8217;m sure I&#8217;ll discover another million or three users I haven&#8217;t seen yet.</p>
<p style="text-align:justify;">I stopped where I did because I was using Ruby&#8217;s marshal functionality to dump the social graph to disk.  Each dump was weighing in around 250 MB and it was exceeding Marshal&#8217;s ability to function.  At this point I threw everything into a MySQL database.  Bleh!  I can&#8217;t even describe the pain in the ass that was.  If I were to do that again, I would certainly use PostgreSQL, and may still do so.  Better yet, I would use some sort of column store database.  But it&#8217;s in the MySQL db now and running ok (just ok, not great or even well).  MySQL dies quietly and annoyingly at times.  I hate it.</p>
<p style="text-align:justify;">Doing the operations I was doing before in memory in ActiveRecord instead is mind-bogglingly slow by comparison, as you&#8217;d expect.  Twitter just released the ability to pull all follower ids in one request, which would have made my life easier, but I still can benefit from it going forward.  Also, I should have been storing more information about users than just the twitter username.  Having to go back and collect that was slow and annoying, but it&#8217;s done.</p>
<h3>Phase II &#8211; Implementing the Algorithm</h3>
<p style="text-align:justify;">The algorithm is simple to compute.  Check out <a href="http://gist.github.com/58548" target="_blank">this gist</a> for a version that calculates it using ActiveRecord.  I&#8217;d post it here, but WordPress.com sucks and I&#8217;m stuck with it.  The code uses ActiveRecord more than I&#8217;d like, so I rewrote it in SQL using twitter ids.  The gist for that is <a href="http://gist.github.com/74722" target="_blank">here</a>.  The <code>#{p}</code> and <code>#{self.twitter_id}</code> are Ruby variables.</p>
<h3>Phase III &#8211; Doing the Web App</h3>
<p style="text-align:justify;">The web app itself is both the most important step and the least fun for me.  I very much enjoyed putting together the code to collect the Twitter social graph and then computing the TunkRank scores, but all the nuts and bolts of getting a web app up and running are tedious.  Some of it is interesting.  Merb isn&#8217;t so bad, though I feel like the documentation is shitty.  There is an open source Merb book that is missing stuff in all the sections I needed the most.  The API documentation isn&#8217;t bad, but isn&#8217;t easy to search for high level things that you would normally find in a tutorial.  Nor should it be &#8212; it&#8217;s API documentation not a tutorial.</p>
<p style="text-align:justify;">Fortunately, most things were easy enough that I could find a solution eventually.  The whole deploying step is foreign to me, and I&#8217;m an apache noob so when it comes to balancing mongrel instances I&#8217;m like wtf?  Fortunately, I found a few tutorials I was able to piece together.</p>
<p style="text-align:justify;">So the final product is hosted on my 1.8 GHz dual core Dell laptop with 2 GB RAM running Ubuntu 8.10.  If you check it out, hopefully it won&#8217;t overtax my pathetic server and bring the site down.  My data is becoming a little stale so if your username isn&#8217;t found, please be patient.  When a new person is encountered, I queue them for processing.</p>
<h3>Final Thoughts</h3>
<p style="text-align:justify;">You can also follow <a href="http://twitter.com/tunkrank" target="_blank">@tunkrank</a> on Twitter.  I originally had that account acting as a bot that tweets scores when it encounters influential users.  Also,  I was having it auto-follow anyone it grades, but upon reflection, it occurred to me these two things were just plain spammy.  I chalk it up to a bad decision in the dead of night.  Instead I will just have it follow anyone who follows it.  See my <a href="http://mendicantbug.com/2009/02/18/a-few-thoughts-on-twitter/">twitter philosophy</a> for how the account will be managed.  I will post updates there on changes, fixes, and up/downtime.</p>
<p style="text-align:justify;">The TunkRank score itself can grow quite large, especially for users with a high number of followers.  I present percentiles as the measure, so everything falls in the interval [0,100].  That does not properly reflect that someone in the 100th percentile can be almost 1000 times more influential than someone in the 99th.  I&#8217;m open to suggestions about how better to show this information.  Neal Richter had <a href="http://aicoder.blogspot.com/2009/02/tunkrank-scoring-improvement.html" target="_blank">a few good ideas</a>, perhaps I&#8217;ll try one of those.  Still, though, I&#8217;m left feeling a little dissatisfied by all of the scoring mechanisms (my own included).  As Neal pointed out, his ideas are starting points and I&#8217;d like to hear what other people would like to see before proceeding with a different scoring method.</p>
<p style="text-align:justify;">Let me know what you think.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Javascript tutorials]]></title>
<link>http://blackspiderweb.wordpress.com/2009/02/12/8/</link>
<pubDate>Thu, 12 Feb 2009 23:26:22 +0000</pubDate>
<dc:creator>blackspiderweb</dc:creator>
<guid>http://blackspiderweb.wordpress.com/2009/02/12/8/</guid>
<description><![CDATA[Merb is Javascript agnostic and does not come with the many Javascript helpers that Rails provides w]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Merb is Javascript agnostic and does not come with the many Javascript helpers</p>
<p><!--more-->that Rails provides with the Prototype library. This means the level of understanding of Javascript needs to be higher using Merb to get things done.  At the recent Merb training class in Phoenix a fellow participant showed me the site Douglas Crockford has his <a href="http://javascript.crockford.com/" target="_blank">Javascript tutorials</a> posted.  I found them very good in presenting a solid foundation to build on when using Javascript. There is allot of other interesting background on Javascript in general posted there as well.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Merb Herbs]]></title>
<link>http://blog.docuverse.com/2009/02/08/merb-herbs/</link>
<pubDate>Sun, 08 Feb 2009 09:10:20 +0000</pubDate>
<dc:creator>donpark</dc:creator>
<guid>http://blog.docuverse.com/2009/02/08/merb-herbs/</guid>
<description><![CDATA[Just a couple of crumbs from my brush with Merb tonight: dependencies.rb After merb-gen app, edit co]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Just a couple of crumbs from my brush with Merb tonight:</p>
<p><strong>dependencies.rb</strong></p>
<p>After <em>merb-gen app</em>, edit <em>config/dependencies.rb</em> to fix version numbers of <em>dm_gems_version</em> and <em>do_gems_version</em> gems used by the generated app. To find out what which version you have, type</p>
<blockquote><p>gem list {gem-name}.</p></blockquote>
<p><strong>Missing some MySQL dylib on OS X</strong></p>
<p>When I got some errors like &#8220;dyld: NSLinkModule() error &#8220;, probably after doing <em>sudo gem install do_mysql</em> for reasons I can&#8217;t recall, I fixed it with this:</p>
<blockquote><p>sudo mkdir /usr/local/mysql/lib/mysql<br />
cd /usr/local/mysql/lib/mysql<br />
sudo ln -s /usr/local/mysql/lib/*.dylib <strong>.</strong></p></blockquote>
<p><em>I&#8217;ll add to this post over time as more crumbs fall. Note that I am not a Merb, Rails, nor Ruby guy. I am not a guru in anything but everything which means exactly nothing. Yes, I am trying to confuse you. ;-p<br />
</em></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[GlassFish : The Application Server for all Your Web Apps]]></title>
<link>http://techsans.wordpress.com/2009/02/05/glassfish-the-application-server-for-all-your-web-apps/</link>
<pubDate>Wed, 04 Feb 2009 19:48:36 +0000</pubDate>
<dc:creator>sans1601</dc:creator>
<guid>http://techsans.wordpress.com/2009/02/05/glassfish-the-application-server-for-all-your-web-apps/</guid>
<description><![CDATA[Fabulous February started with a Live webcast from California. I agreed to my Invitation to attend t]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Fabulous February started with a Live webcast from California. I agreed to my Invitation to attend the event. It was a wednesday (3/2/09)evening, when I had to review my Laptop for Java Updates and other stuffs for the event. The event was about to begin at 10PM and I launched  my browser and found Mr. Aruna Gupta, GlassFish Evangelist, Sun Microsystems, welcoming the session attendees. It was a great pleasure for me to  attend the Webinar and I thank Mr. Arun Gupta for his talk on GlassFish. I have blogged all about GlassFish which I have carried as notes after the session. I found GlassFish interesting and this Webinar has changed my Application Server from Apache to Glassfish in deploying all my scripts.</p>
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-260" title="logo_glassfish" src="http://techsans.wordpress.com/files/2009/02/logo_glassfish.gif" alt="GlassFish" width="97" height="45" /></dt>
<dd class="wp-caption-dd">GlassFish</dd>
</dl>
</div>
<p style="text-align:justify;">
<p style="text-align:justify;"><strong>GlassFish </strong>is a vibrant community building high-quality, open source software. The main deliverable are the GlassFish application server, the Java Platform, Enterprise Edition(java EE) reference implementation, and the Java Persistence API reference implementation.</p>
<p style="text-align:justify;">Developing Server based Application with the help of clear application specification of Java EE 5 helps us to deploy the application with 100% uptime. The Glassfish which is built on the Java EE compliance is portable. Java EE 5 has API, Technology specification, Production-quality implementation, Comptability Test Suite, themed on ease of development.Here POJO ( Plain Old Java Object) based programming gives us more freedom and fewer requirement in implementation level. The Latest inclusion DRY( Don&#8217;t Repeat Yourself) mechanism allows all the connection strings of the database from the application level to be kept in a songle file making debugging easier and faster access.</p>
<p style="text-align:justify;">The latest Call Flow Monitoring allows us to enable the monitoring of the app server to track the time spent on the EJB Container, Web Container, and EJB Application and lots more enabling us to improve the performance. There is a special Request Time Distribution column showing the time spent on each requests.</p>
<p style="text-align:justify;"><strong>GlassFish TimeLine</strong></p>
<p style="text-align:justify;"><strong></strong><img class="size-full wp-image-259 alignleft" title="gfbasics_developers" src="http://techsans.wordpress.com/files/2009/02/gfbasics_developers.jpg" alt="gfbasics_developers" width="286" height="155" /></p>
<p style="text-align:justify;">June 2005           -    GlassFish Launch</p>
<p style="text-align:justify;">May 2007            -   Version 1 ( With Java EE 5)</p>
<p style="text-align:justify;">Sept 2007            -   Version2</p>
<p style="text-align:justify;">Nov 2008             -   Prelude</p>
<p style="text-align:justify;">Jan 2009              -   Version2.1 (latest)</p>
<p style="text-align:justify;">In Jan 209 500 bugs were fixed to improve stability and it was Java EE 5 Compliance supporting JSP,Servlet, EJB and lots more.</p>
<p style="text-align:justify;"><strong>Certainly Interesting Stats on Glassfish :  GlassFish Usage Map </strong></p>
<p style="text-align:justify;">
<div class="mceTemp mceIEcenter" style="text-align:justify;">
<dl class="wp-caption aligncenter">
<dt class="wp-caption-dt"><img class="size-full wp-image-258" title="glassfish-stats" src="http://techsans.wordpress.com/files/2009/02/glassfish-stats.jpg" alt="A Screenshot showing the Glassfish Usage Map" width="604" height="289" /></dt>
<dd class="wp-caption-dd">A Screenshot showing the Glassfish Usage Map</dd>
</dl>
</div>
<p style="text-align:justify;">GlassFish also supports dynamic Languages and framework like JRuby, Merb, Rails, Ruby, Groovy, Grails, Python, Jython, django, JavaScript and lots more. Quercus should be used for deploying PHP apps in GlassFish.</p>
<p style="text-align:justify;">I&#8217;ll chart the &#8220;To Do&#8221; steps to install GlassFish and Deploy it in your Local Machine&#8230;</p>
<p style="text-align:justify;"><strong>Steps to Deploy GlassFish in your Machine</strong></p>
<p style="text-align:justify;">&#8212;&#62;Download GlassFish V3 Prelude</p>
<p style="text-align:justify;">&#8212;&#62;Unzip GlassFish-V3-Prelude-V28C.Zip</p>
<p style="text-align:justify;">&#8212;&#62;Start: asadmin start domain</p>
<p style="text-align:justify;">It is very simple to install and deploy the Application Server.</p>
<p style="text-align:justify;">We can access the admin console @ http://localhost:4848/</p>
<p style="text-align:justify;">and deploy our applications @ http://localhost:8080</p>
<p style="text-align:justify;"><strong>Some of the Cool Features in GlassFish V3</strong></p>
<p style="text-align:justify;">&#8212;&#62;It can retain session data across HTTP deploys</p>
<p style="text-align:justify;">&#8212;&#62;Embeddable- Runs in -VM</p>
<p style="text-align:justify;">&#8212;&#62;Supports Dynamic Languages</p>
<p style="text-align:justify;">&#8212;&#62;Fastest Start/up Time-2-3 Seconds</p>
<p style="text-align:justify;">&#8212;&#62;Support World Class IDE&#8217;s such as NETBEANS 6.5 and Eclipse</p>
<p style="text-align:justify;">&#8212;&#62;Extensible, Modular, ease to use</p>
<p style="text-align:justify;">&#8212;&#62;Failover Administration, monitoring, messaging, Persistence</p>
<p style="text-align:justify;"><img class="aligncenter size-full wp-image-253" title="l0v3_glassfish-coolthreads" src="http://techsans.wordpress.com/files/2009/02/l0v3_glassfish-coolthreads.jpg" alt="l0v3_glassfish-coolthreads" width="653" height="127" /></p>
<p style="text-align:justify;"><strong>Plan for GlassFish V3</strong></p>
<p style="text-align:justify;">GlassFish v3 is the next major release of the GlassFish Application Server and is currently under development by the GlassFish Community. GlassFish v3 has a modular, lightweight, extensible architecture. The goals are to provide the following:</p>
<ul style="text-align:justify;">
<li> An open, modular, extensible platform</li>
<li> A fast, easy, reliable application server</li>
<li> An enterprise-ready application server with massive scalability and sophisticated administration</li>
<li> Product updates and add-ons through the industry-strength</li>
<li> Support for OSGi</li>
<li> Support for dynamic languages such as Ruby and Groovy</li>
<li> Support for Java EE 6</li>
</ul>
<p style="text-align:justify;">I consider GlassFish as an excellent alternative to lesser featured Tomcat and JBOSS. Netbeans 6.5 comes with GlassFish V2 and V3 bunduled, which makes developing and deploying application easy and effective. GlassFish is the Fastest Open Source Application sever. So from Student to Enterprise, I recommend GlassFish as the Best Application Server for all your Web Apps.</p>
<p style="text-align:justify;"><strong>Tech Talk by Arun Gupta on Ruby/GlassFish</strong></p>
<p style="text-align:justify;"><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/nM6De6taaJA&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' /><param name='allowfullscreen' value='true' /><param name='wmode' value='transparent' /><embed src='http://www.youtube.com/v/nM6De6taaJA&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;hd=0' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='transparent'></embed></object></span></p>
<p style="text-align:justify;"><span style="display:inline;">Sun Microsystems hosted the 30th Super Happy Dev House at it&#8217;s Executive Briefing center in Menlo Park, CA. Over 300 super smart developers gathered to geek it out on the next generation of technologies. During the Lightening Talk period, Arun Gupta (Super Technology Guru Extraordinaire from Sun) talked about Ruby and GlassFish. He ran out of time before being able to showcase Project Kenai, built using Ruby-on-Rails, JRuby, GlassFish, MySQL, and OpenSolaris</span></p>
<p style="text-align:justify;"><strong>For More Learning on GlassFish:</strong></p>
<p style="text-align:justify;">One Stop:   glassfish.org</p>
<p style="text-align:justify;">Student:   spotlight.dev.java.net</p>
<p style="text-align:justify;">Wiki:        wiki.glassfish.java.net</p>
<p style="text-align:justify;">Source Code Repository: glassfish_svn.dev.java.net</p>
<p style="text-align:justify;">Blog sphere:  blogs.sun.com/theaquarium</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Merb 1.0.8.1 無法 render]]></title>
<link>http://codingnote.wordpress.com/2009/02/02/merb-1081-%e7%84%a1%e6%b3%95-render/</link>
<pubDate>Mon, 02 Feb 2009 12:12:29 +0000</pubDate>
<dc:creator>Egg</dc:creator>
<guid>http://codingnote.wordpress.com/2009/02/02/merb-1081-%e7%84%a1%e6%b3%95-render/</guid>
<description><![CDATA[剛剛發生的問題 Merb啟動後對url都有反應(從console看的)，但是browser卻沒收到任何資料 Google一下，在這裡發現了解法 http://www.raecoo.com/2008/1]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>剛剛發生的問題</p>
<p>Merb啟動後對url都有反應(從console看的)，但是browser卻沒收到任何資料</p>
<p>Google一下，在這裡發現了解法</p>
<p>http://www.raecoo.com/2008/12/18/upgrade-merb-cause-nothing-to-render/</p>
<p>結論就是merb-action-args有bug</p>
<p>請把它從dependencies.rb註解掉</p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
