loops is a small and lightweight framework for Ruby on Rails and Merb created to support simple background loops in your application which are usually used to do some background data processing on your servers (queue workers, batch tasks processors, etc).
Originally loops plugin was created to make our (Scribd.com) own loops code more organized. We used to have tens of different modules with methods that were called with script/runner and then used with nohup and other not so convenient backgrounding techniques. When you have such a number of loops/workers to run in background it becomes a nightmare to manage them on a regular basis (restarts, code upgrades, status/health checking, etc).
After a short time of writing our loops in more organized ways we were able to generalize most of the loops code so now our loops look like a classes with a single mandatory public method called run. Everything else (spawning many workers, managing them, logging, backgrounding, pid-files management, etc) is handled by the plugin itself.
The major idea behind this small project was to create a deadly simple and yet robust framework to be able to run some tasks in background and do not think about spawning many workers, restarting them when they die, etc. So, if you need to be able to run either one or many copies of your worker or you do not want to think about re-spawning dead workers and do not want to spend megabytes of RAM on separate copies of Ruby interpreter (when you run each copy of your loop as a separate process controlled by monit/god/etc), then I’d recommend you to try this framework — you’ll like it.
For more information, visit the project site and, of course, read the sources
How often do we think about our http sessions implementation? I mean, do you know, how your currently used sessions-related code will behave when sessions number in your database will grow up to millions (or, even, hundreds of millions) of records? This is one of the things we do not think about. But if you’ll think about it, you’ll notice, that 99% of your session-related operations are read-only and 99% of your sessions writes are not needed. Almost all your sessions table records have the same information: session_id and serialized empty session in the data field.
Looking at this sessions-related situation we have created really simple (and, at the same time, really useful for large Rails projects) plugin, which replaces ActiveRecord-based session store and makes sessions much more effective. Below you can find some information about implementation details and decisions we’ve made in this plugin, but if you just want to try it, then check out our project site.
Read the rest of this entry »
В качестве помощи своей жене в ее работе над очередным сайтом, работающим на wordpress, я перевел на русский язык Contact Form Wordpress plugin.
WP-ContactForm – это простой плагин, предназначенный для того, чтобы Ваши пользователи могли всегда оставаться с Вами на связи. Для любого пользователя WordPress будет проще простого добавить эту функциональность к его сайту. Просто загрузите на сервер несколько файлов, измените несколько параметров в админ-панели и все!
Русский .po и скомпилированный .mo файлы могут быть скачаны отсюда. Процесс установки предельно прост: загрузите файл .mo в каталог /wp-content/plugins/wp-contactform/ на Вашем сервере.
Сегодня установил на сайте плагин Polyglot и теперь смогу писать посты на разных языках. Исходя из того, что знаю я только 3 языка (русский, украинский и, немного, английский), то и все будущие посты будут переведены на эти языки (как минимум, на русский и английский).