BLOG@CACM
Architecture and Hardware

Intermittent Net and Mobile/Cloud Development

Posted
Loyola University Chicago Professor George K. Thiruvathukal

A number of cloud computing companies operate under the assumption that ubiquitous connectivity is a thing of the present–or at least that’s how it seems sometimes. A significant use-case that suggests otherwise is the painful experience the casual traveler experiences to gain even a basic level of Internet service when traveling abroad. One of our favorite travel destinations, France, provides a pretty good edge case, and it’s right here in the “modern” world. 

In the modern era, which has brought a number of bad things, such as the use of the Internet for less than constructive purposes, many countries are cracking down on the use of the Internet, which most of us stateside need little reminding of when it comes to the tragic events of 2001, which have since affected many other countries, including France and India, among others. 

Without a doubt, travel has gotten a lot more complicated because of heighted security, and it presents a major challenge to the traveler. The central dilemma for staying  mostly connected is whether to pay exorbitant international roaming  charges or to try and get your Internet fix on a potent combination of free Wi-Fi and pay-as-you go SIM cards. Regardless of which choice you made, rest assured, it is not going to be the perfect experience, and  your mileage may vary by country.  In most cases, you’ll end up having free Wi-Fi where you have accommodations but once you hit the sidewalks, you’ll want to “take it with you.” At least you will if your interests are in mobile/distributed systems, where you have already been trained to know that you *must* take it with you.

On our family vacation, we opted for the option of subsisting on free Wi-Fi whenever possible. Unfortunately, getting a pay-as-you-go option wasn’t much of an option, owing to unusually high precautionary procedures. To get started, all you need to do is to open up a bank account. It  takes awhile, even if you have more than passable French. Then, assuming your vacation is at least three weeks long, your account will be opened, after which you can pay for your service via one of the major providers. Not a good option for yours truly! And besides, I was gone after a week for the segment in Spain (where connectivity was much easier).

So the lowdown is that I made the painful choice to forget about getting a SIM and prepaid data plan in France. Being a distributed systems person anyway, I cling to the belief that a good distributed approach to life should allow you to be offline whenever you like and have access to important data. And as long as you occasionally have some form of Internet access (Wi-Fi being relatively abundant in many parts of France, especially Paris), you can periodically “load up” your apps and data.

There were three things that I knew I had to be able to take with me. At this level, it is nothing profound, because they are the same things I take on every trip: GPS, offline maps, and city travel guides. 

On this trip, I was equipped with my Android Nexus developer phone but most of what I am describing here can probably work on other platforms. What is particularly nice about having a relatively open phone like this while traveling is that a significant number of applications exist that take advantage of the platform or provide missing functionality that the Android team “forgot” to include.

One area where I quickly realize that I needed help is with assisted GPS. When I walked to the corner at the famed San Miguel stop to get a clear  view of the sky, I noticed that the GPS was taking forever to sync. After checking the net, I realized that what most smartphones really have is known as assisted GPS (AGPS). AGPS effectively requires you (at least once) to connect to Wi-Fi in the locale of interest (or before heading out on your trip, but, hey, I forgot to do that) to download the crowdsourced GPS data.

Eiffel Tower and Google Maps Another area where I quickly ran into trouble was with the native Maps application (which comes from Google). While Google Maps is designed to work offline, you inevitably end up with Maps that are not as fine-grained as the regular Google Maps and, furthermore, you inevitably end up forgetting to cache the maps you need for your trip. Luckily, there are other services that make it super easy to download the maps you want for your trip, and there are maps available of varying detail. More importantly, these applications are GPS aware, making it easy to know “you are here” or get full navigation. Most of the time, I am comfortable with identifying some points of interest a priori, putting them on the map (with the ubiquitous push pin) and trying to figure out how to get there. I think in this respect, I am stil a bit “old school.” Half the fun of travel is “getting there.” So if you make a wrong turn or two, you’re likely to find something not mentioned in the travel guide. 

In any event, while I was doing all of this, it occurred to me that this is just one of many examples how computational thinking affects my life. For many, computational thinking is mostly about algorithms. While algorithms are a part of everything I do, I think this trip reminded me that systems thinking–or more  precisely, distributed systems thinking–plays an even more important role for  me. In the mobile/wireless world, it is clear that applications must be  designed to take into account all of the following: 

  • intermittent connectivity
  • quality of service (a problem often found on but not limited to Wi-Fi networks!)
  • geolocation 
  • offline data with efficient synchronization (algorithmic)
  • power awareness
  • local laws.

The lowdown is that the world is moving in this direction, but we’re far from done yet. We’re blessed with a reasonably good GPS system, but problems of connectivity and varying quality of service (even in the West with many areas unserved by modern broadband/wireless technology) mean that applications, especially for globe hoppers absolutely need to be cloud-aware but able to allow for completely offline operation. 

As we saw with AGPS and maps, the cloud assists us but does not insist on being available.

Anyway, I’ll conclude by discussing a few “best of breed” that represent good distributed thinking in the mobile/offline + cloud-assisted (when available) space.  The links you see here are to the free versions of the app on Google Play Store. 

GPS Status
This app allows you to do two things: 1) download AGPS data, and 2) determine whether you get a proper GPS fix by showing you the satellites that are visible and level of signal, etc. By installing this app, I was able to reduce the GPS fix time from 15 minutes to seconds!

Maps with Me
Google’s Maps service is wonderful, but still requires you to be connected at all times. There are ways to cache Google Maps data; however, you end up losing the ability to zoom in and out of a region, which makes getting around a huge pain. Using Maps with Me, you can get maps for just about anywhere via the Open Mapping Project. A rather incredible feature of this free app is the ability to get OMP data transparently (another important principle of distributed design), meaning the app discovers that you are in a certain place and asks you (if you are connected for the moment, again over Wi-Fi) whether you’d like to download the maps (while you can). Maps with Me recognized that I was in Paris, France, when I connected to my apartment’s Wi-Fi and give me the options to download maps for Paris, all of France, and any other areas I wanted to visit. That’s about as location transparent as it gets!

Trip Advisor, Paris Edition
This app, similar to Maps with Me, also gives you great map data, primarily focused on key attractions (e.g., sites, shopping, restaurants, etc.) superimposed on the offline maps. Again, it seems like this sort of thing should be so obvious in designing a system, especially when you don’t have a network connection. Rather impressively, the app has integrated updating of things that change and seems to transmit simple deltas when it is able to update itself. In distributed systems, we say that such a system has good support for “transparent replication.” I even keep this app on my smartphone now that I am comfortably back in my island home of Chicago. I just never know when the my broadband network is going to be down! (Yes, it does happen in U.S., but not often.)

My intention is not to endorse any of these products. Even so, they are free (but not free/open source) and are performing a useful service to humanity.  I’m delighted to see that there are a growing number of apps that have good  distributed design–a topic I have been researching and teaching for many years. It is  nice to see that developers out there are increasingly aware of this area and building their apps around the core principles of distributed systems.

After this trip and seeing these apps in action, I think the outlook is partly cloudy with periods of sunshine. Who says we only need sunshine?

I wish to extend a special note of thanks to my colleague, Konstantin Läufer, for his inspiration and input to this article.

 

Join the Discussion (0)

Become a Member or Sign In to Post a Comment

The Latest from CACM

Shape the Future of Computing

ACM encourages its members to take a direct hand in shaping the future of the association. There are more ways than ever to get involved.

Get Involved

Communications of the ACM (CACM) is now a fully Open Access publication.

By opening CACM to the world, we hope to increase engagement among the broader computer science community and encourage non-members to discover the rich resources ACM has to offer.

Learn More