<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>hack en stock &#187; ruby</title>
	<atom:link href="http://frederic.logier.org/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://frederic.logier.org</link>
	<description>les aventures d&#039;un gouiker au pays du logiciel libre</description>
	<lastBuildDate>Tue, 17 Jan 2012 21:18:51 +0000</lastBuildDate>
	<language>fr</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='frederic.logier.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>hack en stock &#187; ruby</title>
		<link>http://frederic.logier.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://frederic.logier.org/osd.xml" title="hack en stock" />
	<atom:link rel='hub' href='http://frederic.logier.org/?pushpress=hub'/>
		<item>
		<title>Une API asynchrone avec Gearman, Sinatra et mongoID</title>
		<link>http://frederic.logier.org/2010/06/22/une-api-asynchrone-avec-gearman-sinatra-et-mongoid/</link>
		<comments>http://frederic.logier.org/2010/06/22/une-api-asynchrone-avec-gearman-sinatra-et-mongoid/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 08:17:32 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[gearman]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://frederic.logier.org/?p=222</guid>
		<description><![CDATA[Même si Ruby on Rails facilite énormément la création d&#8217;une API REST il y a un grand intérêt à séparer le site frontal de l&#8217;API. Le site peut subir des montées en charge ou une coupure de maintenance qui occasionnerait de fait une interruption de l&#8217;API. Or s&#8217;il peut être gênant que le frontal soit interrompu, ça [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=222&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Même si Ruby on Rails facilite énormément la création d&#8217;une API REST il y a un grand intérêt à séparer le site frontal de l&#8217;API. Le site peut subir des montées en charge ou une coupure de maintenance qui occasionnerait de fait une interruption de l&#8217;API. Or s&#8217;il peut être gênant que le frontal soit interrompu, ça l&#8217;est encore plus pour l&#8217;API qui permet de mettre à jour des données ou de les fournir à une multitude de clients tiers. Dans ce billet je présente sans aller trop loin dans les détails, la création de cette API.<span id="more-222"></span><a href="http://www.sinatrarb.com" target="_blank"></a></p>
<p><a href="http://www.sinatrarb.com" target="_blank">Sinatra</a> est un framework web léger non MVC qui permet via son DSL de répondre à toutes les méthodes HTTP (DELETE, PUT,POST,GET) simplement et en utilisant un seul fichier Ruby. <a href="http://www.sinatrarb.com/intro" target="_blank">L&#8217;introduction</a> démontre la plupart de ses capacités. C&#8217;est à mon avis idéal pour servir une API plutôt que de sortir l&#8217;artillerie lourde Rails.</p>
<p><a href="http://mongoid.org/" target="_blank">MongoID</a> est un driver Ruby pour la base NoSQL <a href="http://www.mongodb.org/" target="_blank">mongoDB</a>. Il est en concurrence avec <a href="http://mongomapper.com/" target="_blank">MongoMapper</a>.</p>
<p><a href="http://gearman.org/" target="_blank">Gearman</a> est un serveur qui fait parti des innombrables serveur de job. En effet depuis ces dernières années un nouveau serveur sort tous les 6 mois ou presque avec plus ou moins de succès. Parmi ceux-ci on peut citer <a href="http://kr.github.com/beanstalkd/" target="_blank">Beanstalkd</a> ou <a href="http://www.rabbitmq.com/" target="_blank">RabbitMQ</a>, il existe un &#8220;vieux&#8221; (1 an) comparatif non exhaustif de quelques serveurs de job <a href="http://www.darkcoding.net/software/choosing-a-message-queue-for-python-on-ubuntu-on-a-vps/" target="_blank">Choosing a message queue for Python on Ubuntu on a VPS</a>. Pour ajouter au trouble on peut trouver parmi eux des serveurs NoSQL type clé/valeur comme redis avec le plugin <a href="http://github.com/defunkt/resque" target="_blank">Resque</a>.</p>
<p>Je travaille depuis quelques mois sur mon projet <a href="http://www.nodecast.net" target="_blank">Nodecast</a> et je souhaitais rendre l&#8217;API asynchrone. Le principe du projet est qu&#8217;un client desktop extrait régulièrement des informations systèmes et les transmet au site web. Un serveur <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> expose l&#8217;API et enregistre les données dans MongoDB. Le problème est que si de plus en plus clients viennent pusher leurs données sur le serveur Sinatra, celui-ci aura forcément de plus en plus de mal à encaisser la charge. Avec une architecture de ce type entre la requête HTTP POST du client et la réponse du serveur, tout fonctionne de manière synchrone, de fait si le serveur Sinatra atteins son pallier il ne sera plus en mesure de répondre à de nouvelles requêtes. Il est nécessaire que l&#8217;échange entre le client et le serveur Sinatra soit le plus rapide possible.</p>
<p>Pour cela il est essentiel de découpler l&#8217;interaction entre le serveur et le travail effectué. Pour comprendre cela imaginons que le client ne transmette pas d&#8217;informations systèmes mais carrément une vidéo que le serveur devra par exemple ré-encoder. Il n&#8217;est pas concevable que lorsque le client (desktop ou browser) a fini de poster la vidéo, l&#8217;utilisateur doive encore attendre la fin du réencodage du film avant d&#8217;avoir la main. Ce travail de ré-encodage doit s&#8217;effectuer dans un 2ème temps.</p>
<p>La première règle à définir est que l&#8217;échange entre le client et le serveur doit s&#8217;effectuer le plus vite possible, c&#8217;est un échange du type &#8220;fire and forget&#8221;. Pour cela lorsque le client desktop poste les informations, le serveur ne doit renvoyer qu&#8217;un acknowledge et aucune autre information permettant au client de savoir si le travail s&#8217;est bien effectué. Car si c&#8217;était le cas on reviendrait à un fonctionnement synchrone &#8230; Cependant rien empêche le serveur de renvoyer au client un identifiant unique afin de lui permettre par la suite de connaitre via une autre requête l&#8217;état de du travail envoyé.</p>
<p>Pour rendre cela possible il est nécessaire de séparer le code qui réceptionne la requête du code qui va traiter la demande. Il manque un tampon entre les deux, car le code qui va traiter la demande, le worker, peut être justement occupé à en traiter une. L&#8217;intérêt d&#8217;un serveur de job (appelé aussi serveur de file de message) est de stocker le job et le transmettre au worker lorsque celui-ci en fait la demande. Dans l&#8217;industrie il existe le protocole <a href="http://www.amqp.org" target="_blank">AMQP</a> que RabbitMQ implémente. Je n&#8217;ai malheureusement pas réussi à faire lancer ce dernier sur mon serveur Ubuntu 10.04. J&#8217;ai découvert Gearman qui est presque aussi simple d&#8217;usage sur Beanstalkd tout en proposant des capacités de montée en charge, un worker pouvant s&#8217;abonner à plusieurs serveurs Gearman. De plus cet outil est développé par <a href="http://www.danga.com/gearman/" target="_blank">Danga</a> pour LiveJournal, voir leur présentation sur le backend de LiveJournal : <a href="http://www.slideshare.net/SergeyChernyshev/behind-the-scenes-at-livejournal-scaling-storytime-158352" target="_blank">Behind the Scenes at LiveJournal: Scaling Storytime</a>.</p>
<p>Sinatra expose l&#8217;API, réceptionne les demandes des clients, les transmet aussitôt à Gearman dans une file nommée en fonction du job (update,insert,&#8230;) puis renvoie aussitôt un ack au client desktop pour lui confirmer que sa requête est prise en compte. Sinatra est donc rapidement disponible à réceptionner une nouvelle requête. Le worker est abonné aux files d&#8217;attente dont il a la charge, il supprime le job du serveur afin de le traiter. Enfin Gearman offre la possibilité au worker de retourner au client l&#8217;état du travail effectué. Le client, ici Sinatra, dispose de ces 3 méthodes :</p>
<div id="_mcePaste">task.on_complete {|d| logger.info &#8220;complete : #{d}&#8221; }</div>
<div id="_mcePaste">task.on_warning {|w| logger.info &#8220;[client] warn: #{w}&#8221; }</div>
<div id="_mcePaste">task.on_fail {|f| logger.info &#8220;[client] failed : #{f}&#8221; }</div>
<p>Il peut ainsi stocker dans un fichier de log le statut du worker.</p>
<p>Voici le code du client Sinatra lancé par Thin :</p>
<pre>#!/usr/bin/env ruby
require 'rubygems'

require 'gearman'

require "bundler"

Bundler.setup

Bundler.require(:default)

RAILS_ENV="development"

Gearman::Util.debug = true

SERVERS = ['localhost:4730']

logger = Logger.new('log/server.log', 'daily')

logger.debug("Created logger")

File.open(File.join('../config/database.mongo.yml'), 'r') do |f|

@settings = YAML.load(f)[RAILS_ENV]

end

Mongoid.configure do |config|

name = @settings["database"]

host = @settings["host"]

config.use_object_ids = @settings["use_object_ids"]

logger.info "database : #{name}"

logger.info "host : #{host}"

config.master = Mongo::Connection.new.db(name)

end

require 'models_mongoid/user.rb'

require 'models_mongoid/profil.rb'

require 'models_mongoid/host.rb'

set :logging, true

helpers do

def protected!

unless authorized?

response['WWW-Authenticate'] = %(Basic realm="Nodecast HTTP Auth")

throw(:halt, [401, "Not authorized\n"])

end

end

def authorized?

@auth ||=  Rack::Auth::Basic::Request.new(request.env)

# logger.info "AUTH = #{@auth.inspect}"

@current_user = User.where(:email =&gt; @auth.credentials.first, :authentication_token =&gt; @auth.credentials.last).first

@auth.provided? &amp;&amp; @auth.basic? &amp;&amp; @current_user

end

end

post '/hosts.xml' do

protected!

xml = Crack::XML.parse(request.body.read)

logger.info("POST")

uuid = UUIDTools::UUID.timestamp_create.to_s

host = {

:user =&gt; @current_user.email,

:uuid =&gt; uuid,

:datas =&gt; xml

}

client = Gearman::Client.new(SERVERS)

taskset = Gearman::Taskset.new

# task = Gearman::Task.new('add', Marshal.dump(xml), :background =&gt; true, :poll_status_interval =&gt; 1)

task = Gearman::Task.new('add', Marshal.dump(host))

task.on_complete {|d| logger.info "complete : #{d}" }

task.on_warning {|w| logger.info "[client] warn: #{w}" }

task.on_fail {|f| logger.info "[client] calculation failed : #{f}" }

taskset &lt;&lt; task

client.run(taskset)

builder do |xml|

xml.instruct!

xml.host do

xml.uuid host[:uuid]

end

end

end

put '/host/update/:id' do

protected!

xml = Crack::XML.parse(request.body.read)

host = {

:user =&gt; @current_user.email,

:uuid =&gt; params[:id],

:datas =&gt; xml

}

logger.info("UPDATE")

client = Gearman::Client.new(SERVERS)

taskset = Gearman::Taskset.new

#task = Gearman::Task.new('update', Marshal.dump(host), :background =&gt; true, :poll_status_interval =&gt; 1)

task = Gearman::Task.new('update', Marshal.dump(host))

task.on_complete {|d| logger.info "complete : #{d}" }

task.on_warning {|w| logger.info "[client] warn: #{w}" }

task.on_fail {|f| logger.info "[client] calculation failed : #{f}" }

taskset &lt;&lt; task

client.run(taskset)

builder do |xml|

xml.instruct!

xml.host do

xml.status "proceed"

end

end

end</pre>
<p>et le code du worker lancé par un script daemons</p>
<pre>#!/usr/bin/env ruby
require 'rubygems'

gem 'mongoid', '1.9.0'
require 'mongoid'
gem 'gearman-ruby', '2.0.0'
require 'gearman'
require 'uuidtools'
require 'logger'
require 'yaml'
require 'optparse'
require "pp"

options = {}

optparse = OptionParser.new do |opts|
  opts.on('-w', '--work WORK', 'path to the work directory') do |work|
    options[:work] = work
  end
  opts.on('-m', '--mongo MONGO', 'path to the mongo file') do |mongo|
    options[:mongo] = mongo
  end
  opts.on('-e', '--env ENV', 'rails environment') do |env|
    options[:env] = env
  end
end

begin
  optparse.parse!
  mandatory = [:work, :mongo, :env]
  missing = mandatory.select{ |param| options[param].nil? }
  if not missing.empty?
    puts "Missing options: #{missing.join(', ')}"
    puts optparse
    exit
  end
rescue OptionParser::InvalidOption, OptionParser::MissingArgument
  puts $!.to_s
  puts optparse
  exit
end

puts "Performing task with options: #{options.inspect}"            

Gearman::Util.debug = true if options[:env] == "development"

servers = ['localhost:4730']
@@worker = Gearman::Worker.new(servers)

logger = Logger.new("#{options[:work]}/log/worker.log", 'daily')
logger.debug("Created logger")

File.open(File.join("#{options[:mongo]}/database.mongo.yml"), 'r') do |f|
  @settings = YAML.load(f)[options[:env]]
end

Mongoid.configure do |config|
  name = @settings["database"]
  host = @settings["host"]
  config.use_object_ids = @settings["use_object_ids"]
  logger.info "database : #{name}"
  logger.info "host : #{host}"
  config.master = Mongo::Connection.new.db(name)
end

require "#{options[:work]}/models_mongoid/user.rb"
require "#{options[:work]}/models_mongoid/profil.rb"
require "#{options[:work]}/models_mongoid/host.rb"
require "#{options[:work]}/models_mongoid/osystem.rb"
require "#{options[:work]}/models_mongoid/load_statistic.rb"
require "#{options[:work]}/models_mongoid/memory_statistic.rb"
require "#{options[:work]}/models_mongoid/uptime_statistic.rb"
require "#{options[:work]}/models_mongoid/network_statistic.rb"
require "#{options[:work]}/models_mongoid/cpu_statistic.rb" 

########## JOB ADD HOST ############
@@worker.add_ability('add') do |data,job|

  dump = Marshal.load(data)
  xml = dump[:datas]

  @current_user = User.where(:email =&gt; dump[:user]).first

  p "user = #{@current_user.inspect}"

  push_host = {
    :uuid =&gt; dump[:uuid],
    :public =&gt; xml['host']['public'],
    <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> s_version =&gt; xml['host']['version'],
    :patch_level =&gt; xml['host']['patch_level'].nil? ? "" : xml['host']['patch_level'].downcase,
    :cpu_vendor =&gt; xml['host']['cpu_vendor'],
    :architecture =&gt; xml['host']['architecture'],
    :cpu_model =&gt; xml['host']['cpu_model'],
    :cpu_mhz =&gt; xml['host']['cpu_mhz'],
    :cpu_cache_size =&gt; xml['host']['cpu_cache_size'],
    :cpu_number =&gt; xml['host']['cpu_number'],
    :cpu_total_cores =&gt; xml['host']['cpu_total_cores'],
    :cpu_total_sockets =&gt; xml['host']['cpu_total_sockets'],
    :cpu_cores_per_socket =&gt; xml['host']['cpu_cores_per_socket'],
    :mem_ram =&gt; xml['host']['mem_ram'],
    :mem_total =&gt; xml['host']['mem_total'],
    :hostname =&gt; xml['host']['hostname'],
    :domain_name =&gt; xml['host']['domain_name'],
    :default_gateway =&gt; xml['host']['default_gateway'],
    :primary_dns =&gt; xml['host']['primary_dns'],
    :secondary_dns =&gt; xml['host']['secondary_dns'],
    :primary_interface =&gt; xml['host']['primary_interface'],
    :primary_addr =&gt; xml['host']['primary_addr'],
    :user_id =&gt; @current_user.id
  }

  host_uptime = {
    :time =&gt; xml['host']['uptime_time'],
    :days =&gt; xml['host']['uptime_days']
  }

  host_load = {
    :loadavg0 =&gt; xml['host']['loadavg0'],
    :loadavg1 =&gt; xml['host']['loadavg1'],
    :loadavg2 =&gt; xml['host']['loadavg2']
  }

  host_mem = {
    :mem_used =&gt; xml['host']['mem_used'],
    :mem_free =&gt; xml['host']['mem_free'],
    :mem_actual_free =&gt; xml['host']['mem_actual_free'],
    :mem_actual_used =&gt; xml['host']['mem_actual_used'],
    :mem_actual_free_percent =&gt; xml['host']['mem_actual_free_percent'],
    :mem_actual_used_percent =&gt; xml['host']['mem_actual_used_percent'],
    :swap_total =&gt; xml['host']['swap_total'],
    :swap_used =&gt; xml['host']['swap_used'],
    :swap_free =&gt; xml['host']['swap_free'],
    :swap_page_in =&gt; xml['host']['swap_page_in'],
    :swap_page_out =&gt; xml['host']['swap_page_out']
    }

  host_network = {
    :rx_rate =&gt; xml['host']['rx_rate'],
    :tx_rate =&gt; xml['host']['tx_rate']
  }

  host_cpu = {
    :user =&gt; xml['host']['cpu_user'],
    :sys =&gt; xml['host']['cpu_sys'],
    :nice =&gt; xml['host']['cpu_nice'],
    :idle =&gt; xml['host']['cpu_idle'],
    :wait =&gt; xml['host']['cpu_wait'],
    :irq =&gt; xml['host']['cpu_irq'],
    :soft_irq =&gt; xml['host']['cpu_soft_irq'],
    :stolen =&gt; xml['host']['cpu_stolen'],
    :combined =&gt; xml['host']['cpu_combined'],
    :total =&gt; xml['host']['cpu_total']
  }

  begin
    profil = @current_user.profils.where(:context =&gt; xml['host']['profil']).first

    if !profil
      profil = @current_user.profils.create(:context  =&gt; xml['host']['profil'])
    end

    @host = profil.hosts.create(push_host)

    osystem = Osystem.where(:vendor =&gt; xml['host']['vendor'].downcase, :vendor_version =&gt; xml['host']['vendor_version'].downcase).first

    if !osystem
      osystem = Osystem.create(
                               :name =&gt; xml['host']['name'].downcase,
                               :vendor =&gt; xml['host']['vendor'].downcase,
                               :vendor_version =&gt; xml['host']['vendor_version'].downcase,
                               :vendor_code_name =&gt; xml['host']['vendor_code_name'].nil? ? "" : xml['host']['vendor_code_name'].downcase,
                               :description =&gt; xml['host']['description'],
                               <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> s_base =&gt; xml['host']['os_base'],
                               <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> s_type =&gt; xml['host']['os_type']
                               )
    end

    @host.osystem_id = osystem.id
    osystem.hosts_number += 1
    osystem.save
    @host.save

    if xml['host']['activated_memory'] == "true"
      @host.memory_statistics.create(host_mem)
    end

    if xml['host']['activated_load'] == "true"
      @host.load_statistics.create(host_load)
    end

    if xml['host']['activated_uptime'] == "true"
      @host.uptime_statistics.create(host_uptime)
    end

    if xml['host']['activated_network'] == "true"
      @host.network_statistics.create(host_network)
    end

    if xml['host']['activated_cpu'] == "true"
      @host.cpu_statistics.create(host_cpu)
    end

  rescue =&gt; e
    logger.info "error on create host : #{e}"
  end

  @current_user.hosts_number += 1
  @current_user.save

logger.info "created"
end

########## JOB UPDATE HOST ############
@@worker.add_ability('update') do |data,job|

  dump = Marshal.load(data)
  xml = dump[:datas]

  @current_user = User.where(:email =&gt; dump[:user]).first
  @host = Host.where(:uuid =&gt; dump[:uuid], :blocked =&gt; false).first

  if !@host
logger.info "host unknown"

  elsif @current_user.hosts.include?(@host)
    # os = Osystem.find(:all, :conditions =&gt; "lower(name) = '#{xml['host'][:os_name].downcase}' AND lower(codename) LIKE '%#{xml['host'][:os_codename].downcase}%' AND version = '#{xml['host'][:os_release]}' AND computer_architecture = '#{xml['host'][:architecture]}'")

    host_uptime = {
      :time =&gt; xml['host']['uptime_time'],
      :days =&gt; xml['host']['uptime_days']
    }

    host_load = {
      :loadavg0 =&gt; xml['host']['loadavg0'],
      :loadavg1 =&gt; xml['host']['loadavg1'],
      :loadavg2 =&gt; xml['host']['loadavg2']
    }

    host_mem = {
      :mem_used =&gt; xml['host']['mem_used'],
      :mem_free =&gt; xml['host']['mem_free'],
      :mem_actual_free =&gt; xml['host']['mem_actual_free'],
      :mem_actual_used =&gt; xml['host']['mem_actual_used'],
      :mem_actual_free_percent =&gt; xml['host']['mem_actual_free_percent'],
      :mem_actual_used_percent =&gt; xml['host']['mem_actual_used_percent'],
      :swap_total =&gt; xml['host']['swap_total'],
      :swap_used =&gt; xml['host']['swap_used'],
      :swap_free =&gt; xml['host']['swap_free'],
      :swap_page_in =&gt; xml['host']['swap_page_in'],
      :swap_page_out =&gt; xml['host']['swap_page_out']
    }

    host_network = {
      :rx_rate =&gt; xml['host']['rx_rate'],
      :tx_rate =&gt; xml['host']['tx_rate']
    }

    host_cpu = {
      :user =&gt; xml['host']['cpu_user'],
      :sys =&gt; xml['host']['cpu_sys'],
      :nice =&gt; xml['host']['cpu_nice'],
      :idle =&gt; xml['host']['cpu_idle'],
      :wait =&gt; xml['host']['cpu_wait'],
      :irq =&gt; xml['host']['cpu_irq'],
      :soft_irq =&gt; xml['host']['cpu_soft_irq'],
      :stolen =&gt; xml['host']['cpu_stolen'],
      :combined =&gt; xml['host']['cpu_combined'],
      :total =&gt; xml['host']['cpu_total']
    }

    begin

      if xml['host']['profil'] != @host.profil.context
        profil = @current_user.profils.where(:context =&gt; xml['host']['profil']).first
        if !profil
          profil = @current_user.profils.create(:context  =&gt; xml['host']['profil'])
        end
        @host.profil = profil
        @host.save
      end

         if xml['host']['activated_memory'] == "true"
           mem = @host.memory_statistics.create(host_mem)
         end

         if xml['host']['activated_load'] == "true"
           @host.load_statistics.create(host_load)
         end

         if xml['host']['activated_uptime'] == "true"
           @host.uptime_statistics.create(host_uptime)
         end

         if xml['host']['activated_network'] == "true"
           @host.network_statistics.create(host_network)
         end

         if xml['host']['activated_cpu'] == "true"
           @host.cpu_statistics.create(host_cpu)
         end

         logger.info "updated"

    rescue =&gt; e
      logger.info "failed on update : #{e}"
      raise Exception.new("failed on update : #{e}")
    end

  else
    logger.info "unauthorized update"
    raise Exception.new("unauthorized update")
  end
end

@@worker.work</pre>
<br />Classé dans:<a href='http://frederic.logier.org/category/rails/'>rails</a>, <a href='http://frederic.logier.org/category/ruby/'>ruby</a> Tagged: <a href='http://frederic.logier.org/tag/gearman/'>gearman</a>, <a href='http://frederic.logier.org/tag/mongodb/'>mongodb</a>, <a href='http://frederic.logier.org/tag/sinatra/'>sinatra</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=222&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2010/06/22/une-api-asynchrone-avec-gearman-sinatra-et-mongoid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>RubyCamp</title>
		<link>http://frederic.logier.org/2009/02/23/rubycamp-2/</link>
		<comments>http://frederic.logier.org/2009/02/23/rubycamp-2/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 13:52:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2009/02/23/rubycamp-2/</guid>
		<description><![CDATA[Le premier RubyCamp s’est bien déroulé ce samedi. Je remercie Damien Mathieu pour l’organisation et O2Sources pour avoir sponsorisé l’évènement avec des pizzas . Quelques Suisses avaient fait le trajet, Jean-Michel Garnier un expatrié en Espagne que j’avais déjà vu à Paris on Rails présentait cucumber. Guillaume Cottenceau (ancien développeur de frozen bubble) a présenté [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=89&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>Le premier RubyCamp s’est bien déroulé ce samedi. Je remercie Damien Mathieu pour l’organisation et <a href="http://www.o2sources.com/">O2Sources</a> pour avoir sponsorisé l’évènement avec des pizzas <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p>Quelques Suisses avaient fait le trajet, Jean-Michel Garnier un expatrié en Espagne que j’avais déjà vu à Paris on Rails présentait <a href="http://wiki.github.com/aslakhellesoy/cucumber">cucumber</a>. Guillaume Cottenceau (ancien développeur de frozen bubble) a présenté Ruby/GTK+. Damien a présenté Ruby et Gaspard Bucher un impressionnant compilateur de template (<a href="http://zenadmin.org/en/zafu">zafu</a>).</p>
<p>Pour un premier Barcamp à Lyon j’ai trouvé ça très réussi et on est tous d’accord pour remettre ça cette année. Toutes les infos sur le wiki <a href="http://barcamp.org/RubyCampLyon">RubyCampLyon</a>.</p>
<p><a href="http://flickr.com/photos/kaztor/sets/72157614295192224/">Photos</a> et <a href="http://picasaweb.google.fr/brice.favre/RubyCamp?authkey=bt-tbT8YbkE">photos</a></p>
</p></div>
<br />Publié dans MondeLibre, ruby  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/89/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/89/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/89/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=89&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2009/02/23/rubycamp-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>RubyCamp</title>
		<link>http://frederic.logier.org/2009/01/31/rubycamp/</link>
		<comments>http://frederic.logier.org/2009/01/31/rubycamp/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 13:54:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2009/01/31/rubycamp/</guid>
		<description><![CDATA[Je n’avais pas posté depuis 2 mois, donc puisqu’on est encore en janvier jusqu’à ce soir, je vous souhaite une bonne année Comme l’indique le titre il va y avoir un Barcamp à Lyon le 21 février consacré à Ruby. Je viens de m’y inscrire, et même si je n’ai aucune idée de ce que [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=87&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>Je n’avais pas posté depuis 2 mois, donc puisqu’on est encore en janvier jusqu’à ce soir, je vous souhaite une bonne année <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Comme l’indique le titre il va y avoir un <a href="http://barcamp.org/RubyCampLyon">Barcamp à Lyon le 21 février</a> consacré à Ruby. Je viens de m’y inscrire, et même si je n’ai aucune idée de ce que je pourrais présenter cela sera l’occasion de revoir ce bon vieux Guillaume Desrat ainsi que Lucas Bonnet <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Avec de la chance j’aurais peut être avancé un peu sur mon projet perso en Rails, et aurais 2-3 trucs à dire… En tout cas ça serait bien que ce genre de réunion soit récurrente, car c’est très frustrant de voir régulièrement des actions à Paris et rien à Lyon.</p>
</p></div>
<br />Publié dans MondeLibre, ruby  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/87/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/87/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/87/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=87&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2009/01/31/rubycamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>before_filter :rails_party</title>
		<link>http://frederic.logier.org/2008/11/24/before_filter-rails_party/</link>
		<comments>http://frederic.logier.org/2008/11/24/before_filter-rails_party/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 13:56:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2008/11/24/before_filter-rails_party/</guid>
		<description><![CDATA[Si vous suivez l’actualité RubyonRails, vous savez sans doute que l’édition 2008 de Paris on Rails a lieu le 1er décembre à la Cité des sciences. Par contre vous ne savez peut être pas qu’une Rails party est organisé la vieille ce dimanche 30 novembre. Toutes les infos ici : rails party 2008 et inscription [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=86&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>Si vous suivez l’actualité RubyonRails, vous savez sans doute que l’édition 2008 de <a href="http://paris.onrails.info/">Paris on Rails</a> a lieu le 1er décembre à la Cité des sciences. Par contre vous ne savez peut être pas qu’une Rails party est organisé la vieille ce dimanche 30 novembre. Toutes les infos ici : <a href="http://www.rubyfrance.org/evenements/rails-party-2008">rails party 2008</a> et <a href="http://railsparty.ror.bearstech.com/">inscription ici</a>. Ils ont bien de la chance ces parisiens ! Quand est-ce que Lyon sera à la hauteur de sa dimension … ?</p>
<p>Pour enchainer sur le thème Ruby, j’ai réalisé une nouvelle et sans doute dernière version de <a href="http://download.gna.org/geekast/geekast-0.1.3.tgz">Geekast 0.1.3</a> afin de fixer ce <a href="https://bugs.launchpad.net/ubuntu/+source/geekast/+bug/237032">bug</a>. <a href="http://peercast.org/">Peercast</a> n’étant plus maintenu par son développeur la motivation n’y est plus et je suis de plus en apprentissage du C++ sur <a href="http://github.com/fredix/imotion/tree/master">iMotion</a> un autre projet perso. Quoi qu’il en soit je ne compte pas abandonner Ruby qui est un vrai plaisir à utiliser et complémentaire à un langage compilé.</p>
</p></div>
<br />Publié dans MondeLibre, rails, ruby  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=86&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2008/11/24/before_filter-rails_party/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>De la répartition de charge en Ruby on Rails</title>
		<link>http://frederic.logier.org/2008/01/22/de-la-repartition-de-charge-en-ruby-on-rails/</link>
		<comments>http://frederic.logier.org/2008/01/22/de-la-repartition-de-charge-en-ruby-on-rails/#comments</comments>
		<pubDate>Tue, 22 Jan 2008 14:56:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[XMPP]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2008/01/22/de-la-repartition-de-charge-en-ruby-on-rails/</guid>
		<description><![CDATA[Je viens de publier un article en 2 parties sur le blog d’AF83 : De la répartition de charge en Ruby on Rails 1/2 De la répartition de charge en Ruby on Rails 2/2 C’est plutôt technique, et présente une solution parmi tant d’autres dans ce domaine très particulier.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=64&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>Je viens de publier un article en 2 parties sur le blog d’AF83 :</p>
<p><a href="http://dev.af83.com/ruby/de-la-repartition-de-charge-en-ruby-on-rails-12/2008/01/22/">De la répartition de charge en Ruby on Rails 1/2</a></p>
<p><a href="http://dev.af83.com/ruby/de-la-repartition-de-charge-en-ruby-on-rails-22/2008/01/22/">De la répartition de charge en Ruby on Rails 2/2</a></p>
<p>C’est plutôt technique, et présente une solution parmi tant d’autres dans ce domaine très particulier.</p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fredix.wordpress.com/64/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fredix.wordpress.com/64/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=64&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2008/01/22/de-la-repartition-de-charge-en-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>RubyFrance.org est né</title>
		<link>http://frederic.logier.org/2006/11/02/rubyfrance-org-est-ne/</link>
		<comments>http://frederic.logier.org/2006/11/02/rubyfrance-org-est-ne/#comments</comments>
		<pubDate>Thu, 02 Nov 2006 15:16:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2006/11/02/rubyfrance-org-est-ne/</guid>
		<description><![CDATA[Et voilà le petit vient de naître. J’ai le grand plaisir d’annoncer la naissance officielle du site web RubyFrance. Ce site utilise RadiantCMS, Mongrel, Apache2 et PostgreSQL Que du bon Bien sûr pour l’instant le site est vide mais il se remplira à mesure. J’espère que nous aurons quelque chose de présentable lors de Paris [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=53&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>Et voilà le petit vient de naître. J’ai le grand plaisir d’annoncer la naissance officielle du site web <a href="http://www.rubyfrance.org/">RubyFrance</a>.</p>
<p>Ce site utilise <a href="http://radiantcms.org/">RadiantCMS</a>, <a href="http://mongrel.rubyforge.org/">Mongrel</a>, <a href="http://httpd.apache.org/">Apache2</a> et <a href="http://www.postgresqlfr.org/">PostgreSQL</a> Que du bon <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Bien sûr pour l’instant le site est vide mais il se remplira à mesure. J’espère que nous aurons quelque chose de présentable lors de <a href="http://paris.onrails.info/">Paris on Rails</a>.</p>
</div>
<p>     <a name="comments"></a><br />
<h4 class="blueblk">Comments</h4>
<ol class="comment-list">
<li>   <a name="comment-14"></a>   <img alt="Avatar" class="gravatar" src="http://www.gravatar.com/avatar.php?gravatar_id=d41d8cd98f00b204e9800998ecf8427e&amp;size=60" />   <cite><strong><a href="http://www.lacomte.net/">jean-mi</a></strong> </cite> a dit 24 minutes later:<br /> 
<p>Oui enfin, que ce instiki disparaisse à jamais dans les flammes de l’enfer.</p>
<p><span class="caps">DHH</span> devait avoir trop bu après avoir fêté la release de rails.</p>
</li>
<li>   <a name="comment-16"></a>   <img alt="Avatar" class="gravatar" src="http://www.gravatar.com/avatar.php?gravatar_id=d41d8cd98f00b204e9800998ecf8427e&amp;size=60" />   <cite><strong>fredix</strong> </cite> a dit 29 minutes later:<br /> 
<p>C’est clair, entre Instiki et Hiki on en a bavé.</p>
</li>
</ol>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fredix.wordpress.com/53/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fredix.wordpress.com/53/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=53&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2006/11/02/rubyfrance-org-est-ne/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>

		<media:content url="http://www.gravatar.com/avatar.php?gravatar_id=d41d8cd98f00b204e9800998ecf8427e&#38;size=60" medium="image">
			<media:title type="html">Avatar</media:title>
		</media:content>

		<media:content url="http://www.gravatar.com/avatar.php?gravatar_id=d41d8cd98f00b204e9800998ecf8427e&#38;size=60" medium="image">
			<media:title type="html">Avatar</media:title>
		</media:content>
	</item>
		<item>
		<title>Woa</title>
		<link>http://frederic.logier.org/2006/03/28/woa/</link>
		<comments>http://frederic.logier.org/2006/03/28/woa/#comments</comments>
		<pubDate>Tue, 28 Mar 2006 14:24:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[geekast]]></category>
		<category><![CDATA[gstreamer]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2006/03/28/woa/</guid>
		<description><![CDATA[Geekast est sur le site de Gstreamer dans la liste des applications l’utilisant : http://gstreamer.freedesktop.org/apps/ Je suis tout intimidé du coup<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=51&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>Geekast est sur le site de Gstreamer dans la liste des applications l’utilisant : <a href="http://gstreamer.freedesktop.org/apps/">http://gstreamer.freedesktop.org/apps/</a></p>
<p>Je suis tout intimidé du coup <img src='http://s2.wp.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fredix.wordpress.com/51/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fredix.wordpress.com/51/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=51&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2006/03/28/woa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>migration</title>
		<link>http://frederic.logier.org/2005/12/29/migration/</link>
		<comments>http://frederic.logier.org/2005/12/29/migration/#comments</comments>
		<pubDate>Thu, 29 Dec 2005 15:22:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[fredix]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2005/12/29/migration/</guid>
		<description><![CDATA[En ces périodes festives j’ai décidé de m’offrir un nouveau blog. Cette démarche entre pleinement dans mon investissement sur le langage Ruby. En effet je souhaite utiliser au maximum les outils utilisant Ruby. Typo répond à ce critère et est de plus un excellent blog (AJAXisé pour ceux qui aiment). De plus un concours a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=47&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p>En ces périodes festives j’ai décidé de m’offrir un nouveau blog.</p>
<p>Cette démarche entre pleinement dans mon investissement sur le langage Ruby. En effet je souhaite utiliser au maximum les outils utilisant Ruby.</p>
<p><a href="http://typo.leetsoft.com/">Typo</a> répond à ce critère et est de plus un excellent blog (AJAXisé pour ceux qui aiment). De plus un concours a permit à un grand nombre de thèmes de voir le jour. N’hésitez pas à les consulter sur <a href="http://typogarden.org/">typogarden</a>, voir également le <a href="http://blog.leetsoft.com/">blog du développeur</a></p>
<p>Enfin ceux ayant déjà un blog sur dotclear peuvent essayer le <a href="http://rubyfr.org/hiki.cgi?dotclear+vers+typo">script de migration vers typo</a> que j’ai déposé sur <a href="http://rubyfr.org/">Rubyfr</a>. Il est plutôt gruik, mais pour un one shot cela me va très bien, cependant n’hésitez pas à l’améliorer.</p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fredix.wordpress.com/47/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fredix.wordpress.com/47/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=47&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2005/12/29/migration/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>RAD sous Linux</title>
		<link>http://frederic.logier.org/2005/10/24/rad-sous-linux/</link>
		<comments>http://frederic.logier.org/2005/10/24/rad-sous-linux/#comments</comments>
		<pubDate>Mon, 24 Oct 2005 14:03:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2005/10/24/rad-sous-linux/</guid>
		<description><![CDATA[RAD : Rapid Application Development En général lorsque l’on parle de RAD, on pense souvent à Windev ou Visual Basic qui ont des modules RAD. Et bien entendu on pense à application générée, obligatoirement mal faite et aux possibilités d’évolution nulle. Bref RAD veut dire souvent soft poubelle. Sous Linux il est possible d’arriver à [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=46&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div class="post-body">
<p><span class="caps">RAD</span> : Rapid Application Development</p>
<p>En général lorsque l’on parle de <span class="caps">RAD</span>, on pense souvent à Windev ou Visual Basic qui ont des modules <span class="caps">RAD</span>. Et bien entendu on pense à application générée, obligatoirement mal faite et aux possibilités d’évolution nulle. Bref <span class="caps">RAD</span> veut dire souvent soft poubelle.</p>
<p>Sous Linux il est possible d’arriver à quelque chose proche du <span class="caps">RAD</span> avec les outils existant. Ici cela veut dire le tryptique Glade, libglade et Ruby. Pas de Windowserie à la Kylix donc, rien que du standard respectant les us et coutumes Linuxiennes.</p>
<p>Un petit script magique apporte à ce trio la génération du code nécessaire permettant de faire du <span class="caps">RAD</span> : <em>ruby-glade-create-template</em> (qui fait parti du paquet libglade2-ruby). Il suffit de fournir au script le fichier xml de votre projet Glade pour qu’il génère un fichier Ruby utilisant la libglade. Il ne vous reste plus qu’à coder les fonctions de callback.<br />Grâce à la libglade le code reste très court et simple à comprendre. Bien sûr à chaque modification de votre interface avec Glade il faudra régénérer le code, donc sauver avant vos fonctions de callback. Mais c’est un excellent début pour apprendre le développement en Ruby/GTK+ ou simplement créer une petite application.</p>
<p>Mais laissons place à une excellente <a href="http://ruby-gnome2.sourceforge.jp/hiki.cgi?RubyZilla">démonstration en flash</a> qui, cerise sur le gateau, montre comment intégrer le moteur gecko en quelques lignes de Ruby : <a href="http://ruby-gnome2.sourceforge.jp/data/rubyzilla.html">RubyZilla</a></p>
</div>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fredix.wordpress.com/46/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fredix.wordpress.com/46/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=46&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2005/10/24/rad-sous-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
		<item>
		<title>hop hop hop, un site communautaire de plus !</title>
		<link>http://frederic.logier.org/2004/06/12/hop-hop-hop-un-site-communautaire-de-plus/</link>
		<comments>http://frederic.logier.org/2004/06/12/hop-hop-hop-un-site-communautaire-de-plus/#comments</comments>
		<pubDate>Sat, 12 Jun 2004 13:42:00 +0000</pubDate>
		<dc:creator>fredix</dc:creator>
				<category><![CDATA[MondeLibre]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://fredix.wordpress.com/2004/06/12/hop-hop-hop-un-site-communautaire-de-plus/</guid>
		<description><![CDATA[Ca y est je me suis décidé à acheter le domaine rubyfr.org . J’essaye de comprendre le fonctionnement de hiki, un wiki en Ruby, et de trouver un thème potable (je vais plutôt faire une css…)J’espère que ce site aura le succès que mérite ce langage. On pourra y parler également de développement en Ruby/Gtk+, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=40&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ca y est je me suis décidé à acheter le domaine rubyfr.org . J’essaye de comprendre le fonctionnement de <a href="http://www.namaraii.com/hiki/">hiki</a>, un wiki en <a href="http://www.ruby-lang.org/">Ruby</a>, et de trouver un thème potable <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (je vais plutôt faire une css…)<br />J’espère que ce site aura le succès que mérite ce langage. On pourra y parler également de développement en <a href="http://ruby-gnome2.sourceforge.jp/fr/index.html">Ruby/Gtk+</a>, pour y aborder le côté spécifique à Ruby, et mettre des classes en commun ; je ne tiens pas à concurrencer <a href="http://www.gtk-fr.org/">gtk-fr</a> <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  , mais je pense que <a href="http://rubyfr.org/">RubyFR</a> peut être un bon complément.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/fredix.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/fredix.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/fredix.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/fredix.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/fredix.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/fredix.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/fredix.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/fredix.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/fredix.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/fredix.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=frederic.logier.org&amp;blog=3098224&amp;post=40&amp;subd=fredix&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://frederic.logier.org/2004/06/12/hop-hop-hop-un-site-communautaire-de-plus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0fc8e5d51ed3c0726b2826e8caeb8017?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">fredix</media:title>
		</media:content>
	</item>
	</channel>
</rss>
