Azure Mobile Services save the day (or app)!
When Windows Store first opened to all developers, I created an app Movieoholic which pulls in data from Rotten Tomatoes (RT), YouTube, and Wikipedia to provide all the information that one wants to know about a movie. Frankly, I didn’t have very high hopes from the app so scalability was the last thing on my mind. I just created the app and got it into the store.
Now the thing about RT API is that it is rate limited – 10000 calls per day, 10 calls per second. This initially seemed fairly high number to me. So the initial version of my app didn’t implement any kind of caching mechanism. My app pretty soon got somewhat popular. After getting some good reviews, I started getting bad reviews about the app not working\crashing. I looked at the RT Developer dashboard and noticed that I was frequently going over my quota limit. To quickly workaround this I started caching the RT API responses on user’s machine; refreshing data from the API only when a time period of 24 hours has been crossed. In hindsight, I should have done this in the initial version of app itself.
Caching stabilized things for a while. But as the app popularity grew, I was again back to hitting my quota limits. I needed some kind of middle tier service which cushions the number of requests to RT API and most importantly, I needed to do it quickly. Enter Azure Mobile Services (AMS)!
I had known and played with Azure Mobile Services for quite a while then. But what pushed me into selecting it was when I had a chance to attend a session on it by Josh Twist (@joshtwist). I was amazed at the simplicity and power it provided and the rapid improvements and features that were added to it. I knew it was in good hands.
Writing code in Azure Mobile Service browser window
To make things even simpler, AMS provides an SDK for Windows Store apps (apart from SDKs for other platforms). They also provide a sample app showing how to use the SDK. In fact the whole operation to migrate my app to use AMS was so easy and smooth that I was able to finish the process in a day, testing included!
If you are developing a mobile app for any platform, I highly recommend considering Azure Mobile Services for any kind of network communication. You won’t be disappointed.