Meet Moove-iT’s UX Group 1

Posted by sebastian.suttner on November 24, 2011

What do users really need? That’s the question any software developer should ask themselves.

Here at moove-it, we always put ourselves in our clients shoes to understand their needs and give them exactly what they are looking for. In order to do so we’ve created the UX Department.

From the moment we started gathering up to discuss latest design patterns and the top UX tendencies, we knew something great would come out of it, and so it did. We managed to nurture the whole team with what we’ve learned, improve existing products and enhance new projects’s design from scratch.
We’ll keep working as hard as possible on UX, not only because of how thrilled we’ve got with the results, but also because the way the users feel the product is what matters most.

We present partial conclusions found by the UX group. We share the presentation (in spanish)

It’s about timing baby!

Posted by Andreas Fast on November 15, 2011

Yeah, it’s about timing.

There was a problem in one of our projects at moove-it related to slow processing. There is a daemon spawning new threads to process certain new entries to the database. The entries come from a different system, that’s the reason for this program which processes each new entry. Sometimes at certain hours of a day there are peaks in the entries to the database and the process will fall behind by about 20.000 entries or more. So we started analyzing the code to understand what was happening and why it took so long. We noted that each new thread the daemon spawned took about 5 seconds to complete its task. As we narrowed the measurement we came up with some code that took 5 seconds to execute but it only involved access to the database. So thanks to Aaron Patterson’s (@tenderlove) talk at RubyConf Uruguay about “Who makes the best asado” where he talked about rails and how it manages threads and database connections, we knew where to look.

What he explained is that each new thread requests its own database connection from the connection pool, and if there isn’t a free connection, rails waits for about 5 seconds and if after that there is no free connection it iterates over all the threads to take back the connections of dead threads(more info). See the correlation with the 5 seconds I talked about in the previous paragraph? We immediately suspected that this was the problem. So we started searching the Rails API for a way to release the connection at the end of each thread’s execution. Surprisingly, we didn’t find an easy and understandable explanation anywhere at first googling ;) , so we digged deeper and came up with the following line:

ActiveRecord::Base.connection_handler.clear_active_connections!

The ActiveRecord::Base.connection_handler method returns the connection handler for the current thread and the clear_active_connections method does what it looks like, or from the Rails doc: “Returns any connections in use by the current thread back to the pool, and also returns connections to the pool cached by threads that are no longer alive.”

So this line returns the connections in use by a thread to the pool and enables the new threads spawned by the daemon to use the freed connections. This way we avoid the 5 second wait for rails to free the connections for us.

This one line picked up our performance from processing 1.000 entries in almost 2 hours to processing 10.000 in 5 minutes. Nice huh?!

That’s it. I’m not sure if this is the best way of doing it since this method also “… returns connections to the pool cached by threads that are no longer alive.” I guess this means it does the iteration over all the threads Aaron mentioned, but as you can see I’m happy with the performance improvement. We are using Rails 3.0.5, Aaron said that he will change the behavior, read more about it here.

Special thanks to @cheloeloelo who helped detecting the problems and digging through the Rails API finding the proper method to free the connections.

Image: Suat Eman / FreeDigitalPhotos.net

We run Montevideo 2011 – 10K Nike competition

Posted by Ariel Ludueña on November 08, 2011

Last Saturday a group of brave Moovetians decided to accept the challenge and run the Nike 10K competition.

Nike 10K consist in running 10 kms along the coastline through some Montevideo’s neighborhoods enjoying the beautiful landscape.

Take a look at the pictures.

The whole team 

Silvana, Martin and Nicolas

Ariel before breaking the finish ribbon  :-P

Bird´s eye view

Dart – A new language for structured web programming

Posted by Andreas Fast on November 02, 2011

On October 10th Lars Bak & Gilad Bracha presented a technology preview on Dart. Lars Bak & Gilad Bracha are Google employees leading the development of Dart. Dart is open source, so anyone can use and change it. It’s still in the early stages but the design goals are very clear. It aims to be a structured yet flexible programming language for the web. To feel familiar and be easy to learn, focus on high performance and fast startup. To be appropriate for all devices from phones and tablets to notebooks and servers. There is also a lot of work being done on tools for Dart to run fast on all major modern browsers. It runs on a Virtual Machine on the server and there is a tool to compile the code to javascript to run it on a browser. It also provides a DOM api.
The following presentation shows the basics of the language including some examples. In addition, here are some photos of the presentation at moove-iT!

 

Second RubyConf in Uruguay – 11th and 12th November

Posted by Gabriela Isnardi on November 01, 2011

We are sponsoring one of the greatest technology events here in Uruguay. The Second RubyConf taking place within less than two weeks, the 11th and 12th November 2011, where many IT experts from all over the world get together in order to be immersed in this dynamic world and and up to date get with the latest trends of Ruby and Agile methodologies.

RubyConf Uruguay 2011

We are hungry for knowledge and refreshment, and we all want to be on the same train.

Please welcome all the new members to this awesome community. And help spreading the news, but even more important, do not miss the opportunity to meet the experts, discuss the future of RoR, and be Rail!