google-cloud-platform - Pub/Sub vs Http in Cloud Functions Cron Jobs
问题描述
I want to make Cron Jobs by using Cloud Functions and Google Scheduler I know roughly what Publish / Subscribe is, I searched it. But I still don`t get it perfectly even I read it and over again.
there you have to choose one of three kinds (when you set Google Scheduler) 1. Pub / Sub 2. App engine http 3. Http (just)
Which one of these three should I choose?
I want to delete or set or update the some user`s information data set stored in Firestore in my Android app every night at 12 pm every night.
解决方案
我假设如下: 1. 您使用 Cloud Function 更新数据 2. 您正在寻找在 GCP 中运行的调度程序解决方案
基于这些假设,您可以参考 Google 的这篇文章:https ://cloud.google.com/scheduler/docs/start-and-stop-compute-engine-instances-on-a-schedule ,调用流程将是:Cloud Scheduler -> Cloud Pub/Sub -> Cloud Function -> Cloud Firestore
还提到了为什么选择 Cloud Pub/Sub 而不是 HTTP(S),出于安全考虑,也建议您使用 Cloud Pub/Sub,但如果此处不需要身份验证,您应该自行决定
希望能帮助到你
推荐阅读
- dart - 我怎样才能在一小时前用颤振飞镖?
- html - Django将变量传递给模板
- java - 使用 PowerMockito 两次存根方法以每次返回不同的值
- node.js - 使用 /? 的快速路线
- amazon-web-services - 术语“docker”未被识别为 cmdlet AWS buildspec.yml 的名称
- angular - 无法使用 Angular 7 创建生产版本
- mule-studio - 如何在 MuleSoft AnyPoint Studio v7 中获取 XML 到 JSON 转换器?
- laravel - 为什么 Laravel eloquent 返回空
- javascript - Megakit 主题问题
- stm32 - STM32有CAN总线库直接连接CAN收发器吗?