GCP (GAE, GKE), where is some possibilities for the place to run its background workers: • Use Compute Engine • Create workers on an existing K8s cluster as a deployment • Use Cloud Run (today I talk about it)
containers on demand. “Cloud Run is a fully managed compute platform that automatically scales your stateless containers. Cloud Run is serverless: it abstracts away all infrastructure management, so you can focus on what matters most—building great applications.” https://cloud.google.com/run/
interface. Each Cloud Run service has its endpoint URL that exposes the interface. However, from Rails applications, it’s nice for us if we were able to invoke it asynchronous via Active Job interface.
only two methods: • enqueue(job) • enqueue_at(job, time) The interface itself is not so difficult: https://rip.hibariya.org/post/creating-an-active-job-adapter/
on demand. • We can even use it for Active Job backend with github.com/esminc/activejob-google_cloud_tasks-http . • Implementing Active Job interface itself is not so difficult.