Background jobs for mobile apps


(Daveyon Mayne) #1

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


(Daveyon Mayne) #2

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


(Stuart Langridge) #3

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?


(Daveyon Mayne) #4

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?


(Stuart Langridge) #5

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.)


(Daveyon Mayne) #6

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


(Daveyon Mayne) #7

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


(Steve Jalim) #8

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


(Daveyon Mayne) #9

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