birmingham.io

Background jobs for mobile apps

With Rails 5, you can use job to perform a later action with or without the user’s action. I’m now using iOS and Firebase. I need to have background jobs but I don’t want to go a tedious route to have Rails talking to Firebase just to get background jobs. Is there a service available I could use? If the user uninstall the app, the job will still be active unless the user deletes their account.

Thanks

Never mind. Found it: https://firebase.googleblog.com/2015/05/introducing-firebase-queue_97.html?m=1

er. Firebase Queue is a job queue, but it doesn’t actually run the jobs, right? Your server does that. Unless I’ve missed something?

1 Like

Oh! I’m looking for something that runs the job! I haven’t fully read Firebase Queue and if it doesn’t then I’ll need to run the jobs. Do I need my own server for this?

You do if you’re using Firebase; it does not have the ability to run cloud code, yet. (Google Cloud Functions provides this, but there’s currently no way to have a Cloud Function be called when something in Firebase changes; you could prod the function yourself, though.)

1 Like

Useful stuff. The aim was that the user clicks a button and that job would run until cancelled. I’ll have a further look. Thanks

@sil Thanks for the direction. I’ll need a node.js server to do what I want :wink:

Or something like AWS Lambda for on-demand processing, perhaps?

:thinking: Something to look at but all I’m doing is something very, very basic.

Proudly sponsored by Bytemark