<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Matt Fawcett : Tag sinatra, everything about sinatra</title>
    <link>http://matthewfawcett.co.uk</link>
    <atom:link type="application/rss+xml" rel="self" href="http://matthewfawcett.co.uk/tag/sinatra.rss"/>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Playing with Node.js</title>
      <description>&lt;p&gt;Today I decided to have a look at &lt;a href="http://nodejs.org/"&gt;Node.js&lt;/a&gt;. I have heard quite a lot about it but have avoided looking at it for a while. Node.js provides a way of building server side network programs, written in Javascript. I took a look at a tutorial over at &lt;a href="http://simonwillison.net/2009/Nov/23/node/"&gt;http://simonwillison.net/2009/Nov/23/node/&lt;/a&gt; for installing Node and building a simple Hello World web service. I ran an apache benchmark test and was suprised with the results. I managed to get 6075 requests per second on my Macbook Pro!&lt;/p&gt;

&lt;p&gt;To compare it with something that I'm used to, I wrote the same Hello World script service Sinatra and served it up using the thin webserver, which gave me 1606 requests per second which is quite a difference.&lt;/p&gt;

&lt;p&gt;The 2 scripts and apache benchmark outputs are below:&lt;/p&gt;

&lt;script src="http://gist.github.com/309322.js"&gt;&lt;/script&gt;


</description>
      <pubDate>Fri, 19 Feb 2010 22:47:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c59ed839-e749-418b-ac71-a1a213773546</guid>
      <comments>http://matthewfawcett.co.uk/2010/02/19/playing-with-node-js#comments</comments>
      <category>node.js</category>
      <category>sinatra</category>
      <link>http://matthewfawcett.co.uk/2010/02/19/playing-with-node-js</link>
    </item>
    <item>
      <title>Monit Aggregator - A Sinatra interface for Monit</title>
      <description>&lt;p&gt;I use Monit to keep an eye on server processes and restart them if they go down. It comes with a useful web interface that gives you an overview of your servers health, and what processes are up/down. If you have a lot of servers then it can be a bit of a pain because you have to access each web Interface with a different URL.&lt;/p&gt;


&lt;p&gt;This weekened I wrote a Sinatra app that aggregates the data from each web interface and displays it all on one page. The source is on &lt;a href="http://github.com/mattfawcett/monit-aggregator/tree/master"&gt;Github&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;It currently does not support HTTPS, and it only currently displays the overall system and individual processes. &lt;/p&gt;


&lt;p&gt;&amp;nbsp;&lt;/p&gt;


&lt;p&gt;To get going, install the dependant gems&lt;/p&gt;


&lt;p&gt;&lt;div class="CodeRay"&gt;&lt;pre&gt;gem install sinatra nokogiri haml&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;


&lt;p&gt;&amp;nbsp;&lt;/p&gt;


&lt;p&gt;Now clone the repo&lt;/p&gt;


&lt;p&gt;&lt;div class="CodeRay"&gt;&lt;pre&gt;git clone git://github.com/mattfawcett/monit-aggregator.git&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;


&lt;p&gt;&amp;nbsp;&lt;/p&gt;


&lt;p&gt;Then edit the monit_installations.yml file to include the details of each of your Monit web servers. To start the app running just type&lt;/p&gt;


&lt;p&gt;&lt;div class="CodeRay"&gt;&lt;pre&gt;ruby app.rb&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;


&lt;p&gt;&amp;nbsp;&lt;/p&gt;


&lt;p&gt;Open your browser to http://yourdomain.com:4567&lt;/p&gt;


&lt;p&gt;Alternatively you could run with Passenger.&lt;/p&gt;


&lt;p&gt;There is also a free hosted version available on my server monitoring site &lt;a href="http://runslikeclockwork.com"&gt;Runs Like Clockwork&lt;/a&gt;&lt;/p&gt;


</description>
      <pubDate>Sun, 05 Jul 2009 16:41:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:ad7683d1-1118-4d60-869d-c157ba19a17c</guid>
      <comments>http://matthewfawcett.co.uk/2009/07/05/monit-aggregator-a-sinatra-interface-for-monit#comments</comments>
      <category>monit</category>
      <category>aggregator</category>
      <category>sinatra</category>
      <category>ruby</category>
      <trackback:ping>http://matthewfawcett.co.uk/trackbacks?article_id=10</trackback:ping>
      <link>http://matthewfawcett.co.uk/2009/07/05/monit-aggregator-a-sinatra-interface-for-monit</link>
    </item>
  </channel>
</rss>

