与直接 .NET REST 调用相比,逻辑应用的性能是否更慢? [英] Is Logic Apps performance slower compared to a direct .NET REST Call?

查看:9
本文介绍了与直接 .NET REST 调用相比,逻辑应用的性能是否更慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Azure 应用服务上使用 ASP.NET 4.7 MVC 5.

I use ASP.NET 4.7 MVC 5 on an Azure App Service.

我目前通过直接从我的 .NET 代码调用 REST API 获取 JSON 响应数据,然后使用

I currently get JSON response data by calling REST APIs directly from my .NET code and then deserialising this JSON using

var order = JsonConvert.DeserializeObject<Order>(json.ToString());

这很好用,而且速度非常好.不过,我现在正在研究 Azure 逻辑应用程序,看看这是否可用于调用 3rd 方 API,然后将其本机架构转换为我的标准架构.

This works fine and is pretty good regarding speed. However I am now looking into Azure Logic Apps to see if this could be used to call 3rd party APIs which would then transform its native schema to my standard schema.

与我当前的本机 .NET 方法相比,使用逻辑应用程序会减慢从 API 端点检索数据的速度吗?我有一种感觉,因为它可能会更加异步/触发并忘记.我希望我只是调用逻辑应用程序并获得与我在本地完成它一样的响应,但具有更大的灵活性和可扩展性.

Would the use of Logic Apps slow down the retrieval of data from the API endpoints compared to my current native .NET approach. I have a feeling that it will as it may be much more asynchronous/fire and forget. I am hoping that I would just call into the Logic App and get the same response as if I had done it natively, but with greater flexibility and scalability.

谢谢.

我的问题是关于逻辑应用程序与本机调用的使用.所以每人承担一份工作.我也混淆了谈论转型的问题.道歉

My question is about the use of Logic App versus native calling. So assume one job each. I confused the matter talking about transformation as well. Apologies

推荐答案

我认为简单的答案是肯定的.您的本机代码中的 api 调用将立即触发并将有效负载直接返回到您的应用程序,而逻辑应用程序步骤具有活动编排和基础设施成本所需的所有管道.您可能可以测量差异,但它可能不会影响您的应用程序的质量,这取决于它试图做什么.

I think the easy answer is yes. The api call in your native code would be fired immediately and return the payload to your application directly, whereas a logic app step has all the plumbing required by activity orchestration and infrastructure costs. You could probably measure a difference, but it may not impact the quality of your application, depending on what it is trying to do.

我要问的问题是重要吗"?通过在 C# 代码上使用逻辑应用程序,您放弃了什么?享受无服务器计算的好处(横向扩展、无需维护基础设施、专注于什么而不是如何做等)是否值得权衡?

The question I would ask is "does it matter"? What are you giving up by using logic apps over c# code? Is it worth the trade off to enjoy the benefits of serverless computing (scale out, no infrastructure to maintain, focus on the what instead of the how, etc)?

这篇关于与直接 .NET REST 调用相比,逻辑应用的性能是否更慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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