A few 4th & Mayor things: Node cloud backend, Nokia Apps Madness, new markets & localization efforts

Posted 28 March 2012  

I wanted to take a few minutes to share some random notes on some of the exciting 4th & Mayor happenings. I’ve been working more on refactoring the cloud backend and wanted to share some light into how that all works. Also, would love some love in the ongoing Nokia March Apps Madness competition!

Nokia Apps Madness: the Excellent Eight

TheExcellent8Nokia’s been doing a lot of really cool promotional work for app developers and their phones recently. Initially starting at 32 apps in their March App Madness, I’ve made it a few rounds and am now in the ‘Excellent 8’, exciting!

If you’ve used the app or support what I’ve done there as a scrappy little independent developer in my spare time, I’d love your support by voting – it’s up against the Facebook app for Windows Phone! You can also read about the other apps on the competition blog post here.

Cloud backend

The entire backend of 4th & Mayor is powered by Node.js, a really powerful JavaScript runtime designed for building great apps and services. This powers push notifications, live tiles, the web site and services, and so on. All standard Foursquare services (checking in, finding nearby places, etc.) are handled by Foursquare’s web services directly however – the backend for my app is mostly auxiliary and Windows Phone value-add.

Node is very fast and efficient, but it’s just part of the story. The cloud is also performing live tile graphic generation, handling preferences and cloud settings, and crash reports in some situations.

I’d like to start sharing more information on the backend, and in the meantime, want to provide some points to the technology and modules that have made development fast and fun:

Node makes it very easy to hang APIs and other endpoints using modules such as express. Here’s the endpoint for handling a disconnect request to the app. It simply validates a little bit then calls a helper method I have for removing entries from the clients table:

// ---------------------------------------------------------------------------
// Disconnecting client channel
// ---------------------------------------------------------------------------
app.post('/v1/disconnect', function(req, res) {
    // https://www.4thandmayor.com/v1/disconnect/?uri={0}

    var uri = req.param('uri');
    if(uri && pushutil.isValidUri(uri)) {
        mongoRemovePushFromClients(uri, function() {
            cloudHistory.log('push notifications disconnected by the user for ' + uri);
        });
    }

    res.send('ok');
});

I’ll be writing more about my cloud backend services in the future, but maybe this will whet your whistle!

New markets

I’ve submitted the app for certification in all the new markets for the Windows Phone, so this is exciting. Expect it to hopefully be approved and start showing up very soon.

4th and Mayor will now be available in Bahrain, Bulgaria, China, Costa Rica, Croatia, Estonia, Iceland, Iraq, Israel, Kazakhstan, Latvia, Lithuania, Qatar, Romania, Saudi Arabia, Slovakia, Slovenia, Thailand, Turkey, UAE, Ukraine, Venezuela, and Vietnam.

Several months ago the app was added to the 5 earlier marketplaces introduced by Microsoft this year, including Argentina, Indonesia, Malaysia, Peru, and the Philippines.

Don’t have the app? Download it now from the Windows Phone Marketplace

Localization efforts

I’ve begun working with some people on localization efforts for the app. My plan is to use GitHub (already setup a repository for this) to work with developers who have volunteered their skills and services and keep that part of the work all open source.

One thing to note is that I’m somewhat limited by what Foursquare has localized: they’ve done a ton of locales, but often if the web services cannot return localized information (think badges, witty text, etc.) then it won’t be a great experience, so that is the largest limiter.

The initial languages will be Japanese, German, and a few others – with many more to come after that. If you’re interested in participating, please send e-mail to 4thandmayor@gmail.com (the support address for the app).

Thanks for reading this far – Jeff.

Jeff Wilcox is a Principal SDE Architect at Microsoft on the Azure team.

Jeff lives in Seattle and is an alumnus of the University of Michigan with a degree in Computer Science.

comments powered by Disqus