.net核心REST API与WCF哪一个更快? [英] .net core REST API vs WCF which one is faster?

查看:120
本文介绍了.net核心REST API与WCF哪一个更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我是.NET Core新手。我正在开发一个新项目,我们将拥有REST API,同时应该由成千上万的用户使用。 REST API将使用Entity Framework更新和返回SQL Server数据库中的数据。我们广泛使用单元测试和日志记录(log4net)。



来自我的网上研究我发现dot net core没有所有的dot net framework API。



我有一些顾虑



1-点网核心REST API会比WCF REST API更快吗?

2- dot net core支持单元测试和日志记录吗?

3-点网核心缺少哪些主要功能?



我尝试过:



我在网上搜索了上述问题的答案,但我没有找到明确答案

解决方案

< BLOCKQUOTE> 1。无法猜测,因为它取决于很多变量。

2. 点网核心支持单元测试和记录 - Google搜索 [ ^ ]。

3.你需要更具体。


Quote:

我发现dot net core没有所有的dot net framework API。





正确但最新版本的.NET Core应该包含启动和构建应用程序所需的核心功能和API。请记住,.NET Core框架设计为跨平台,因此您不希望特定于Windows的API可用。此外,您必须考虑并分析为什么需要在完整的.NET框架上使用.NET Core。如果您的目标是跨平台,微服务拱门方法以及容器,那么.NET Core应该非常适合这种情况。



引用:

1-点网核心REST API是否会比WCF REST API?



你的问题没有明确的答案,这完全取决于你期望(或想要提供服务)的流量类型,你的REST会有什么样的功能API(也影响性能),你如何构建它(代码标准和最佳实践)等等。



这是一篇你可能想读的好文章: ASP.NET框架和原始吞吐量性能 - Rick Strahl's网络日志 [ ^ ]



在最新版本的.NET Core中,对框架进行了大量的性能优化和增强。它还实现了.Net标准,可以轻松与其他版本的.Net Core共享代码。如果我选择,我肯定会使用ASP.NET核心Web API(REST),因为您的目标是使用.NET Core。



Quote:

2- dot net core支持单元测试和记录吗?



正如在其他解决方案中已经提到的,.NET Core确实支持单元测试和日志记录。 ASP.NET Core完全是关于中间件的,因此您可以使用并向您的应用程序注入您喜欢的单元测试和日志框架。



引用:

3-点网核心缺少哪些主要功能?





开始查看添加到新版本的新功能: .NET Core 2.1中的新功能Microsoft Docs [ ^ ]



然后查看路线图,了解您在此之后丢失的部分:



(a) master / dotnet / core的core / roadmap.md ·GitHub [ ^ ]

(b)路线图·aspnet / Home Wiki·GitHub [ ^ ]


Hi All,

I am new to .NET Core. I am working on a new project where we will have REST APIs that should be used by thousands of users at the same time. The REST APIs will use Entity Framework to update and return data from a SQL server database. We use Unit tests and logging(log4net) extensively.

from my research online I found that dot net core does not have all the dot net framework APIs.

I have a few concerns

1- Will a dot net core REST API be faster than WCF REST API?
2- Does dot net core support unit testing and logging?
3- what are the main features that are missing in dot net core?

What I have tried:

I have searched online for answers to the above questions but I did not find a definitive answer

解决方案

1. Impossible to guess as it depends on so many variables.
2. dot net core support unit testing and logging - Google Search[^].
3. You need to be more specific.


Quote:

I found that dot net core does not have all the dot net framework APIs.



True but the latest version of .NET Core should include the core features and APIs you need to get you started and build the app. Keep in mind that the .NET Core framework is designed to be cross-platform, so you don't expect windows-specific APIs will be available. Also, you have to consider and analyze why you need to use .NET Core over the full .NET framework. If you are aiming for cross-platform, microservices arch approach along with Containers, then .NET Core should fit perfectly for that.

Quote:

1- Will a dot net core REST API be faster than WCF REST API?


There is no definitive answer to your question, it all depends on what kind of traffic are you expecting (or wanting to serve), what kind of functionality would your REST API have (which also impacts performance), how you built it (code standards and best practices) and lots more.

Here's a good article that you might want to read: ASP.NET Frameworks and Raw Throughput Performance - Rick Strahl's Web Log[^]

In the recent version of .NET Core, there are lots of performance optimization and enhancements made to the framework. It also implements .Net Standard that makes it easy to share the codes with other versions of .Net Core. If I were to choose, I would definitely go with ASP.NET Core Web API (REST) since you are aiming to use .NET Core.

Quote:

2- Does dot net core support unit testing and logging?


As already mentioned in the other solution, .NET Core does support both unit testing and logging. ASP.NET Core is all about middlewares, so you can use and inject a Unit test and Logging framework that you prefer to your app.

Quote:

3- what are the main features that are missing in dot net core?



Start looking at the new features added to the new version here: What's new in .NET Core 2.1 | Microsoft Docs[^]

and then look at the road-map for the missing piece you're after here:

(a) core/roadmap.md at master · dotnet/core · GitHub[^]
(b) Roadmap · aspnet/Home Wiki · GitHub[^]


这篇关于.net核心REST API与WCF哪一个更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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