Understanding Cloud Tasks for Async Tasks - Jonathan Lin

  Рет қаралды 16,352

Google Developers Space

Google Developers Space

Күн бұрын

This event is brought to you by GDG Cloud Kuala Lumpur, a non-profit community of cloud developers who share ideas on content related to the Google Cloud Platform.
Name: Jonathan Lin
Topic: Understanding Cloud Tasks for Async Tasks
Timecodes:
00:00 Introduction
00:22 What is Cloud Tasks?
01:24 What is a queue? (CS101)
02:53 Queues in Cloud Tasks
05:39 What is a Task?
08:03 Relationship with App Engine
12:26 Cloud Tasks Features
13:36 Cloud Tasks Use Cases
15:32 Queue Configuration (Rate-limit)
15:53 Token Bucket Algorithm
17:46 Queue Configuration (Rate-limit)
19:46 Queue Configuration (Retry parameters)
21:22 DEMO
35:15 Securing Task Handlers
37:34 Cloud Tasks vs Pub/Sub
40:03 Cloud Tasks vs Cloud Scheduler
40:50 Q&A
For more updates on upcoming events, follow us on social media:
✉️ Newsletter → goo.gle/devspace-news
👤 Facebook → goo.gle/devspace-fb
🐦 Twitter → goo.gle/devspace-twitter
🔴 Meetup → goo.gle/devspace-meetup

Пікірлер: 26
@michelkant
@michelkant 3 жыл бұрын
Great video, good starting point! :)
@valentinratti
@valentinratti 3 жыл бұрын
Thanks for the guide!
@filipniklas
@filipniklas Жыл бұрын
Very helpful! Thanks! :)
@sergiishpak
@sergiishpak 4 жыл бұрын
Thank you!
@callezenwaka
@callezenwaka 2 жыл бұрын
Hi Jonathan, Nice and easy to follow presentation. How do you handle adding a large number of Cloud Tasks to a queue? Could you point me to code implementation? Regards.
@clinton11994
@clinton11994 3 жыл бұрын
I have a question regarding task timeout based on scaling type, so if I have a time max of 60 mins and task is taking more time then 60 mins then the task will automatically restart, but will it also kill the ongoing task ? (ongoing task is the one which is being executing for last 60 mins)
@canislatrans6606
@canislatrans6606 3 жыл бұрын
Congrats! Very good video. You explained Cloud Task. Could say how to fix when Cloud Tasks does not send the payload data but you can see the json data in Cloud Tasks Console? thank you :)
@ElPolemista
@ElPolemista 10 ай бұрын
Hi Jonathan is there a way to create a debounce of a cloud function using a task? I was thinking to * delete task with id * create a task with an id in 60 seconds But this doesn't work because the taskId is still there (despite the deletion in the queue was successful)
@swimtlvmitnovizki6895
@swimtlvmitnovizki6895 3 жыл бұрын
great video!! very well explained and easy to understand. could you please add some info about how to test/debug tasks in dev environment please?
@JonathanLinErnSheong
@JonathanLinErnSheong 3 жыл бұрын
Thanks for watching! Since your task is just a HTTP endpoint, you can test by simply calling it. Understandably, the challenge is using Cloud Tasks in a cloud dev environment and it has to call a localhost endpoint. One way if to use a tunnel e.g. ngrok. Another way is to use a Cloud Tasks emulator. There seems to be a few to choose from: google.com/search?q=gcloud+tasks+emulator but remember that it is not an official Cloud Tasks emulator from GCP. Hope this helps you on your way
@user-bg1wj9fd3f
@user-bg1wj9fd3f 6 ай бұрын
Was it really need to have Tasks and Pub/Sub? Would not it be better to have only one Message Broker?
@asmarali4167
@asmarali4167 2 жыл бұрын
Can you do a similar tutorial using App Engine Target?
@alxx736
@alxx736 3 жыл бұрын
Hi ! One question ,suppouse i want to have all the task that failed in all their tries (They never could complete the request,maybe because the third api was down ) .Can i trigger or having a callback indicating that ? I need to save in DB which People did not receive the message. Thanks in advance !
@JonathanLinErnSheong
@JonathanLinErnSheong 3 жыл бұрын
Hi there, you can try handling the task yourself (code that you control that calls the 3rd party API), so that even if the 3rd party API fails, your code can handle the failure and log in DB, etc.
@rajatsudan960
@rajatsudan960 3 жыл бұрын
Very helpful video. I have a question. If I want to provide a user ability to schedule a task, that can set to run weekly or daily or monthly. This ability to set/ configure the frequency will be also be provided to the user from front end and the frequency will be stored in backend/dbase. So that user setup/ schedule a task on UI. Shall I use Cloud task or Cloud Scheduler. Because in Cloud Scheduler we have to provide the frequency in Google Console but in my case I want to provide that ability on the application. Please suggest how can i do it
@JonathanLinErnSheong
@JonathanLinErnSheong 3 жыл бұрын
Thanks for watching! I would not use Cloud Scheduler for it because it costs $0.10 per month per entry. And who knows how many the user will create. Hence my suggested approach would be to periodically retrieve the user-generated crons/frequency from the database (e.g. every 5 minutes, a good candidate for Cloud Scheduler), and if it appears that it is time to run the job/task, create tasks in Cloud Task. Hence your application code has to parse the cron and determine whether or not it is time to run the job/task
@carleriksen9474
@carleriksen9474 3 жыл бұрын
Hi Rajat. Did you manage to solve this?
@rajatsudan960
@rajatsudan960 3 жыл бұрын
@@carleriksen9474 yeah I was able to create a schedule from the frontend using cloud scheduler
@luisperis6064
@luisperis6064 2 жыл бұрын
@@JonathanLinErnSheong Thank you 4 the video!
@marcelofernandez6561
@marcelofernandez6561 2 жыл бұрын
those slides, can you share it?
@SameerShaik03
@SameerShaik03 3 жыл бұрын
So, what happens when the maxRetryAttempts is reached?
@JonathanLinErnSheong
@JonathanLinErnSheong 3 жыл бұрын
Cloud Tasks will presumably remove the task from the queue, since it will no longer retry there is no point keeping it there.
@richard-social8125
@richard-social8125 Жыл бұрын
""The UI is not great" 27:53 🤣🤣 that summarizes the entirety of google cloud UI
@FilthySnob
@FilthySnob 3 жыл бұрын
'Clot tasks'
Cloud Functions vs. Cloud Run
20:37
Google Cloud Tech
Рет қаралды 47 М.
Building and managing APIs for serverless with Google Cloud
28:21
Google Cloud Tech
Рет қаралды 20 М.
WORLD'S SHORTEST WOMAN
00:58
Stokes Twins
Рет қаралды 125 МЛН
Llegó al techo 😱
00:37
Juan De Dios Pantoja
Рет қаралды 59 МЛН
Cloud Run user auth for internal apps
15:31
Google Cloud Tech
Рет қаралды 16 М.
Task Queues: A Celery Story
29:39
PyCon AU
Рет қаралды 37 М.
Build an event-driven orchestration with Eventarc and Workflows
46:14
Google Cloud Tech
Рет қаралды 9 М.
Postgres Internal Architecture Explained
33:16
Hussein Nasser
Рет қаралды 148 М.
Faster, cheaper serverless APIs for your Firebase app
14:24
Serverless workflows in Google Cloud
16:38
Google Cloud Tech
Рет қаралды 18 М.
Google Cloud Scheduler - Calling Cloud Function
13:16
Cloud Advocate
Рет қаралды 35 М.
Google Cloud Platform (GCP) - Cloud Run
1:53:07
Cloud Monkey
Рет қаралды 27 М.