J'aime beaucoup le benchmark de Pancake : l'auteur configure tous les serveurs avec 4 workers mais lance le benchmark avec une concurrence de 1 (le défaut pour ab). Puis, l'auteur ne donne ni la version de PHP utilisée ni la configuration des serveurs, j'imagine que ça ne doit pas être très important pour reproduire le benchmark. Bref, du joli n'importe quoi !
Il faut que je commente dans le fichier unicorn.rb la ligne Rails.cache.instance_variable_get(:@data).client.reconnect
C'est normal. Cette ligne sert à forcer le cache de Rails (en l’occurrence une connexion Redis) à se reconnecter pour éviter le mélanger d'informations entre les différentes instances d'unicorn. Mais en mode développement, le cache de Rails n'est pas initialisé, d'où l'erreur.
lorsqu'un utilisateur visite quelque chose, les commentaires ne sont pas marqués comme lu.
Bizarre, si tu tapes $redis.keys('readings/*') dans la console Rails (./script/rails console), ça te dit quoi ?
Et comment tu surveilles que les machines qui vont servir à l'installation font bien ce qu'elles devraient faire ?
Je t'invite à lire un papier de Ken Thompson, Reflections on trusting trust dont la conclusion me semble très explicite :
The moral is obvious. You can't trust code that you did not totally create yourself. (Especially code from companies that employ people like me.) No amount of source-level verification or scrutiny will protect you from using untrusted code.
Quel est l'interet d'avoir des estimations des résultats ? ce qui est important, c'est le resultat Non ?
Va dire ça aux instituts de sondage ou aux médias qui font un trafic énorme le soir des élections quand on discute des estimations de résultats. Quand il y a une élection présidentielle, tout le monde veut avoir le résultat à 20h (ou même avant sur les sites web belges et suisses) et tant pis si ce n'est qu'une estimation grossière.
Ça permettrait d'avoir rapidement des estimations des résultats, et plus fiables que les sondages « sortie des urnes ». Maintenant, est-ce que le prix en vaut le coup ? Je n'en suis pas sûr.
Ben je trouve que linuxfr est un cas a part : c'est un site de geeks libristes pour des geeks libristes. Ca me parait naturel que le code soit Libre. Et c'est meme surement tres justifié pour son evolution pour faciliter la collaboration.
Je ne vois pas pourquoi les lecteurs du site du Parti de Gauche ne seraient pas aussi capables d'améliorer le site (pour faciliter la collaboration ou pour d'autres objectifs). Et du coup, c'est une bonne chose que son code soit libre.
Et je ne dois pas etre le seul vu comme le sujet n'attire pas les foules…
Je te trouve très critique. La dépêche a une note de 52 et une quarantaine de commentaires. Pour moi, ça veut dire que ça intéresse du monde.
Pour LinuxFr.org, l'ouverture du code a permis, entre autres, ces réalisations :
Une vingtaine de personnes ont contribué à améliorer le site ;
Permettre à des développeurs Rails d'apprendre à partir du code source d'une application complexe et plutôt bien écrite (oui, je me jette des fleurs) ;
je ne sais pas trop si je devais poster ici ou toujours dans le journal
Ici, ça fera très bien l'affaire.
je n'ai plus de css
j'ai la même erreur pour un fichier "application.js"
Ruby on Rails possède plusieurs environnements (development, test et production par défaut) et chaque environnement a une configuration différente (ça se règle dans config/environments/<nom_de_l_env>.rb).
D'autre part, les fichiers CSS et JS sont générés : les sources sont du Sass pour l'un et du CoffeeScript pour l'autre.
Sur l'environnement de dév, la génération des fichiers CSS et JS se fait à chaque requête (avec un cache pour éviter que ce soit trop lent). Par contre, sur l'environnement de production, cette génération se fait au déploiement avec une tâche particulière (bundle exec rake assets:precompile) mais on n'essaye plus de les générer après coup s'il en manque.
J'imagine que c'est l'environnement de production qui est utilisé ici. Je recommande de modifier ça pour utiliser l'environnement de development, qui, comme son nom l'indique, convient mieux pour du développement. Typiquement, ça se fait en modifiant la variable d'environnement RAILS_ENV (cf https://github.com/nono/admin-linuxfr.org/blob/master/init.d/unicorn#L17).
Dont l'un des principaux développeurs, Martin Sústrik, a forké le projet sous le nom Crossroads I/O et a publié un troll bien poilu sur C++ vs C : Why should I have written ZeroMQ in C, not C++part I & part II.
Il manque par contre une dépendance (tcl8.5) qui sera nécessaire plus tard.
OK, c'est ajouté.
J'ai un gros message où il m'indique de rajouter "vm.overcommit_memory = 1" au fichier /etc/sysctl.conf
Pour un environnement de dév, ce n'est vraiment pas nécessaire de faire ça (à part pour cacher le warning). Par contre, c'est très utile en prod pour éviter de perdre des données lors des sauvegardes.
En cherchant un peu je trouve cette page et crée un fichier d'init
La version de libhunspell n'est pas la bonne, il me demande la 1.2 et j'ai la 1.3
OK, il faudra que je regarde ça.
j'ai une erreur (No route matches [POST] "/b/3d072a245074a27d64426f9fd81f6600de204893") qui revient tout le temps dans les logs
L'environnement de dév tel que décrit dans le README n'est pas complet. Il n'indique pas comment installer les autres services spécifiques à LinuxFr.org :
board : envoyer les messages des tribunes en temps-réel vers les navigateurs
share : partager les dépêches sur les réseaux sociaux
En particulier, l'erreur rencontrée vient de l'absence de board. Quand un utilisateur affiche une tribune (ça veut dire à peu près toutes les pages pour les modérateurs vu qu'il y a une tribune de modération dans la colonne de gauche), le navigateur essaye de se connecter avec Server-Sent Events à /b/<qqchose> pour recevoir les nouveaux messages sur cette tribune.
[^] # Re: Une derniere question !
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Machine virtuelle de développement. Évalué à 3 (+0/-0).
Si, c'est fait. Cf https://github.com/nono/linuxfr.org/commit/944e94eff73b8dc1a60d90c060b55bb6a11231a0
# Doublon
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi voir le contenu des journaux avec note négative. Évalué à 3 (+0/-0).
Cf https://linuxfr.org/suivi/pouvoir-afficher-les-journaux-moinsses
# Benchmark de pancake
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche De tout, de rien, des bookmarks, du bla‐bla #47. Évalué à 8.
J'aime beaucoup le benchmark de Pancake : l'auteur configure tous les serveurs avec 4 workers mais lance le benchmark avec une concurrence de 1 (le défaut pour
ab
). Puis, l'auteur ne donne ni la version de PHP utilisée ni la configuration des serveurs, j'imagine que ça ne doit pas être très important pour reproduire le benchmark. Bref, du joli n'importe quoi !# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Impossible de renvoyer en rédaction quand le quota de [contre] est atteint. Évalué à 3 (+0/-0).
Cf https://github.com/nono/linuxfr.org/commit/d6587ec4e3c18da6c6b07df5caaf2dc8f5aff6df
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Le serveur d'image n'envoie pas de 304. Évalué à 3 (+0/-0).
Cf https://github.com/nono/img-LinuxFr.org/commit/1e20601f115271ebbf344f17a5ae022781713498 et https://github.com/nono/img-LinuxFr.org/commit/ce764ff4ba4dd574808e8fed8addc3da914537aa
# Fait
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Blocage d'image sur le proxy cache img. Évalué à 3 (+0/-0).
Cf https://github.com/nono/img-LinuxFr.org/commit/aa2d4a0fff24b384a948acf32b6db500a42f37a8
[^] # Re: Une derniere question !
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Machine virtuelle de développement. Évalué à 3 (+0/-0).
C'est normal. Cette ligne sert à forcer le cache de Rails (en l’occurrence une connexion Redis) à se reconnecter pour éviter le mélanger d'informations entre les différentes instances d'unicorn. Mais en mode développement, le cache de Rails n'est pas initialisé, d'où l'erreur.
Bizarre, si tu tapes
$redis.keys('readings/*')
dans la console Rails (./script/rails console
), ça te dit quoi ?[^] # Re: Système de Vérification Citoyenne des Machines (ou Serveurs)
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Petites actus sur le vote électronique (par ordinateurs de vote ou par Internet) (2). Évalué à 4.
Et comment tu surveilles que les machines qui vont servir à l'installation font bien ce qu'elles devraient faire ?
Je t'invite à lire un papier de Ken Thompson, Reflections on trusting trust dont la conclusion me semble très explicite :
[^] # Re: c'est encore moi !
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Machine virtuelle de développement. Évalué à 3 (+0/-0).
En fait, c'est tout bête : la bibliothèque redis a été mise en jour entre le moment où j'ai compilé pour la dernière fois img et tes tests. En particulier, l'option
Network
a été ajoutée. Du coup, ta solution est la bonne, cf https://github.com/nono/img-LinuxFr.org/commit/232b1806ba87d8f770e20d52f7b867c33409fdd1.[^] # Re: OCR
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Petites actus sur le vote électronique (par ordinateurs de vote ou par Internet) (2). Évalué à 3.
Va dire ça aux instituts de sondage ou aux médias qui font un trafic énorme le soir des élections quand on discute des estimations de résultats. Quand il y a une élection présidentielle, tout le monde veut avoir le résultat à 20h (ou même avant sur les sites web belges et suisses) et tant pis si ce n'est qu'une estimation grossière.
[^] # Re: Pas évident
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Afficher le nombre de plussages / moinssages. Évalué à 4 (+0/-0).
Non, pour deux raisons :
[^] # Re: OCR
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Petites actus sur le vote électronique (par ordinateurs de vote ou par Internet) (2). Évalué à 4.
Ça permettrait d'avoir rapidement des estimations des résultats, et plus fiables que les sondages « sortie des urnes ». Maintenant, est-ce que le prix en vaut le coup ? Je n'en suis pas sûr.
[^] # Re: Technique
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Le Parti de Gauche publie le code de son site sous licence libre. Évalué à 7.
Je ne vois pas pourquoi les lecteurs du site du Parti de Gauche ne seraient pas aussi capables d'améliorer le site (pour faciliter la collaboration ou pour d'autres objectifs). Et du coup, c'est une bonne chose que son code soit libre.
Je te trouve très critique. La dépêche a une note de 52 et une quarantaine de commentaires. Pour moi, ça veut dire que ça intéresse du monde.
[^] # Re: Technique
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Le Parti de Gauche publie le code de son site sous licence libre. Évalué à 5.
Je suis d'accord. Mon commentaire était là pour illustrer tes propos, pas les contredire :-)
[^] # Re: Ok, essayons de corriger les erreurs
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Machine virtuelle de développement. Évalué à 3 (+0/-0).
Ça devrait mieux marcher si tu retires ces lignes :
[^] # Re: Rumeurs de fraude aux États-Unis
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Petites actus sur le vote électronique (par ordinateurs de vote ou par Internet) (2). Évalué à 4.
Il n'était pas de la CIA mais de la NSA.
[^] # Re: Technique
Posté par Bruno Michel (site web personnel) . En réponse à la dépêche Le Parti de Gauche publie le code de son site sous licence libre. Évalué à 8.
Pour LinuxFr.org, l'ouverture du code a permis, entre autres, ces réalisations :
Espérons que le site du Parti de Gauche puisse avoir le même succès.
[^] # Re: Ok, essayons de corriger les erreurs
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Machine virtuelle de développement. Évalué à 4 (+0/-0).
Ok, ma supposition n'était pas la bonne. Allons voir ce qui se passe du coté de nginx :
errors.log
) si des messages font références à ces fichiers ?[^] # Re: Un premier jet
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Laisser la recherche visible et modifiable dans les pages de résultat. Évalué à 3 (+0/-0).
Merci, j'ai appliqué ton patch.
# Ok, essayons de corriger les erreurs
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Machine virtuelle de développement. Évalué à 4 (+0/-0).
Pas de soucis
Ici, ça fera très bien l'affaire.
Ruby on Rails possède plusieurs environnements (development, test et production par défaut) et chaque environnement a une configuration différente (ça se règle dans
config/environments/<nom_de_l_env>.rb
).D'autre part, les fichiers CSS et JS sont générés : les sources sont du Sass pour l'un et du CoffeeScript pour l'autre.
Sur l'environnement de dév, la génération des fichiers CSS et JS se fait à chaque requête (avec un cache pour éviter que ce soit trop lent). Par contre, sur l'environnement de production, cette génération se fait au déploiement avec une tâche particulière (
bundle exec rake assets:precompile
) mais on n'essaye plus de les générer après coup s'il en manque.J'imagine que c'est l'environnement de production qui est utilisé ici. Je recommande de modifier ça pour utiliser l'environnement de
development
, qui, comme son nom l'indique, convient mieux pour du développement. Typiquement, ça se fait en modifiant la variable d'environnementRAILS_ENV
(cf https://github.com/nono/admin-linuxfr.org/blob/master/init.d/unicorn#L17).# Lapin compris
Posté par Bruno Michel (site web personnel) . En réponse à l’entrée du suivi Flux atom sans SSL.. Évalué à 4 (+0/-0).
Bonjour,
Bah, si, tous les flux ATOM sont disponibles sans SSL. Par exemple, le flux des dépêches sans SSL est là : http://linuxfr.org/news.atom.
[^] # Re: M'enfin !
Posté par Bruno Michel (site web personnel) . En réponse au journal ZeroMQ et les mangoustes. Évalué à 10.
Dont l'un des principaux développeurs, Martin Sústrik, a forké le projet sous le nom Crossroads I/O et a publié un troll bien poilu sur C++ vs C : Why should I have written ZeroMQ in C, not C++ part I & part II.
[^] # Re: extraction de base anonymisée
Posté par Bruno Michel (site web personnel) . En réponse au journal Contribuer à LinuxFr : étape 1 - installation du site. Évalué à 7.
On pourrait croire naïvement que c'est le cas mais en fait, il y a quand même pas mal de données à « nettoyer ». Voici quelques exemples :
[^] # Re: Quelques réponses
Posté par Bruno Michel (site web personnel) . En réponse au journal Contribuer à LinuxFr : étape 1 - installation du site. Évalué à 6.
J'ai mis à jour la gem ruby qui devrait maintenant utiliser libhunspell 1.3.
Mon collègue qui s'occupe de Desi a corrigé ça aujourd'hui.
desi start
rend bien la main maintenant (bug dans une dépendance qui a été contourné).# Quelques réponses
Posté par Bruno Michel (site web personnel) . En réponse au journal Contribuer à LinuxFr : étape 1 - installation du site. Évalué à 10.
C'est cool d'avoir des contributeurs motivés !
OK, c'est ajouté.
Pour un environnement de dév, ce n'est vraiment pas nécessaire de faire ça (à part pour cacher le warning). Par contre, c'est très utile en prod pour éviter de perdre des données lors des sauvegardes.
Pour les scripts d'init (et d'autres choses pour la prod), on a un second dépôt git : https://github.com/nono/admin-linuxfr.org
Effectivement, je viens de créer un bug report pour ça : https://github.com/AF83/desi/issues/5.
OK, il faudra que je regarde ça.
L'environnement de dév tel que décrit dans le README n'est pas complet. Il n'indique pas comment installer les autres services spécifiques à LinuxFr.org :
En particulier, l'erreur rencontrée vient de l'absence de board. Quand un utilisateur affiche une tribune (ça veut dire à peu près toutes les pages pour les modérateurs vu qu'il y a une tribune de modération dans la colonne de gauche), le navigateur essaye de se connecter avec Server-Sent Events à
/b/<qqchose>
pour recevoir les nouveaux messages sur cette tribune.