It's possible to chaining task with google cloud tasks? - google-cloud-tasks

Hi all i'am very new to google cloud task.
I want to know if it's possible to chaining task.

Yes. There's nothing stopping you from enqueueing/launching a google task from within another google cloud task.
Is that what you meant?

Related

How can I schedule firebase messaging to send a message at a specific time everyday?

I would like to use firebase messaging to schedule a message everyday, at a specific time(say 9PM). How can I achieve this? Also, is it possible to achieve this without using firebase cloud functions?
Thanks in advance.
Is it possible to achieve this without using Firebase Cloud Functions?
Yes but in this case you'll need to have your own server for sending message requests to the FCM backend, which will route messages to your client app running on users' devices. As you'll see in the doc this is possible for several languages, as well as by using the REST API.
I would like to use firebase messaging to schedule a message everyday,
at a specific time(say 9PM).
You'll have to schedule yourself the process of sending message requests to the FCM backend.
The advantage of using Cloud Functions is that you get all the needed components out of the box with a scheduled Cloud Function: A trusted server environment where your server logic runs with Cloud Function, and a scheduler to run this function as desired.
It will be like making ready-to-use things more complicated by re-inventing them. If you have millions or thousand of users only then it may be cost-effective to in-house this process.

Trigger an R function from Google storage bucket?

From this link https://code.markedmondson.me/googleCloudRunner/articles/usecase-r-event-driven-pubsub.html, it's possible to trigger an R function from pub/sub.
But does Google offer possibility to trigger an R function when a new file is uploaded to a bucket?
Thanks.
You should be able to do this using EventArc and Cloud Run, see Create a trigger for Cloud Run.
NOTE Cloud Run supports any runtime (that you can containerize) and -- although opinionated (constrained set of runtime versions), Cloud Functions next generation (gen2) creates Cloud Run services.
One other way to do this is less practical: Cloud Storage triggers with Cloud Functions. R isn't a supported runtime for Cloud Functions and so, while not impossible, I don't recommend this approach.
There are probably others, GCP's eventing is confusing and my take is that Google's supporting different approaches for customer continuity reasons and doesn't provide clear guidance on the best solutions for "green field" applications.
I think (!?) Eventarc is the strategic solution and recommend using that if you can.

How can i invoke on-demand background service running on gcp app engine without using http?

I have a background service on google cloud platform app engine.
Service is using generic host to schedule the task now i want to run the service on demand, so what are the possible ways to do this?
Can i achieve this using google pub/sub?
Please consider using Google Cloud Functions: https://cloud.google.com/functions/. Google Cloud Functions (GCF) is a lightweight compute solution for developers to create single-purpose, stand-alone functions that respond to Cloud events without the need to manage a server or runtime environment. You can use a Background Function that is triggered by a Cloud Pub/Sub message. For more details, see https://cloud.google.com/functions/docs/tutorials/pubsub.

Mix Cloud Functions w/ Firebase

I have some pub / sub setup on Google Cloud and I have some Cloud Functions running on Firebase.
I'd like to set a trigger on Firebase, so when a user account is created, I publish a message to a topic on Google Cloud.
Is this possible? Am I missing something obvious?
I can trigger a cloud function on account creation and I'm happy at this point showing a console log.
I was considering in my Firebase trigger add something like #google-cloud/pubsub so I can literally setup the message in the body of my firebase trigger, but that feels a little wrong.
Quite clunky and not the way it should be done?
In short, I guess what I'm trying to do is firebase publish to topic on trigger?
I don't think there's anything wrong with what you're suggesting as a solution. You can use an authentication trigger to find out when a new user account is created, then use the node Cloud Pubsub SDK to turn around and publish a message to your topic. There's really no more straightforward way to accomplish this that I can think of.
It's pretty common to mix Cloud APIs into your Cloud Functions, regardless if they're based on Cloud or Firebase events.

Using Selenium from within Cloud Functions for Firebase

Is it possible to somehow run selenium from within Cloud Functions for Firebase?
I found solution for AWS lambda but couldn't find any solution which fits firebase.
After checking the depths of the internet, the answer is no. It's not supported at the moment. However one can submit a feature request and hope that firebase team will implement it.

Resources