Log on:
Powered by Elgg

Xabriel J Collazo-Mojica :: Blog

August 25, 2011

The PIRE trip to Barcelona was very fulfilling both in a professional and personal way. I had a great time at Rosa's lab, and I think we accomplished a solid piece of work. We will continue to work together to shape the effort into a paper. And of course, I also had a great, great time at Barcelona. It is a great, very livable city that offers great tourism as well as nice places to revisit when you're there in a medium term stay as I was.

This will be my last post for now. I leave you all with a picture of Rosa's Research group, and as promised before, a picture of the Marenostrum computer!

 

From left to right: Xabriel J. Collazo-Mojica, Jorge Ejarque, Raül Sirvent, Enric Tejedor, Javier Álvarez, Rosa M. Badia, Roger Rafanell, and Francesc Lordan. 

 

 

That's were I run my WoW server. :) 

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

August 09, 2011

We just got a great opportunity to try and publish our early results on a Symposium. But the deadline is quickly approaching. Very quickly. So please excuse me while I go in hibernate mode. See you all after the deadline.

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

July 25, 2011

I ran into scalability issues this week. My prototype system keeps an in-memory database of infered models from my rules. It seemed to be fine with my test cases, but when I decided to push it a little to see how it scaled, it java.lang.OutOfMemoryError on me. I had an idea of why it was happening. I was wrong. Then another idea. I was wrong again. The problem was that I was picking possibilities randomly, without data. Not a good way of doing science.

I decided I needed to profile the prototype to see where exactly my memory was being used. I was happy when I realized (after a few minutes of googling around) that I did not have to download nor configure anything. Turns out the Java 6 JDK comes with a built-in lightweight profiler called JVisualVM. So my machine already had the profiler one command away. JVisualVM uses Java's reflection API and other tricks to dynamically instrument a running Java program. Zero configuration and full profiling benefits. Nice.

 

I profiled the memory of my prototype, and it turns out my models where huge: 7MB each. This, with a max heap size of 128MB was easily throwing my service to its knees with only 15 inference requests. To further test its behaviour, I bumped the max heap size to a more server-friendly size of 512MB. The math says I can hold around 70 models now. But clearly there was something wrong as 7MB is way too much memory for what I was doing. After looking into my project settings I realized I never turned off inference derivation logging, and that was stealing most of the memory, aorund 6.5 of those 7MB! Memory problem fixed.

A much more subtle and hard to fix problem was the CPU time performance. I was averaging 500ms per inference. But after looking at the CPU profiling from JVisualVM, I was able to pinpoint the source of most of the CPU time consumption. I was firing way too many rules. Fixing this issue took much more time than pinpointing it though. Inference time will vary with the complexity of the model and the # of rules, but for my test cases, I managed to go from that ugly 500ms to 36ms on average. I'm still getting some spikes of ~150ms, but these occur only when the current heap size is almost full. My theory here is that Java is first doing a run of the Garbage Collector before committing to giving more heap to the program. But this is a minor issue now.

I'm starting to like Java again. 

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

July 18, 2011

To the benefit of my own sanity and happiness, the last few years I have been doing most of my work, both personal and academic, in Ruby. Why? Well, because it's simply beautiful, especially if you use Ruby on Rails on top of it do to web development. I could tell you all the horror stories about developing the simplest of the web systems in Java/Servlets/Hibernate but I won't. You already know them. And if you like sanity too, you have kept yourself away from it.

But all this time away from the Java ecosystem also kept me away from some technologies that have emerged in its community to specifically tackle the "configuration hell" problem Java has always had (since version 5 at least).

Java is the programming language I'm using right now for this PIRE project, as Ruby's support for Rule-systems and the like is inadequate for my tasks. But I need a way to cleanly communicate back to the other Ruby-based modules. So I was happy to find JSR 311, or more commonly JAX-RS, which is a definition for a set of APIs in Java to be able to implement RESTful Web services in a very nice way:

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

@Path("/helloworld")
public class Example {

    @GET
    @Produces("text/plain")
    String getMessage() {
        return "Hello World!";
    }
}

Well, as nice as Java can be. In this Hello World example, we are using three of the annotations from JAX-RS. @Path("/helloworld"specifies that, if we see that path in the URI, then the underlying implementation should route that HTTP request to the Example class. The @GET annotation specifies that the getMessage() method responds to GET HTTP requests only. Finally, the @Produces("text/plain") annotation specifies that we will return a response with that MIME type back.

I guess I could do the exact same thing with 2 lines of Ruby, but hey, to my surprise, it works! ... (after 2 hours of configuring all the dependencies Cool )

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

July 10, 2011

Most of my posts lately have been about my travels, so I think it is time to write a little about my work. On my first post for this PIRE grant to Barcelona, I mentioned the work that my collaborators have made on the SERA project. Although we decided not to directly interface with this system, we are using the main technique employed in that project: A Rules-based inference system.

So how does it work? More or less like this: In a Rule-based inference system, you have some input 'facts'. For example:

  1. Xabriel is the son of Jose.
  2. Jose is the son of Aurelio

The Rule system has, well, 'rules'. These work as templates for variables that the system tries to satisfy. If a rule is satisfied, then it gets 'fired'. Lets take this example rule:

  • If 'person_1' is son of 'person_2', and 'person_2' is son of 'person_3', then 'person_1' is grandson of 'person_3'.

Based on the facts above, we can match all the variables (I.e. person_1 to Xabriel, person_2 to Jose, and person_3 to Aurelio), the rule gets fired, and thus it infers that Xabriel is the grandson of Aurelio.

I made this example very simple, but both the facts and the rules can get arbitrarily complex. The work of a Rules-based inference system is to make the matches, to be always correct ('correct' according to the given facts) and to be efficient (because we don't want to wait 5 minutes to know that Xabriel is the grandson of Aurelio). Most forward-chaining rule systems do fast inferencing by implementing the RETE algorithm, or a derivation of it. This algorithm was proposed by Charles L. Forgy when doing his PhD at CMU.

Now the power of this is that you can decompose a quite complex system into simpler parts and give it to a rule engine to infer some new facts. Think of a general graph. It is quite complex if you look at it as a whole:

But as we now, we can decompose it into simpler relations between its members:

  • "1" is connected to "2" (and viceversa)
  • "2" is connected to "3" (and viceversa)
  • etc.

Can you see the similarity with the previous example facts? They are both describing relations. "Object 1"  has "relation A" with "Object 2". We can of course use this way of representation for a bunch of stuff. In my case, to represent Distributed Ensembles of Virtual Appliances (DEVAs). We describe DEVAs in easy to comprehend facts (I.e. "Appliances 1 has installed Service A") and then we try to infer some other info from that. I cannot comment on the details of what we are doing, but I can say that rules do map well to our problem domain.

Keywords: International Collaborators, Rules

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

July 04, 2011

Montserrat is a mountainous region around 45 minutes away from Barcelona city. Roughly 'Saw Mountains', it is named like that because of its saw-like pikes. It is home for the Benedictine abbey of Santa María de Montserrat. This abbey stands at 597 meters above the sea level. 


The abbey itself is home to "La Moreneta" (roughly, 'The black one'), a black virgin statue. People come to the abbey's church to see La Moreneta, and to touch the ball she has in her hand to get the blessing and/or make wish.


Montserrat is also a great place to do hiking, having various routes with spectacular views. You can take a special train that takes you from the abbey to an altitude of 1000 meters! Once at the 1000 meter point, you can walk down most of the trails. Sure, you could walk uphill from the monastery, but for couch potatoes the fun is to always have potential energy on your side :)
 
Click here for a very nice panorama of Montserrat. 
 
I'm including a photo of the 'Sara pose' for a dear friend of mine.
 

Keywords: Site Seeing

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

June 29, 2011

MareNostrum 

Not directly related with my research, but really interesting, is MareNostrum, Barcelona Supercomputing Centers' supercomputer. As of June 2011, it is at spot number 170 on top500.org, which ranks the 'fastest' supercomputers in the world. With 10,240 cpu cores, this computer can achieve a maximum of 63.83 Teraflops of computational power.

MareNostrum, roughly 'Our Sea' in english, is located in an odd building... a chapel! Well, not really a chapel anymore, as the Torre Girona chapel has been 'deconsecrated'. Unfortuntaely, I haven't been able to physically see the computer yet, but once I do I'll try to do one of those nifty 3D panoramas. For now, here's a public domain photo:



Saint Jonh's Eve

I'm puertorrican. Puerto Rico has had an interesting (caotic?) history, being a colony of Spain for 400 years (and a colony of the USA for the last 113 years, but that's another post...). This events have made puertorricans adopt many cultural customs. It was nice to see how spaniards celebrate the 'Víspera de San Juan' (Saint John's Eve). Here they go at night to the beach and do picnic and drinks, and they also make bonfires. There are fireworks everywhere too.

Back in Puerto Rico, we also go to the beach, and do the drinks, but the idea of going to the beach is to, at exactly midnight, enter the water, position yourself against the sea, and throw yourself backwards seven times. If you do, you are supposed to be washing your sins, and you'll have good luck the rest of the year.

I didn't get into the water this time. Hope Fortuna, the luck Goddess, doesn't take it personal on me. :)

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

June 19, 2011

At the lab 
 
Tuesday morning I arrived at the Barcelona Supercomputing Center. Human resources greeted me, and we setup the access control. Later I met with Dr. Rosa Badia. We had a short meeting were we discussed the working environment, and she introduced me to several of my co-workers.

On Wednesday, I had a meeting with the Grid Computing and Clusters Group, which works under the supervision of Dr. Badia. They presented a demo of one of their cloud computing prototypes. I also had the opportunity to do a short presentation of my work. We narrowed down the collaboration opportunities to a few possible topics. As of now, we are leaning towards ‘Mapping of QoS constraints to Resource Assignment’ by using the OCCI API as an intermediary between our DEVA prototype and an interoperability system currently being developed here at BSC. Given that they have unpublished results, I cannot discuss more details for now.

On Thursday and Friday, I spend most of my time reading various technical docs, including the OCCI standard, reviewing the OVF standard, and some non-published material from BSC.
 
 
No hay pan para tanto chorizo 
 
An experience I would like to share is today's manifestation. I was walking around Barri Gotic (The Gothic Quarter), when I bumped into a quite big dinosaur.

 
I followed the dragon all the way to Plaza Catalunya. Turns out today there was a quite big manifestation from spaniards, mostly young people, claiming a more open democracy in regards to the economical crisis. They are particularly against the recent cuts being done with the "Pacto del Euro" (Euro Act). "No hay pan para tanto chorizo" was one of the chants (roughly "There's not enough bread for so many sausages"). "Democracia no es votar cada 4 años" said one banner ("Democracy is not just voting every 4 years"). Here are a few pictures of the activity. By the way, the dinosaur got lost in the crowd... there were probably 50,000 people there!


Posted by Xabriel J Collazo-Mojica | 1 comment(s)

June 12, 2011

Its being a while since my last post! To make it short: I've been a little busy. I managed to finish my last year of courses. While at it, the position paper for FlexiTools@SPLASH 2010 got accepted. We also got a full paper accepted at the 11th International Conference of Software Engineering and Knowledge Engineering (http://www.ksi.edu/seke/seke11.html).

On that last paper, we discuss a metamodel for describing Distributed Ensembles of Virtual Appliances (DEVAs) at a proper level for cloud computing users like web application developers. With such a model, we can apply black-box or white-box performance modeling to suggest and realize the models in the resources provided by various Infrastructure as a Service (IaaS) vendors.

That all sounds good in paper, but we now intend to prove that it is doable. We now have a limited prototype that can take a DEVA model and launch it on Amazon EC2. But the whole purpose of having a platform-independent model is that it can be launched anywhere. For this, we have partnered with Dr. Rosa Badia and Dr. Javier Ejarque, from the Barcelona Supercomputing Center. They have proposed a system called SERA: the Semantically Enhanced Resource Allocator. We will be working on an interface between DEVAs and SERA. It should be an interesting piece of work.

I've just arrived at Barcelona for this collaboration, and will start working next Tuesday. I do hope to enjoy both the work and the catalonian life. Keep checking out this blog for weekly updates. For now, enjoy this three-dimensional panoramanas from the Basílica de Santa María del Mar and the Palacio Real.

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

September 06, 2010

I made it back to Miami on Sunday August 22 at 4am. Although I will be back to my normal 9-credit load, plus all the TAing I need to do, I hope to finish the promised prototype features in the next few weeks. After that, we will start working on the autonomic features, as we will be targeting ICAC.

 

For now, this will be my last post here. I'm including a picture of my last day at the lab in São Paulo. (Full resolution here.)

From left to right: Felipe Meneses Besson, Alvaro H. Mamani-Aliaga, and Xabriel J. Collazo-Mojica

Keywords: International Collaborator, Lab/Workplace Environment, Project-Plan

Posted by Xabriel J Collazo-Mojica | 0 comment(s)

<< Back