桌面应用程序 azure_Azure Logic应用程序用例–黑色星期五
桌面应用程序 azure
This blog gives an overview of how Azure Serverless technologies came to rescue when the custom-built integration system went down. Also, it shows the high-level architecture solution built using Azure Serverless services like Logic Apps, Service Bus Queue and Topics, etc to replace the legacy system.
该博客概述了自定义集成系统出现故障时如何利用Azure无服务器技术进行救援。 此外,它还显示了使用Azure无服务器服务(例如Logic Apps,Service Bus Queue和Topics等)构建的高层体系结构解决方案,以替代旧系统。
This article was originally published at Serverless360.com
本文最初发布于Serverless360.com
一切如何开始? (How it all Started?)
About three years ago, Northwind, a company who runs their business in B2B space wanted to extend its business to B2C. So, the company wanted to open a Web Shop (SaaS). Since it was a B2B specialized company there were no warehouse and transport service to serve the customers effectively. The company chose to go ahead with LSP (Logistics Service Provider) instead. The legacy system was built using a middleware to connect the Web Shop and the LSP. Later, the legacy system was integrated with the email system. The complexity of the system increased as several branches (Web shops) opened across the globe.
大约三年前,一家在B2B领域开展业务的公司Northwind希望将其业务扩展到B2C。 因此,该公司希望开设一个网上商店(SaaS)。 由于它是一家B2B专业公司,因此没有有效的仓库和运输服务来为客户提供服务。 该公司选择继续使用LSP(物流服务提供商)。 遗留系统是使用中间件构建的,以连接Web Shop和LSP。 后来,旧系统与电子邮件系统集成在一起。 随着全球各地数家分支机构(网络商店)的开业,系统的复杂性也随之增加。
One day, the whole system went down, and the company started losing hundreds of orders. Then, the company approached an expert team to fix their middleware.
一天,整个系统出现故障,该公司开始失去数百份订单。 然后,该公司联系了一个专家团队来修复其中间件。
需要考虑的要求 (Requirements to be considered)
- Stability – the system needs to be stable enough to handle a lot of orders.稳定性–系统需要足够稳定才能处理大量订单。
- Monitoring – the system should be monitored to alert the operation personnel when something goes wrong.监视–发生问题时,应监视系统以警告操作人员。
- To handle 10,000 orders per hour.每小时处理10,000个订单。
- New SaaS webshop新的SaaS网上商店
解决方案 (The Solution)
The expert team replaced the middleware using Azure serverless technologies. Predominantly, Logic Apps and other Serverless entities like Azure Functions, Service Bus Queues and Topics were used. The stateful middleware was changed to stateless using event-based approach.
专家团队使用Azure无服务器技术替换了中间件。 主要使用了Logic Apps和其他无服务器实体,例如Azure Functions,Service Bus Queue和Topic。 使用基于事件的方法将有状态中间件更改为无状态。
什么是无服务器? (What is Serverless?)
The abstraction of server, platform, and runtime – There is no need to provision or maintain any servers. There is no software or runtime to install, maintain, or administer.
服务器,平台和运行时的抽象 –无需配置或维护任何服务器。 没有要安装,维护或管理的软件或运行时。
Event-driven scaling – This is one of the important characteristics of Serverless, you shouldn’t worry about scaling your solution if demand arises.
事件驱动的扩展 –这是Serverless的重要特征之一,如果需求出现,您不必担心扩展解决方案。
Micro-billing – When your code is executed you pay per execution. Typically, the vendors calculate this based on memory consumption and the time it takes for the execution.
微计费 –执行代码时,您需要为每次执行付费。 通常,供应商基于内存消耗和执行所花费的时间来计算。
优点 (Advantages)
Manage apps not servers – The significant advantage of serverless is that the user does not manage the servers, but the cloud service providers do.
管理应用程序而不是服务器 –无服务器的显着优势是用户不管理服务器,而云服务提供商可以管理。
Reduced DevOps – It reduces the DevOps cost as the infrastructure is maintained by CSP.
降低DevOps –由于CSP维护基础架构,因此降低了DevOps成本。
Faster time to Market – It reduces the time to market as serverless technology screens the ground works and lets the developer focus on the logic.
加快产品上市时间 –由于无服务器技术屏蔽了基础工作并让开发人员专注于逻辑,因此缩短了产品上市时间。
Azure逻辑应用 (Azure Logic Apps)
You can run a business workflow in Azure using the Logic App service.
您可以使用Logic App服务在Azure中运行业务工作流。
The Logic App is a logical container for one workflow you can define using triggers and actions. A trigger can instantiate a workflow, which can consist of one or many activities (actions). For instance, you can trigger a workflow by sending an HTTP request or schedule a workflow every hour to retrieve data from a public website. There are 200+ out-of-the-box connectors available for enterprise integration.
Logic App是一个工作流程的逻辑容器,您可以使用触发器和操作对其进行定义。 触发器可以实例化工作流程,该工作流程可以包含一个或多个活动(动作)。 例如,您可以通过发送HTTP请求来触发工作流,或者每小时安排一个工作流以从公共网站检索数据。 有200多个现成的连接器可用于企业集成。
好处 (Benefits)
- Out-of-the-box connector reduces the integration challenges开箱即用的连接器减少了集成挑战
- Connect and Integrate data from the cloud to on-premises连接和集成云中的数据到本地
- B2B and enterprise messaging in the cloud云中的B2B和企业消息传递
- A powerful web-based workflow designer强大的基于Web的工作流程设计器
Azure Logic应用的定价 (Pricing of Azure Logic Apps)
The pricing is very simple. It works on the pay-as-you-go model, it would cost you only a few nickels. For instance, if you process 1000 service bus messages a day, with a workflow of five actions it would cost you EUR 4.62 approx. To execute a normal action, it would cost $ 0.000025 and for a Standard connector, it would cost you $0.000125. Even, the Enterprise connector would cost you only $0.001. For more information see the pricing page here.
定价非常简单。 它适用于现收现付模式,只需花费几分钱。 例如,如果您每天处理1000条服务总线消息,并且有五个操作的工作流程,则将花费您约4.62欧元。 要执行正常操作,将花费0.000025美元,对于标准连接器,将花费0.000125美元。 甚至,企业连接器也只需0.001美元。 有关更多信息,请参见此处的定价页面。
基本架构解决方案 (Basic Architecture Solution)
Initially, there is a webshop connected to Webshop publisher Logic App through Webhook. The Webshop publisher Logic Apps act as the orchestrator for the workflow. The data from the Webshop is converted into Canonical entity and passed to the Canonical Order Mapper Logic App. Subsequently, the control flows to the CE publisher where the translation of the object happens. Then, the translated object is sent to Service Bus Topic. Topic Subscriptions provide a one-to-many form of communication, in a publish/subscribe pattern. Get to know about Topic Subscription rules here. Based on the filter, the orders are sent to LSP Subscriber and MS (Marketing System) Subscriber.
最初,有一个网上商店通过Webhook连接到Webshop发布者Logic App。 Webshop发布者Logic Apps充当工作流程的协调器。 来自Webshop的数据将转换为Canonical实体,并传递到Canonical Order Mapper Logic App。 随后,控制流向CE发布者,在此对象发生翻译。 然后,将转换后的对象发送到服务总线主题。 主题订阅以发布/订阅模式提供一对多的交流形式。 在此处了解主题订阅规则。 基于筛选器,将订单发送到LSP订阅服务器和MS(营销系统)订阅服务器。
Azure Logic应用程序令人印象深刻的可伸缩性 (Impressive Scalability of Azure Logic Apps)
On running the above workflow, it could process 73,120 orders in 20 min. Every order would get processed in less than 3 seconds and the success rate was above 98 percent. The above log shows that there were 73,120 runs completed and out of which 72,972 runs were accomplished and 148 runs were failed.
运行上述工作流程后,它可以在20分钟内处理73,120个订单。 每个订单将在不到3秒的时间内得到处理,成功率超过98%。 上面的日志显示,已经完成了73,120次运行,其中完成了72,972次运行,失败了148次。
资源组中实体的视图 (View of Entities in a Resource Group)
The above picture represents how the entities will be listed in a Resource Group. For better management of the entities use the Display Name tag. It helps the user to debug the workflow in case of failure.
上图表示如何在资源组中列出实体。 为了更好地管理实体,请使用显示名称标签。 如果发生故障,它可以帮助用户调试工作流程。
Webshop Publisher逻辑应用程序 (Webshop Publisher Logic App)
Out-of-the-box, there is an HTTP trigger which initiates the Logic App and sends 201 response directly for the received message. 201 response represents that request has been fulfilled and has resulted in one or more new resources being created. Subsequently, sends the order message to the other Logic App (Map order to Canonical order) and to Publish canonical order.
现成的HTTP触发器可启动Logic App,并直接为收到的消息发送201响应。 201响应表示请求已被满足,并导致创建了一个或多个新资源。 随后,将订单消息发送到另一个Logic App(将订单映射到规范订单)并发布规范订单。
跟踪属性 (Tracked properties)
In “Response 201 directly” action, the following properties are tracked
在“直接响应201”操作中,跟踪以下属性
- Customer Email客户电邮
- Flow流
- Order ID订单编号
- Shop ID店铺编号
规范顺序映射器 (Canonical Order Mapper)
The Logic App gets triggered by receiving the HTTP request. Then, the message would be passed to Data Operation actions to compose canonical order items and create shop reference data. Subsequently, composes the canonical order using Data Operation action and sends back the response.
通过接收HTTP请求来触发Logic App。 然后,该消息将传递到“数据操作”操作以组成规范的订单项目并创建商店参考数据。 随后,使用“数据操作”操作编写规范的顺序,并发送回响应。
服务总线资源管理器 (Service Bus Explorer)
For easy management of the entities use Service Bus Explorer. It provides filter option for Service Bus Topic using which the message can be sent to the defined subscriptions (LSP). The message will be filtered based on the properties defined in the Service Bus Topic. Here is how Serverless360 makes a better option for Service Bus Explorer.
为了方便管理实体,请使用Service Bus Explorer。 它为服务总线主题提供了过滤器选项,通过该选项可以将消息发送到已定义的订阅(LSP)。 该消息将根据服务总线主题中定义的属性进行过滤。 这是Serverless360为Service Bus Explorer提供更好的选择的方式。
监控方式 (Monitoring)
The above picture shows the Log Analytics dashboard. It provides a graphical representation and monitoring capability for the entities associated with the Log analytics. Inside the Log Analytics, the user can run powerful quires and inspect the database if something goes wrong.
上图显示了Log Analytics仪表板。 它为与Log Analytics相关的实体提供了图形表示和监视功能。 在Log Analytics内部,用户可以运行功能强大的查询并检查数据库是否出了问题。
演示–已付款的订单 (Demo – order paid)
To test the new solution architecture, send the test order, use the Postman tool to send a POST message to the Logic App. On sending the successful order, you can see the 201 response at the bottom left corner of the Postman tool. On receiving the order, the Logic Apps gets triggered and finally, the order message would reach any one of the respective LSP.
要测试新的解决方案体系结构,请发送测试订单,使用邮递员工具将POST消息发送到Logic App。 发送成功的订单后,您可以在Postman工具的左下角看到201响应。 在接收到订单后,逻辑应用将被触发,最后,订单消息将到达各个LSP中的任何一个。
CI / CD管道 (CI/CD pipeline)
The above picture represents the CI/CD pipeline architecture. There are three blocks namely Developer context, Azure DevOps and Azure subscription. The Developer context contains PowerShell, IDE’s, etc. Once the developer checks in the code, it commits to the repository. On switching the Build option, build pipeline deploys the code to the Blob storage. Once Build pipeline is done with the work, Release pipeline kicks off and tells the ARM to reflect the changes in Development, Testing, and Production environment.
上图表示CI / CD管道体系结构。 有三个块,分别是Developer上下文,Azure DevOps和Azure订阅。 开发人员上下文包含PowerShell,IDE等。一旦开发人员签入代码,它将提交到存储库。 切换Build选项时,构建管道会将代码部署到Blob存储。 一旦构建管道完成工作,发布管道就会启动,并告诉ARM反映开发,测试和生产环境中的更改。
好处 (Benefits)
- No manual steps required to deploy the code.部署代码无需手动步骤。
- Quality control can be done可以进行质量控制
- The organization can have a bigger development team组织可以拥有更大的开发团队
挑战性 (Challenges)
- A lot of housekeeping is required around ARM templates.ARM模板周围需要进行大量整理工作。
- Things get complex if any ARM template goes down. Because the failure can be spotted only during release.如果任何ARM模板崩溃,事情就会变得复杂。 因为只有在发布期间才能发现故障。
- The rhythm of the service changes rapidly服务节奏快速变化
以上解决方案的主要收获 (Key Takeaways from the Above Solution)
- Faster time to market: There were only three developers and they could get the project done within 3 months.加快产品上市时间:只有三个开发人员,他们可以在3个月内完成项目。
- Resilient and scalable: As we saw above the application was highly scalable. It could handle about 73 thousand orders in 20 minutes.弹性和可扩展性:如我们上面所见,该应用程序具有高度可扩展性。 它可以在20分钟内处理大约73000个订单。
- It is best suitable for business-critical systems最适合关键业务系统
This blog is an extraction of the session “Black Friday? Logic Apps to the rescue” presented by Aarjan Meirink at MSBuild 2019.
该博客摘自“黑色星期五? 由Aarjan Meirink在MSBuild 2019上展示的逻辑应用程序。
翻译自: https://www.freecodecamp.org/news/azure-logic-apps-use-case-black-friday/
桌面应用程序 azure
相关文章:

PHP的静态变量介绍
静态变量只存在于函数作用域内,也就是说,静态变量只存活在栈中。一般的函数内变量在函数结束后会释放,比如局部变量,但是静态变量却不会。就是说,下次再调用这个函数的时候,该变量的值会保留下来。 只要在变…

MySQL 解压版创建用户密码
root 权限进入MySQL: mysql –uroot 查看当前MySQL用户: select user,host from mysql.user; 此处以User为root,Host为localhost的账户为例,将密码改为password的命令: SET PASSWORD FOR rootlocalhost PASSWORD(newp…

git 忽略指定文件夹的上传
我们在使用 git 开发的时候,有些插件的模块文件通过npm install 就可以下载,一般是不上传到 git 中的(因为文件太多会导致很耗时),例如 我的 node_modules 文件夹,不想上传,我们应该这么做。 我们需要创建一…

数据库初学者_面向初学者的免费6小时数据科学课程
数据库初学者Data science is considered the "sexiest job of the 21st century." Learn data science in this full 6-hour course for absolute beginners from Barton Poulson of datalab.cc.数据科学被认为是“ 21世纪最艰巨的工作”。 通过datalab.cc的 Barton…

网页抓取及下载
downAndroidApk.php <?php /* 命令行 d: cd ApacheServer\php php.exe D:\ApacheServer\web\crawl\downAndroidApk.php --appidFileD:\ApacheServer\web\crawl\youxi.txt --newDirD:\ApacheServer\web\crawl\requestNewDir*/ // 判断必须在php-cli模式下运行,即…

javascript中关于this指向问题详解
前 言 LiuDaP 在前端的学习中,我们必然要用到js,js可以说是前端必不可少的的东西。在学习js的过程中,我们会经常用到this这个东西,而this的指向问题就变得尤为重要。今天正好有空闲时间,就给大家详细介绍一下js中关于…

mpvue 转uniapp 导航栏样式错乱问题修复 tabbar 样式修复
效果图:修改前,修改后 找了半天没找到原因,只能自己改样式了,下面是样式代码(在app.vue 里面加上就行) <style>/*每个页面公共css */uni-tabbar {box-sizing: border-box;position: fixed;left: 0;bo…

css规则_CSS规则,将使您的生活更轻松
css规则by Nick Gard尼克加德(Nick Gard) CSS规则,将使您的生活更轻松 (CSS rules that will make your life easier) After years of writing and maintaining a couple of very large web projects and numerous smaller ones, I have developed some heuristics…

在mybatis中模糊查询有三种写法
<select id"selectStudentsByName" resultType"Student"> <!--第一种--> <!-- select id,name,age,score from student where name like % #{0} % --> <!--第二种--> <!-- select id,name,age,score from student wher…

BZOJ 3566: [SHOI2014]概率充电器
题目:http://www.lydsy.com/JudgeOnline/problem.php?id3566 首先这题正着想不好想,考虑补集转化。 先dfs一遍,令f[u](1-p[u])*∏(1-(1-f[v])*w) f[u]表示u这个点通过其子树并不能联通的概率。 然后考虑v从其父亲连过来的情况,设…

小程序云开发,订阅消息定时批量发送实现代码
需求:做一个类似抽奖结果通知的订阅消息提醒 实现流程: 每个用户需要先授权订阅消息接收,授权成功后把数据存到云开发的数据集合里面,再写个定时器,遍历数据集合的所有数据,拿到后遍历发送订阅消息&#…

机器学习速成课程
Learn the basics of machine learning and data science in this crash course tutorial for beginners from AI Sciences Academy. This course will give you the foundation you need to start learning more advanced material.在此速成课程教程中为AI Sciences Academy的…

H5 画布解决跨域问题,画布保存为图片显示在页面上
实现功能:uniapp H5 使用画布,绘画完之后保存为图片全屏显示完整实现代码,跨域解决方案。 跨域图片解决方案一:(使用base64编码)网络图片放到画布里面绘画 跨域图片解决方案二:(使…

1、IO输入输出流 简介
IO流的分类: * 流向: * 输入流 读取数据 * 输出流 写出数据 * 数据类型: * 字节流 * 字节输入流 读取数据 InputStream * 字节输出流 写出数据 OutputStream * 字符流 * 字符输入流 读取数据 Reader * 字符输出流 写出数据 Writer * * 注意&…

mern技术栈好处?_通过构建运动追踪器应用程序来学习MERN堆栈(MERN教程)
mern技术栈好处?The MERN stack is a popular stack of technologies for building a modern single-page application. In this video course I developed, you will learn the MERN stack by building a full stack exercise tracker application.MERN堆栈是用于构建现代单页…

使用html5进行视频播放
一直以来网页大多是使用 flash 来播放视频。在目前唱衰 flash 的环境下,HTML5 为我们带来了一个网页内视频播放的解决方案—— <video>标签。 在HTML5 中,可以通过HTML标签“audio”和“video”来支持嵌入式的媒体,使开发者能够方便地将…

Linux学习之系统时间同步
一、系统时间的设置 在Linux中设置系统时间,可以用date命令: 1 //查看时间 2 [rootlocalhost ~]# date 3 2008年 12月 12日 星期五 14:44:12 CST 4 //修改时间 5 [rootlocalhost ~]# date --set "1/1/09 00:01" < (月/日/年时:分…

uniapp(一) 项目架构,封装
前言: 最近需要搭建一套基于uniapp 的代码模板,适应各平台的快速打包部署,为提高代码复用率,提升生产力,所以需要构建一套优雅的前端项目架构,下面分享记录一下我的封装。 代码封装我暂时分为三个层面&…

linux下安装sbt_如何在Linux上安装SBT
linux下安装sbt介绍 (Introduction) Hi! I am Sanjula, and in this guide I hope to teach you how to install sbt on Linux.嗨! 我是Sanjula ,我希望在本指南中教您如何在Linux上安装sbt。 Let’s get started!让我们开始吧! 什么是sbt&…

switch...case结构
/**switch(要判断的数据){ case 值1: ...;break; case 值2: ...;break; case 值3: ...;break; default: ...;break;}*/ publuc class employee{ int id; // 员工id String name; // 员工名字 int age; // 员工年龄 String phone; // 员工号码 String address; // 员工地址 publ…

自动布局的 弊端 (后续)
自动布局 比 直接写 frame 会慢很多 具体以后再说吧转载于:https://www.cnblogs.com/Ionatan/p/5109211.html

uniapp H5 JSSDK封装使用
先看效果吧, 封装以后使用很方便,两行代码就能得到微信网页开发中的 jssdk 的 wx.config 执行了 wx.ready 还是 wx.error ,如果返回 true 就标识执行了ready , 可以调用JSSDK的 API 了,如下图示例代码: this.$common.Init.call(this); this.wxjssdkInti().then(rr =>…

课程表美化 css_通过这门11小时的免费课程学习HTML和CSS
课程表美化 cssHTML and CSS are essential skills to have for a career in web development. This eleven hour course from John Smilga of Coding Addict will teach HTML and CSS from the scratch. By the end of this course you will be creating your own projects.HT…

JavaScript创建对象的两种方法和遍历对象的属性
创建新对象有两种不同的方法: 定义并创建对象的实例使用函数来定义对象,然后创建新的对象实例1.定义并创建对象的实例 var personnew Object(); person.firstname"John"; person.lastname"Doe"; person.age50; person.eyecolor"…

微信公众号H5订阅消息开发 uniapp订阅消息
简单说一下流程: 在页面带参数跳转到 https://mp.weixin.qq.com/mp/subscribemsg ,然后用户授权确认或者取消以后,会返回参数里面 redirect_url 的地址,并且带上openid 等相应参数,在前端的页面判断链接里面携带了相关…

GRUB密码设置
通过编辑GRUB启动参数可以轻松的进入单用户模式从而修改root密码,GRUB的密码设置可分为全局密码和菜单密码。 一,全局密码设置 在splashimage这个参数的下一行可以加上password密码,保存后重新启动计算机,再次登录到GRUB菜单页…

国内使用dropbox_通过创建费用管理器来学习使用Dropbox API
国内使用dropboxLearn how to build an expense organizer with the Dropbox API and JavaScript ES6! 了解如何使用Dropbox API和JavaScript ES6构建费用管理器! Dropbox is a content and collaboration platform. Its API allows you to add Dropbox features t…

【洛谷 1345】 奶牛的电信
以前刷试炼场时根本不会的 现在 一眼最小割! #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #define MAXN 1000000 #define INF 100000000 using namespace std; int n,m,s,t; int tot2,g[MAXN],num[MAX…

uniapp兼容H5和小程序订阅消息授权开发封装,使用方便
本文使用 uniapp 框架开发,因为H5的订阅消息和小程序的订阅消息的授权流程不一样,但是很多地方需要使用授权,所以我封装了一个兼容H5和小程序订阅消息授权的方法,使用比较方便,希望能够帮助到你,实测可用。…

dma工作时cpu工不工作_CPU如何工作?
dma工作时cpu工不工作CPU, also known as the microprocessor is the heart and/or brain of a computer. Lets Deep dive into the core of the computer to help us write computer programs efficiently.CPU,也称为微处理器,是计算机的心脏和/或大脑。…