Using WebSockets to keep a local cache in sync

Sunday, February 9, 2014


Every now and then you find yourself in a situation were you have to make the most out of the few resources you have available - at least I did!

One of my projects was having considerable performance problems, problems I realised were mainly due to a very slow network - it could take something between 2 to 5 seconds to retrieve 300kb, something that was causing a really sluggish user experience.

Given that the client didn't want to move his server for is current hosting provider, but was complaining all the time of how slow things were, I realised that I had to find a way to improve application responsiveness by having the data already stored locally when the user/UI actually needs it.

So, devised a strategy of keeping a local cache and using web sockets to notify my local cache that local data as dirty and needs to be updated.

Turn on wifi from adb

Sunday, May 20, 2012

Today I found myself locked from my own phone: I accidentally tried the wrong pattern to many times and was asked to login to google - unfortunately for me, I had no internet connection, making it impossible to do so (not nice google).

Using images in Spinner with ArrayAdapter

Sunday, January 9, 2011

In my experiments with android, I was challenged with creating a rating mechanism for a wine app that would use glasses (images) instead of traditional stars. In this article I will guid you through the process of using images in a spinner, to achieve the intended.

Using Camera in Android

Sunday, November 28, 2010

This is a simple how to on how I solved the issue of taking pictures in one application, storing and showing them later.

I found that this simple task was not at all clear for me in the documentation, nor did I found a complete guide to get this task done. I hope if people find the same problem, this article may help them.