Archive for July, 2012

The cross-discipline conundrum (or how we can’t always learn from other disciplines)

I was cycling home one day and this thought popped into my mind: I’m trying to address the issues of multi-tenancy in software systems. In other words, that is to say that I’m trying to make it easier for several software systems to co-exist, as tenants, in the same piece of hardware. When we think about it from a software perspective, it is definitely novel – big names out there like Microsoft, VMWare, Salesforce, etc are working hard on this (each in their own way of course) and it’s a rather hot topic. Companies provide their employees with Microsoft Azure training and there’s this growing need to fit more (tenants) in less (hardware). Come to think of it, it’s a bit like what’s happening in big cities all over the world.

Wait a minute.

That’s exactly what’s happening in big cities all over the world!

And why does this matter, you ask. Well, we’ve been doing this with people and cities for the best part of a century, so maybe some of the problems we face in software have already been dealt with in the “physical world”. “Sure, Tiago, that’s obvious! Why are you still writing this blog post and not out there reading books on urbanization?”. Yeah, yeah, yeah… have you read the title of the post? How we can’t always learn from other disciplines.

Multi-tenancy in software engineering presents its own challenges. How can you compare the concept of software versioning to any concept of the physical world? Same goes for concepts like deploying several instances of the same piece of software in different servers. Surely we can’t deploy the same person across several buildings (well, quantum physics says we can, but let’s stick to classical mechanics for the purpose of this post) and we definitely don’t want to have a tenant with a bathroom on one street, the bedroom two blocks away and finally the living room in a different town. That doesn’t work for people, it’s not convenient, but it works for software. Software doesn’t care if it has to invoke method foo() in its own memory stack or if it has to wrap its request in SOAP and have it traverse all over the world to have it executed.

So what’s the point of this post, really? While it’s always good to have a broad cross-disciplinary view and keep an open mind and an eye out for other fields which might be (metaphorically) solving the same problems as yourself, it’s also very important to identify genuine problems in your field. Sure, resorting to metaphors is perfect to learn from other fields but these don’t always apply perfectly and when they don’t apply perfectly, my theory is that they are no good.

In other news, I just submitted my paper to WCRE 2012 :-) let’s see how convincing am I with my maintenance techniques for distributed systems…

Changing the way I use my Mac

I never thought I would come to write such a post one day, but the truth of the matter is: the way I used to use my computer wasn’t sustainable. Whoa! It seems you really can use the word sustainable wherever you want…

I’m a browser person. Pretty much everything I do sits inside the browser: e-mails, RSS feeds, reading the news, facebook, etc… everything happens inside the browser. When I need to find a scientific paper, what do I do? That’s right! I use my browser to go to Google Scholar where I then search for what I’m looking for. Nowadays I’m even having some Google Docs action ever since I started sharing documents with my fiancée which require the capability of simultaneous collaborative editing. Sadly, all of this can only happen in the browser. Microsoft, with all its might, still hasn’t figured out a way to make Microsoft Office collaborative. But I digress.

The point is, those of you who are lazy and like to keep things at hand (like me), probably end up with at least 10 tabs open at all time. And your work flow is something like “open tab”, “search for something”, “close tab” and that would be peachy if it wasn’t for all the bugs features present in nowadays’ browsers. For example, if you close a tab in Chrome, Chrome will still keep that tab stored just in case you made a mistake and want to bring it back to life. Similarly, all your path within a tab is stored, in case you want to push the back button to go to where you where before. Now, when you put these two together (a whole path plus saving all the closed tabs), this brings up quite a massive memory requirement. In the beginning it might not be noticeable, but Chrome (and Firefox, Safari, etc) can grow above 1Gb of memory quite fast.

When that happens, your computer will start swapping memory to the hard-drive and eventually you’ll start to feel sluggishness in everything you do.

How can I fix that? This was my first thought. And if I can’t drive web-browser developers to do something about it and truly make their code more memory friendly, that means I have to change the way I use my Mac. It started with GMail. I’m an avid GMail user but GMail’s web interface is loaded with resource-hogging javascript. This meant that GMail had to go and give way to a more resource friendly Thunderbird. A purpose-built application which, despite only serving one task, it’s always there whenever I need it. It also notifies me whenever I receive a new e-mail and I can even replace Outlook which I was using for my university e-mail! Something about two birds and a stone comes to mind…

Not requiring to have my e-mail open in the browser anymore, this meant I could just close the browser whenever I don’t need it. This has been the biggest change in my behavior. Nowadays, I open the browser, check whatever I want to check, and afterwards, the way of the dinosaurs it goes again. This means that the memory usage of the browser never goes up like mad anymore, my computer is always snappy and all the frustration of dealing with a slow as molasses computer is gone.

Nota bene, I have 8Gb of RAM in my Mac, I’ve had it this way for a while now, and if history has taught me anything, that is that no amount of RAM is enough when you use the browser continuously, without ever closing it or restarting your computer. Period.

Lesson learned? How happy you feel about your computer’s speed has a strong correlation (and causation) with how often you close your browser.