Author: Oriol Rius

Classificació

Reading time: < 1 minute He dedicat gairebé tot el dia a acabar el nou format del blog. És possible que hi acabi afegint algo. Però ara per ara la idea que porto al cap la dono per tancada. És a dir, que la re-estructuració en la forma d'accedir i visualitzar els continguts queda totalment separada en les tres seccions que ja he estat comentat. Ara només entrar al blog com podeu veure en el menú principal es pot escollir de forma senzilla el poder veure tots els contiguts, només els de tecnologia, creixement personal o els personals. Així quan algú entri amb una idea concreta desitjo que li sigui més senzill trobar el que busca. Finalment a la part superior podeu trobar els menús que hi havia abans a la barra principal. Apa doncs, a disfrutar-ho.

What is AMQP? and the architecture

Reading time: 3 – 4 minutes

What is AMQP? (Advanced Message Queuing Protocol)

When two applications need to communicate there are a lot of solutions like IPC, if these applications are remote we can use RPC. When two or more applications communicate with each other we can use ESB. And there are many more solutions. But when more than two applications communicate and the systems need to be scalable the problem is a bit more complicated. In fact, when we need to send a call to a remote process or distribute object processing among different servers we start to think about queues.

Typical examples are rendering farms, massive mail sending, publish/subscriptions solutions like news systems. At that time we start to consider a queue-based solution. In my case the first approach to these types of solutions was Gearman; that is a very simple queue system where workers connect to a central service where producers have to call the methods published by workers; the messages are queued and delivered to workers in a simple queue.

Another interesting solution can be use Redis like a queue service using their features like publish/subscribe. Anyway always you can develop your own queue system. Maybe there a lot of solutions like that but when you are interested in develop in standard way and want a long-run solution with scalability and high availability then you need to think in use AMQP-based solutions.

The most simple definition of AMQP is: “message-oriented middleware”. Behind this simple definition there are a lot of features available. Before AMQP there was some message-oriented middlewares, for example, JMS. But AMQP is the standard protocol to keep when you choice a queue-based solution.

AMQP have features like queuing, routing, reliability and security. And most of the implementations of AMQP have a really scalable architectures and high availability solutions.

The architecture

The basic architecture is simple, there are a client applications called producers that create messages and deliver it to a AMQP server also called broker. Inside the broker the messages are routed and filtered until arrive to queues where another applications called consumers are connected and get the messages to be processed.

When we have understood this maybe is the time to deep inside the broker where there are AMQP magic. The broker has three parts:

  1. Exchange: where the producer applications delivers the messages,  messages have a routing key and exchange uses it to route messages.
  2. Queues: where messages are stored and then consumers get the messages from queues.
  3. Bindings: makes relations between exchanges and queues.

When exchange have a message uses their routing key and three different exchange methods to choose where the message goes:

    1. Direct Exchange:  routing key matches the queue name.
    2. Fanout Exchange: the message is cloned and sent to all queues connected to this exchange.
    3. Topic Exchange: using wildcards the message can be routed to some of connected queues.

This is the internal schema of a broker:

ssh-copy-id

Reading time: < 1 minute Really useful command of ssh package to add public key of your user account to a remote SSH server and then access there with passwordless authentication method. ssh-copy-id [-i [identity_file]] [user@]machine In the past I wrote a simple cookbook to explain this process but now this is as simple as possible. Don't forget ssh-copy-id is the most easy way to add your ssh public key in remote servers.

AMQP and RabbitMQ [TOC]

Reading time: 1 – 2 minutes

After reading the book ‘RabbitMQ in action‘ I’m working on series of posts  that will include the following subjects:

  1. What is AMQP? and the architecure
  2. Deep inside AMQP
  3. RabbitMQ CLI quick reference
  4. Hello World using ‘kombu’ library and python
  5. Parallel programming
  6. Events example
  7. RPC
  8. Clustering fundamentals
  9. Managing RabbitMQ from administration web interface
  10. Managing RabbitMQ from REST API

Please let me know if you are interested in this series of posts. Because in my opinion this is very interesting and it always comes in handy to know if someone has been working on those subjects.

Getting help to configure spamassassin.conf

Reading time: 2 – 3 minutes

Configure spamassassin is never easy to do. But when you look for information in Google usually you will be mad . The most common help method in linux is use ‘man command’ but it doesn’t work or information is not enough usually.

After a lucky search I found this command to get an extended information about how to configure spamassassin.conf file.

perldoc Mail::SpamAssassin::Conf

WordPress plugin: permalink editor

Reading time: < 1 minute When your are using custom permalinks for posts in wordpress you can have problems to use permalinks in wordpress pages; because rewrite rules can't work properly for both: posts and pages. In my case permalink editor plugin has been the definitive solution.

Next you can see new permalink configuration form in wordpress after installing permalink editor:

UPDATE 2017-08-07, interesting alternative ultimate guide to blog readability.

Nova imatge

Reading time: < 1 minute Aquest cap de setmana he invertit algunes hores en començar el que serà el nou blog, de moment l'estructura de pestanyes és la mateixa que l'antic blog però l'aspecte ja ha canviat moltíssim. Així doncs, en base a aquest nou aspecte començaré a construir la nova estructura de categories que anava comentant en els últims articles. Desitjo que us agradi.

My passion and profession

Reading time: 2 – 3 minutes

Nowadays my focus on technologies will be categorized as follows, to be more descriptive inside every category I have added some keywords to describe contents:

  • System administration, Databases, Messaging and Security
    • Keywords: Linux, Ubuntu, Fedora, RedHat, CentOS, Unix, Windows, Mac, MySQL, Oracle, CouchDB, Redis, MongoDB, SQL, NoSQL, LDAP, SSO, Kerberos, Servers, Embedded, EC2, S3, SES, RabbitMQ, ZeroMQ, and much more
  • Networking and Internet
    • Keywords: Postfix, SASL, Cyrus POP/IMAP, Courier POP/IMAP, PureFTP, ProFTP, Apache, Nginx, Cloud, etc.
  • Multimedia, Gadgets, Mobile phones and Tablets
    • Keywords: Android SDK, Android NDK, PhoneGAP, Sencha Touch,
  • Domotics, Electronics and DIY projects
    • Keywords: Arduino, My CPD, Atennas, etc.
  • Development, Models and Methodologies
    • Keywords: Python, Twisted, C, C++, Java, Erlang, OTP, JavaScript, PHP, Bash/Shell, Sencha Designer, ExtJS, jQuery, and much more
  • BPM, ERP, CRM and other office applications
    • Keywords: Bonita Open Solutions, Mule ESB, Jasper Reports

My new posts will be in english as you can read in this post because I want more interactivity with readers from the start of the blog I have a very low rate of comments. I think this is because my technical posts are too much specific and then when somebody has some problems doesn’t speak catalan and cannot leave a comment asking their doubts.

In my humble opinion this new chapter of technical blog can arrive to more people because the language of technical community around the world is english. In the other hand every day I need to have more practice writing and talking english in my work because national market is dead and we need to expand our project around the world. So this effort to write technical posts in english will be like english practices for me.

Every new post will have a disclaimer at the begining of the post for my errors writing english and if you can help me to improve my english, please, leave comments fixing my errors.

Las escalas de grises

Reading time: 2 – 3 minutes

Me vienen a la memoria recuerdos de mi niñez, recuerdo que siempre he intentado simplificar muchísimo las tareas que me han ocupado en cada momento de mi vida. Eso dicen que es fruto de una mente muy analítica. Quizá por eso he acabo con un perfil tan técnico.

Fruto del trabajo de simplificación siempre me he ido mucho a los extremos, al si o el no, al blanco o el negro. Nunca he buscado puntos intermedios o puntos de equilibrio entre las cosas. A través de esta forma de trabajar he ido destancando en algunas disciplinas y he ido convirtiéndome en un auténtico principiante en muchas otras.

A nivel profesional en términos generales no ha sido difícil sacarle provecho a esta característica de mi forma infantil de ver la vida. Pero en las materias más sociales o personales esto se ha convertido en un verdadero problema muchas veces. Un ejemplo sencillo es el de evitar quedar con aquellas personas que siempre llegan tarde; simplemente porqué no me gusta esperar.

Con los años he aprendido a ver que educando mi parte más emocional han aparecido muchos tonos de gris entre ese blanco y negros que siempre han marcado mi vida. Esto no es sencillo de educar ni de superar ya que a menudo las viejas costumbres afloran y los nuevos hábitos se olvidan. Llegados a este punto me doy cuenta que la vida raramente tiene un si o un no por respuesta.

Sólo las ciencias exactas nos devuelven valores absolutos sin embargo al trabajar con la vida son las ciencias naturales las que acaban explicando la vida; así pues estoy contento de haber podido sacar provecho de mi seguridad en las decisiones gracias a mi habilidad de sintesis extrema ya que ahora con una mente más madura y experimentada puedo permitirme el lujo de verlo todo con muchos más tonos.

Mi próximo reto es de añadir la escala de colores entre ese blanco y ese negro, no me conformo con menos. Ya que al abrir los ojos y ver el mundo con sus matices te abre a un sin fin de posibilidades.

Kit de supervivencia

Reading time: 2 – 2 minutes

Cuando dedicas mil horas a trabajar y a tu pasión sin preguntarte el porqué lo estas haciendo entras en un modo que podríamos calificar de automático. Una forma de vivir los días que esta completamente fuera de tu control. A menudo estoy rodeado de personas a las que gustaría preguntar: “¿cual es el propósito de tu vida?” seguro que podría encontrar muchas justificacions del porqué al final no se lo acabo preguntando. Pero quizá este tema lo comenté en otro artículo.
Hoy quería comentar que después de muchas horas de trabajos personales he adquirido uno de mis últimos gadgets, algo tan sencillo y potente como un herbidor de agua.

Desde hace unos días he decido cambiar los hábitos que repito cada mañana a las 6h; pues bien dentro de estos hábitos ahora he añadido hacerme una buena infusión calentita que entra de maravilla después del ayuno nocturno.

Gadgets como estos demuestran que la mejora de calidad de vida que proporciona un dispositivo no tiene nada que ver con el precio. Si soys amantes de las infusiones como yo os recomiendo tener uno de estos cerca, por lo menos mi experiencia esta siendo muy buena y ya lo cuento como unos de mis hábitos.

Mi única duda es si esto seguirá siendo una idea tan buena en los meses de verano, aunque cambiarlo por un zumo de frutas me sigue pareciendo una muy buena idea.

Scroll to Top