sábado, 19 de mayo de 2012

Presentación en Barcelona GTUG

Paso a detallar los puntos que sugiero presentar para el GTUG de Barcelona en la próxima reunion. Cualquier sugerencia es bienvenida, así que si tienen alguna, solo basta que me envíen un email o que comenten en el blog.

Título: Implementando RESTful en GAE
Cuando: Miércoles 20 de Junio 2012
Hora: 18:15h
Lugar:
FIB - UPC Campus Nord - Sala de actos B6
Calle Jordi Girona, 31, 08034 Barcelona, Spain
08034

Temario

  • Repaso a configurar un proyecto Java en GAE
  • Uso de persistencia con JDO
  • Gestion de las instancias y servicios CRON
  • Configuración del plugin de maven para GAE y JAVA
  • Libreria RESTlet para Android y GAE
  • Ejemplos de implementacion en un sitio web real
  • Discutir patrones de interacción/sincronización con servicios RESTful
  • Manejo de Errores en la capa de comunicación 
  • Uso de threads para mejor respuesta
  • Implementación RESTful en Android tomando en cuenta el ciclo de vida de una actividad

Controlling your Task Queues

Summary
One of the key features in any framework for executing tasks (serializable and persistents) is how you can control them when things go wrong. This posting discusses some of the control panel of the GAE task queue. Details of the process is described in another article.

Previous Work
On my previous entry I wrote about the plans of creating automated tasks to process 130,000 transactions.Today I write about how things did not go as expected.

Executing the Tasks
Everything went out of control and very quickly. There were some important limits that I needed to respect in the Google Maps API. The most important wass the 120,000 transactions a day limit. With that I had no trouble. However, there must be a limit of transactions per minute that is nowhere published. With the limits in the GAE tasks I had no trouble.

However, I realized that after processing around 800 transactions, the google Map API was giving me errors. When I looked at the log, I realized I had fullfilled the quota for the day. I initially expected the quota to be 2000 transactions a day. But whenever I started executing the tasks, I set the limit to 5 transactions a second. I quickly reached a total of 300 transactions a minute, thus fulfilling my quota.

Since I promised to my wife that I would have all the data processed by Thrusday, I started fearing that I had to sleep in the couch. The previous day I was bragging about all the computer power that I had available and today i had reached the maximum.

Controlling the Tasks
The console for the tasks in GAE is your best friend in this circumstances. Also make sure that during the different loads generated that you follow the best practices for loads.

The tasks api actually worked as expected but the Google Maps API was the first thing to break down. I had anticipated a processing of 200

lunes, 14 de mayo de 2012

Integration as a Service in the Cloud


It is no surprise that the new wave of system integration tools are being designed with the cloud in mind. What really surprises me is the easiness that allows a very heterogeneous environment seem completely simple to the developers that use it. This article discusses the latest features of Apache SMX Fuse (http://fusesource.com/) , a systems integration platform for the cloud.

For those who haven’t tried Apache SMX Fuse, it is an excellent integration solution. It is based on several Apache projects: CXF, HttpClient, Camel, Zookeeper, among others. And allows the integration of almost any type of system: via ftp, file, web service (SOAP and RESTful), email, plain text file, etc. We have use it for several projects and is a very powerful tool.

Going back to the IaaS for the cloud, one of the most difficult things in configuring high reliable systems (clusters, pools, master/slaves, you name it) is the configuration management (CM) -- I am following here the SE Book from T-Systems. Some solutions like Oracle Weblogic are somehow better than others but at the end, when you are creating containers, app modules, shared libraries, etc it is very difficult to be error free. That’s why I was glad to see that the folks at SMX Fuse have applied some very good patterns:

Inheritance
One of the pilars of Object Oriented Design, inheritance allows you to provide a very efficient configuration of modules. Based on Zookeeper (http://zookeeper.apache.org/), the Apache project, it helps you to be consistent and achieve excellent repeatability.

Provide Different Sizes: Small, Medium, Large
Why order a large pizza when you only need a slice? That’s definitely a problem when dealing with these high replication systems: they are usually really heavy and complex. Apache SMX Fuse now comes with different sizes that allows you to use just what you need.

Bet on Auto-Discovery
Yeah, we all have problems with the famous JNDI registry, but it is an start. I have seen some nice features of this integration platform that is really worth looking. An excellent fallout system that allows the delivery of messages through different routes: JMS, WebServices, etc. and do not even worrying if the system is on-premise or on-public.

The bottom line of CM for the cloud is to have zero downtime for the developers, reduce all the proliferation of dirty system (VMWare images everywhere ), and ease the rollout.