Foundbite: Launching and Scaling with Cloudant and Windows Azure

By Mike Broberg

I’ve spoken to several Cloudant customers, and feedback that keeps coming up is how fast they can prototype, launch, and then iterate development cycles for their applications, even in production. A great example is Foundbite (@Foundbite) from James Mundy (@MendzappJames), founder of Mendzapp (@Mendzapp) out of the Sheffield University Enterprise Zone in the UK.

James Mundy, Foundbite
Foundbite logo

So what is Foundbite? You can take a picture or a series of photos, and the app captures the ambient sound happening at the time. Together, they form a foundbite. That foundbite is uploaded to a map, and users share it on the website, Twitter, and Facebook (much the same as Instagram), but in the app you can actually go around the world and see what’s been uploaded in different places. You can experience the excitement before a football game in Philadelphia or the lashing rain of a monsoon in India. It’s all about sounds from around the world and hearing what it’s like to be in different places. That’s Foundbite. Download it now from the Windows Phone Store.

Create an account and try Cloudant yourself

Ten months ago, Foundbite was just an idea. Now, after completing the Microsoft-Nokia AppCampus accelerator program for Windows Phone developers, Foundbite launched in the Windows Phone Store this week. We spoke to James for more on what it took to launch a new mobile app using Cloudant and Windows Azure.


Cloudant: How did you get the idea for Foundbite and enter the AppCampus program?

James: I started Mendzapp at university. I had just started programming and Mendzapp was the professional front for my work. I had made a few apps, all for the Windows Phone platform. Then I won a competition run by Nokia with the concept of Foundbite. That was in 2011, and although I wanted to build the app, I found I didn’t have the skill-set, especially when it came to the back end side of things.

A year later, I heard about AppCampus. The whole idea for the program is to provide funding for new apps to get them on Windows Phone, exclusive for three months. When that came along, I decided to really go for it and turn Foundbite into the sole app of the business.

Last November Foundbite was accepted into the program, and my friend George Powell and I went to Finland for a month. There was a bunch of mentoring and business development help — lots of pitching practice too. That experience helped us enter Slush, the startup competition in Helsinki. Foundbite finished in the top 20 out of 100 on the lightweight track, which wasn’t bad considering it was the first time we’d pitched anything to an audience. Since then, I’ve been developing the app for Windows Phone alongside Alfie Woodland, who works for Mendzapp on the Web side of things, and George for part of the time.

Cloudant: What’s it like launching your first big app for the Windows Phone platform?

James: It’s been a huge learning experience because I’ve made apps for Windows Phone before, but I haven’t had to deal with much server-side code. One of my previous apps, Vizage, took a picture of your face and guessed how old you were using the face.com API. It was gimmicky, but it was a good learning experience because it involved having the server make the request, send it off, and pass the results back to the phone. But that’s the only real experience I had making a Web service before Foundbite.

Foundbite involves making the app a Web service, and the website, and, obviously, interfacing with Cloudant to do the database. I had never worked with databases, so I had to learn that part the most.

George and I had very little experience with MySQL, and from what I’d read, MySQL seemed hard to scale and learn in-depth. I heard about Cloudant’s NoSQL database on a Windows Azure blog post and we decided to go that route.

Cloudant: Why did you launch Foundbite on Cloudant?

James: When we were looking for database options, the key thing we wanted was the flexible structure of the data. I knew in the early stages of building the app we’d be changing it around a lot — changing fields in the database. We evaluated Cloudant and MongoDB on the NoSQL side and various relational offerings as well.

After settling on Cloudant, I read up on it over a weekend and managed to integrate the database service into Foundbite by Sunday evening.

Cloudant is all REST, and that’s what appealed to me most. It was all really easy. I expected it to take ages. I didn’t think I would buy a book at the beginning of the weekend and implement the entire back end system by Sunday evening.

At the moment, Foundbite’s data model is not too complicated. But the foundbites are based on location, so even the simple geospatial data was too complicated to represent in Azure Tables (latitude and longitude fields to place foundbites on the map). The Cloudant stuff was really easy because you can use the Lucene search that’s built-in to find foundbites by location. I followed the example on geo queries from the For Developers section of the Cloudant website. Being a Windows developer, it was good seeing this kind of documentation. The examples on the Cloudant site were everything I needed. I got stuck on some things, but the support was great, and that’s how I met Cloudant’s Simon Metson (@drsm79).

Cloudant: So Foundbite was on Cloudant from the start?

James: Right. Foundbite uses Cloudant’s Jenever cluster on IBM / SoftLayer in Amsterdam. Earlier this summer I wrote a blog post, “Cloudant's phenomenal response time,” that looked at the average response time between my Windows Azure application servers and my Cloudant database. It wasn’t a scientific test because the types of responses varied, but it was and continues to be ridiculously fast: around 0.2 milliseconds. Microsoft’s Azure Western European data center is also located in Amsterdam, so hosting on Jenever works out perfectly.

Cloudant: As your first big Windows Phone launch, what has it been like preparing Foundbite for large scale?

James: The combination of Windows Azure and Cloudant makes Foundbite pretty scalable. On Azure, I can simply drag a slider and scale up as many instances as we want, as well as being able to set rules like CPU usage to allow the service to auto-scale. In terms of dealing with load on the Azure side, we’re fine, and obviously Cloudant has that covered on the database side. I think the Foundbite infrastructure is about as scalable as it can be. If the app gets bogged down, the most likely problem will be my code, though after a successful beta program for several months I’m confident I’ve ironed out most of the kinks (famous last words!). Here’s how things are set up:


With the launch this week, my hope is that Microsoft and Nokia will drive lots of traffic to the app and the Foundbite website. It will be a good test of scalability.

Cloudant: How has the performance been on Cloudant?

James: I should clarify what’s stored and where. Images and audio for foundbites are stored on the Windows Azure BLOB storage service. I know you can store binary attachments on Cloudant, but we already have a good deal with Azure for this. So Cloudant is storing user account info and geospatial data.

The data model is quite simple. At the moment, there’s only two types of JSON documents in Cloudant: a user document and a foundbite document. There are then a couple of views of the database to retrieve different bits of data and make it easily accessible. There’s one view that arranges all the foundbites by the time they were added. With that view, we can use MapReduce to find foundbites by a certain user and within a certain time period, and then Cloudant’s Lucene search on top of those results retrieve foundbites by location.

The data model will get a bit more complicated when we start adding social features like commenting, liking, and following. Initially, the Foundbite feed used the _changes API endpoint in Cloudant to get the most recent uploads. But as we add more social features, this will become a feed of people you’re following.

Cloudant: Working with a flexible schema, what have code changes been like?

James: One example is when I implemented the Foundbite feed by time. I initially had them as following the _changes feed, which is basically the time they were added to the database, not the time the foundbites were actually created. I wanted to change that. It was as simple as going in there and changing the JSON fields and the Map function in Cloudant and it was done. That was really useful.

Cloudant: As you’re adding new features to Foundbite, how will your JSON documents change over time?

James: Aside from the social features we have planned, another thing we’ll add is the ability to reverse-geocode foundbites by location. Right now each foundbite is associated with a location. With reverse-geocoding implemented, we’ll be able to categorize them by country, city, or even a district inside a city. Then I’ll be able to use composite keys within my MapReduce functions. So if I had a key that was (country, city, town), I could just search for all the foundbites in that country and town. That will be really useful for grouping them and helping people discover where the most foundbites are being uploaded at any point in time.

Cloudant: What do you think it would be like if you had to set up your own database infrastructure to launch Foundbite?

James: I don’t know, but I have thought about “What if we launched with a different database and then moved over to Cloudant?” The thought about migrating data between databases scares me. I’m glad we didn’t go that route.

Cloudant: Thanks!


We’re watching the launch of Foundbite, and all seems well. Go to http://foundbite.co/ to get the app from the Windows Phone Store, or join the mailing list to see when Foundbite will be ready for your phone or tablet.

Thanks again to James for the time, and look for a follow-up post here soon to see what Foundbite would have looked like if it launched using a relational database. We’ll also provide a look at the JSON document for a foundbite and how James will evolve that document over time. An ER model might also make an appearance ;-)

-- Mike Broberg, marketing communications manager, Cloudant

Create an account and try Cloudant yourself

Sign Up for Updates!

Recent Posts