WCF与SignalR之间有什么区别 [英] What is difference between WCF vs SignalR

查看:152
本文介绍了WCF与SignalR之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想用WPF创建一个基于客户端服务器的应用程序。



现在哪个是更好的SignalR或WCF服务,用于客户端和服务器之间的通信。

我需要从服务器端向所有连接的客户端发送数据,以及一个客户端可以做一些应该通知的操作连接到同一台服务器的所有其他连接客户端。



有谁可以解释一下这种情况下哪一个更好?





先谢谢,

解决方案

嗨!!!



什么是WCF ????

---------------------------- -------------------------------------------------- -------------

Windows Communication Foundation(WCF)是一个用于构建面向服务的应用程序的框架。使用WCF,您可以将数据作为异步消息从一个服务端点发送到另一个服务端点。服务端点可以是IIS托管的连续可用服务的一部分,也可以是应用程序中托管的服务。端点可以是从服务端点请求数据的服务的客户端。消息可以像发送为XML的单个字符或单词一样简单,也可以像二进制数据流一样复杂。一些示例场景包括:



处理业务交易的安全服务。



提供的服务其他人的当前数据,例如交通报告或其他监控服务。



一种聊天服务,允许两个人实时通信或交换数据。



仪表板应用程序,用于轮询一个或多个服务以获取数据并以逻辑表示形式呈现。



公开使用Windows Workflow Foundation作为WCF服务实现的工作流程。



用于轮询服务以获取最新数据源的Silverlight应用程序。



虽然在WCF存在之前创建此类应用程序是可能的,但WCF使端点的开发比以往更容易。总之,WCF旨在提供一种可管理的方法来创建Web服务和Web服务客户端。

WCF的功能



WCF包括以下功能集。有关详细信息,请参阅WCF功能详细信息。

参考: http:// msdn .microsoft.com / zh-CN / library / ms731082.aspx [ ^ ]

------------------------------ -------------------------------------------------- ------------



什么是SignalR?

---------- -------------------------------------------------- --------------------------------



ASP。 NET SignalR是ASP.NET开发人员的新库,它简化了向应用程序添加实时Web功能的过程。实时Web功能是指服务器端代码在连接的客户端可用时立即将内容推送到连接的客户端的能力。







参考: http://www.asp.net/signalr [ ^

Hi,

I want to create one client-server based application using WPF.

Now Which one is better SignalR or WCF Services for communication between client and server.
I have require to send data to all connected client from server side as well as one client can do some operation which should notify to all other connected clients, which are connected to same server.

Can anyone explain me which one is better in this type of scenario?


Thanks in Advance,

解决方案

Hi!!!

What is WCF????
-------------------------------------------------------------------------------------------
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application. An endpoint can be a client of a service that requests data from a service endpoint. The messages can be as simple as a single character or word sent as XML, or as complex as a stream of binary data. A few sample scenarios include:

A secure service to process business transactions.

A service that supplies current data to others, such as a traffic report or other monitoring service.

A chat service that allows two people to communicate or exchange data in real time.

A dashboard application that polls one or more services for data and presents it in a logical presentation.

Exposing a workflow implemented using Windows Workflow Foundation as a WCF service.

A Silverlight application to poll a service for the latest data feeds.

While creating such applications was possible prior to the existence of WCF, WCF makes the development of endpoints easier than ever. In summary, WCF is designed to offer a manageable approach to creating Web services and Web service clients.
Features of WCF

WCF includes the following set of features. For more information, see WCF Feature Details.
Reference:
http://msdn.microsoft.com/en-us/library/ms731082.aspx[^]
--------------------------------------------------------------------------------------------

What is SignalR?
--------------------------------------------------------------------------------------------

ASP.NET SignalR is a new library for ASP.NET developers that simplifies the process of adding real-time web functionality to your applications. Real-time web functionality is the ability to have server-side code push content to connected clients instantly as it becomes available.



Reference: http://www.asp.net/signalr[^]


这篇关于WCF与SignalR之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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