Spring数据流和GCP Pub Sub [英] Spring dataflow and GCP Pub Sub

查看:126
本文介绍了Spring数据流和GCP Pub Sub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个事件驱动的微服务架构,该架构应该与云无关(尽可能).
因为这最初是在GCP中进行的,所以我不想花很长时间在配置等方面,我将直接使用GCP的Pub/Sub作为事件队列,并在以后处理其他Cloud实施,但是后来我遇到了Spring Cloud Dataflow,这看起来不错,因为它们是Spring Boot微服务,我需要一种编排它们的方法.

I'm building an event-driven microservice architecture, which is supposed to be Cloud agnostic (as much as possible).
Since this is initially going in GCP and I don't want to spend a long time in configurations and all that, I was going to use GCP's Pub/Sub directly for the event queue and would take care of other Cloud implementations later, but then I came across Spring Cloud Dataflow, which seemed nice because these are Spring Boot microservices and I needed a way to orchestrate them.

  • Spring Cloud Dataflow是否支持Pub Sub作为事件队列?
  • 这将使我的生活更容易进行配置和设置,而不是选择非本机经纪人吗?

推荐答案

首先解压缩Spring Cloud Stream的活页夹抽象"是很有用的,因为它使用的是这种框架,您将拥有可移植的事件驱动流应用程序,可以针对所需的消息代理在笔记本电脑或您选择的任何云中本地运行.

It'd be useful first to unpack the Spring Cloud Stream's "binder abstraction" because it is using this framework, you'd have a portable event-driven streaming application, which can run locally in your laptop or any cloud of your choice against the desired message broker.

了解有关绑定器抽象的更多信息绑定器实现. Google PubSub是一个选项,由Google 此处.

Learn more about the binder-abstraction here. Here are all the available binder implementations of choice. Google PubSub is an option, and it is maintained by Google here.

现在,让我们谈谈Spring Cloud Data Flow(SCDF).一旦构建了流应用程序,就可以使用SCDF设计+创建由此类应用程序组成的数据管道.可以选择混合使用我们也构建,维护和发布的实用程序应用程序的集合.实用程序应用程序可以与Google PubSub或其他活页夹打包在一起.更多详细信息此处.

Now, let's talk about Spring Cloud Data Flow (SCDF). Once when you have built the streaming applications, you could use SCDF to design+create a data pipeline made of such applications. There's the option to mix and reuse the collection of utility applications that we build, maintain, and release as well. The utility applications can be packaged with Google PubSub or other binders. More details here.

部署数据管道时,SCDF将解析并下载单个应用程序,以本地将其部署在Kubernetes或Cloud Foundry等平台上.我们的用户也在包括DIY平台在内的各种云基础架构(VM,裸机,EC2,Rackspace等)中进行相同的操作.

When you deploy the data pipeline, SCDF will resolve and download the individual applications to deploy them natively on platforms like Kubernetes or Cloud Foundry. We have users doing the same in a variety of cloud infrastructure (VMs, Bare-metal, EC2, Rackspace, etc.), including DIY platforms, too.

虽然还可以自动执行应用程序的部署,但SCDF会根据从流/任务和应用程序名称组合而来的命名约定自动执行配置设置.因此,当应用程序启动时,他们将自动接收(来自SCDF的)连接配置以及要连接到的目标/主题以及其他元数据,以通过一系列应用程序作为流"或任务"进行推理. /batch"数据管道.这使您可以集中监视和管理管道.

While also automating the deployment of the applications, SCDF will automate the configuration setup based on naming conventions derived from stream/task and application names as a combination. So, when the apps bootstrap, they would have automatically received the connection configurations (from SCDF) and as well the destination/topic to connect to along with the other metadata to reason through a collection of apps as a "stream" or a "task/batch" data pipeline. This allows you to monitor and manage the pipelines centrally.

最后,SCDF具有在数据管道中滚动升级/滚动降级1或许多应用程序的固有功能,而不会影响生产中的上游或下游使用者.更多详细信息此处.有一个网络研讨会录音(演示开始于〜41.25 )如何使用CI/CD自动化.

Lastly, there's the native ability in SCDF to rolling-upgrade/rolling-downgrade 1 or many applications in a data pipeline without impacting the upstream or downstream consumers in production. More details here. There's a webinar recording (demo starts at ~41.25) on how to do with CI/CD automation.

这篇关于Spring数据流和GCP Pub Sub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆