Maven

January 17, 2012

Desde que entre en mi nuevo puesto he tenido que enfrentarme a tecnologías con las que no me había topado antes. Hoy quiero hablar de maven. En mi experiencia como desarrollador he trabajado principalmente con dos lenguajes de programación, por un lado php y por otro y por encima del anterior con python. Cuando los proyectos se hacen relativamente grandes el proceso de configuración del proyecto en sí para poder comenzar a trabajar es a veces excesivamente costoso, en python esto se resuelve con virtualenv, pip y pypi. En java esto se puede resolver con maven.

maven es más que un sistema de repositorios, ya que tambien permite construir los proyectos,  compilándolos y generando los artefactos necesarios en cada caso. Esto puede resultar extraño para alguien que viene de un mundo en el que los lenguajes no tienen que ser compilados,  en python todos los requerimientos son de tiempo de ejecución, sin embargo, en un lenguaje compilado, pueden existir distintos tipos de dependencias, lo que hace casi una necesidad que el mismo software que se usa para gestionar las librerías sea usado para construir el proyecto.

Una de las cosas que más me gusta de maven es el famoso “maven war overlay”. Básicamente es un mecanismo que permite construir proyectos y despliegues de una manera similar al paradigma de la herencia. En el proyecto en el que estoy trabajando actualmente usamos este mecanismo para modificar por partes los distintos aspectos que deseamos personalizar, como el aspecto, algunas extensiones o los parametros necesarios para ejecutarlo en producción o pre-poducción.

Se puede usar maven desde eclipse via un plugin. Esto es realmente deseable para gestionar el pom.xml, ya que cuenta con un editor hecho para humanos en lugar de tener que trabajar con un larguísimo fichero xml. Me parece particularmente útil el mecanismo para añadir dependencias ya que se encarga de buscar el groupid por ti lo cual es altamente cómodo.


This blog becomes mainly spanish

January 17, 2012

When I started this blog years ago, I already had a spanish one, so my intention was to post just a few articles here. Now I let the other blog so I need a place to write in spanish too. I will follow the approach of Carlos Ble who write in his blog some articles in english and some other in spanish. I apologize for the inconvenience if you are a reader and just understand english.


From systems to services

December 14, 2011

Since I moved from a system related job to a service position job I knew I would have many things to learn. However the process is not being as painful as I expected. Services are a higher vision of system staff, therefore I don’t deal with machines, servers, daemons and such things but with deploy, configurations, xml, ears and wars.

Despite my residual developer role, these days I have been concerning about the Jasig CAS upgrade from and old version. Jasig CAS use the maven war overlay method to deal with the customization, and that’s great. We have a new artifact using a custom skin, custom theme, xml configuration files with the correct data source and so on. The upgrade process should be simple, but the new CAS version use a new version of spring, so I should update (Do I really need to update all that xml reference manually?) lots of xml files with the new reference. They also decide to change some components so I need to include some new configurations too. And all this try-and-error process follows the next sequence:

  • Modify some files
  • mvn clean package to generate the war
  • Deploy the war in Tomcat
  • Visit the site. If something went wrong try to figure out (through the trace of Tomcat)

Therefore the process is quite slow, as it include some slow steps such as mvn and deployment. I still don’t feel comfortable with the java process. I come from dynamic languages such as python (mainly Django) and, from my view, java projects needs more hardware resource, and developing them is slower too, so I think I’m missing something about that kind of projects.

Even so, I feel slower than usual but I do my work as well as I can so feel great when get home.


New position “hands on”

November 9, 2011

I have been working in my new position for one week. I already knew all team so that wasn’t difficult. I knew my two major projects but I had not look them inside.

The first project I look is the one I consider more exciting. To make a long story short, it involves two pieces of code.

The first one is called “salmorejo” (a typical canarian food is “conejo en salmorejo” or in english “rabbit in salmorejo” where salmorejo is a sauce). salmorejo use rabbitmq to spread some messages over a wide variety of systems. For instance, you can create a new user in and application completly uncouple to this and, throw salmorejo, the addition of the new user to ldap and the creation of the mailbox magically occurs in two different servers. salmorejo is a big black box to me so far, it’s my first experience with rabbitmq or any AMQP so it’s not a big surprise.

The other one is called “gestion de usuarios” (user management). This is a Django application which has access to several data origins (the databases used by the corporate applications in my organization), and to the queue system. The multidb support in Django is awesome, it makes possible to use this application as clue in the identity management process. The Django modularization is also awesome,it makes possible to have several small sub-projects to work with. As I feel comfortable with Django I feel much better working with this sub-project, and, in just one week, there are some code written by me in production. The lack of tests is disturbing in a long term project like this, but there are some tests over there (I hope the most critical parts ;) ). I agreed with my boss to provide tests for all new code.

On the other hand I had some time with Jasig-CAS. This projects seems to be much more simple. We already have an installation using and old version. I’m supposed to deploy the new version. I had a first contact with maven. The maven overlay system for CAS is really smart, although I had not success deploying the war I generated. I feel the cas project could be closed in a couple of weeks. We are going to try some new TicketRegistry (we are using JPA and want to try Memcached and possibly Ehcache before going into production).

The minor projects, those projects out there that used to break my concentration, eats lot of time. I also feel some lack of team work, in my last position every single day had some pair working session, but, in the new one, everyone in the team work in a different thing therefore there are almost no pair working. So far I’m learning tons of things about services, application servers, oracle databases, etc.


New position

November 2, 2011

Today is my first day in a new work position. I’m quite close to my old work, but, even so, this is a great challenge to me. My last position was mainly sysadmin staff such as cooling machines, installing machines, made them highly available through pacemaker, etc. Now I’ll be more involved in services. My new boss says that my main two activities for this weeks will be get familiar with Jasig CAS and a self developed solution for identity management involving up to four differents RDBMS, AMQP, several django apps, etc.

I feel exited about my new position because of the self developed project. I will be the project leader in some weeks. It’s a recently launched software with tons a changes to be done and not a single test, but it’s also my closer chance to be a full time python developer. I feel a little bit afraid too, because all the work done before me.

I’m also leaving Galotecnia. Some years ago, some others and me found Galotecnia, a really small company focus in sysadmins, django development, timing race and others. Now is my time to leave. It was an interesting experience, but I give up. I can’t work in two different companies every single day, with that many context switch, and that many hours a day.


Follow

Get every new post delivered to your Inbox.

Join 141 other followers