I'm building an API for a mobile app with Rails and I need to implement a Google Cloud Messaging server.
I see that there are ready libraries available both for Rails and node.js,
what would be a better approach for this? implementing the GCM server in Rails (it involves database tables and tasks for background work) or in node.js (seems much simpler, GCM use JSON and also for quickly implementing exponential back-off. the Rails server will have to HTTP POST the messages to the node.js server).
You should choose the solution that would be easier for maintenance, in the long run. And of course it depends on other things as well: Are you on a tight schedule - choose the solution that faster to implement. Is one of the solutions in a technology that you're completely unfamiliar with - choose the one that you do know. And etc.
I ended up using node.js and the node-gcm module.
it was very easy to build and test and as I said in the OP, implementing exponential back off and retries is very easy and doesn't require any database or additional web workers.