Node.Js + Socket.IO vs SignalR vs C# WebSocket Server
2013-05-21 14:36
1036 查看
12down votefavorite 5 | I currently have a TCP server application written in .Net that receives and submits messages to clients. I am looking at building a web application so need the communication layer. I have built a Node.JS + Socket.IO app which connects to my TCP server and then pushes communication to the web application and all works fine. I have just read about SignalR as an alternative to keep it in the .Net stack. However I have also found that I could write a C# Websocket Server, a basic demo here I assume that this basic server is what SignalR is but obviously with a lot more functionality in it? What I'm trying to decide is do I just append my current TCP application with a Websocket server or do I go down a separate SignalR or Node.js route? Out of interest how does a SignalR application run, is it as a Windows service, console app or IIS service? c# asp.net node.js websocket signalr
| ||||||||||||||||||||||||||||||
comments |
2 Answers
activeoldestvotesup vote11down voteaccepted | SignalR is like Socket.IO in that it supports transport negotiation/fallback. It is a framework and not a server, so you need to host it on a server of some sort. We have hosts for ASP.NET, OWIN (e.g. Kayak) and self-host, so you can run it in your own process easily, e.g. a Windows service. SignalR has supported clients for browsers (JS), .NET, Windows Phone 7 and Silverlight. There are also contributed clients for things like iOS, Mono Touch, etc. SignalR will give you a much higher level API than raw sockets which is its big advantage, allowing you to do things like "RPC" from server to clients in a broadcast (or targeted) fashion.
| ||
![](http://static.adzerk.net/Advertisers/d4b9015397cb409cb1da2a60116d19c8.jpg)
![](http://engine.adzerk.net/i.gif?e=eyJhdiI6MTI0OTEsImF0Ijo0LCJjbSI6MzEwODgsImNoIjoxMTc4LCJjciI6NzUxNjMsImRpIjoiZGFmMmQ5MzMwMzU2NDkwY2FlYzI5NDgxMTRjNDgzMGEiLCJkbSI6MSwiZmMiOjEwNTE4OSwiZmwiOjUxODgxLCJrdyI6ImMjLGFzcC5uZXQsbm9kZS5qcyx3ZWJzb2NrZXQsc2lnbmFscix4LXVzZXItcmVnaXN0ZXJlZCIsIm1rIjoid2Vic29ja2V0IiwibnciOjIyLCJyZiI6Imh0dHA6Ly93d3cuZ29vZ2xlLmNvbS5oay91cmw_c2E9dCIsInJ2IjowLCJwciI6NTc5Miwic3QiOjgyNzcsInpuIjo0NH0&s=DCQixziGflmj3IalRlX2K7eeLjU)
up vote9down vote | Developing a scalable / thread safe TCP server may not be an easy task. On the other hand, there are very nice resources on the internet in order to start your own. For example, if you are just looking for some nice open source WebSocket projects, my advice would be ; Alchemy Project : Open Source C# WebSocket Library Fleck Project : Open Source C# WebSocket Library SignalR could be nice but it needs Windows Server 8 / IIS 8 in order to provide WebSocket feature. On the commercial product side, especially considering the websocket feature is not available on all the browsers, i recommend PokeIn WebSocket and reverse Ajax Library. Starting from version 2.0 it has built-in WebSocket server. Details available from here
|
http://stackoverflow.com/questions/9537641/node-js-socket-io-vs-signalr-vs-c-sharp-websocket-server
相关文章推荐
- TWaver html5 + NodeJS + express + websocket.io + redis 快速搭建项目(三)
- C++ client和node.js server的应用 : socket.io-chat-with-native
- 基于Node.js+socket.IO创建的Web聊天室
- 使用Node.js快速搭建WebSocket server
- [Node.js]29. Level 6: Socket.io: Setting up Socket.io server-side & Client socket.io setup
- 使用Node.js的socket.io模块开发实时web程序
- dotnet调用node.js写的socket服务(websocket/socket/socket.io)
- 使用Node.js的socket.io模块开发实时web程序
- TWaver html5 + NodeJS + express + websocket.io + redis 快速搭建项目(一)
- TWaver html5 + NodeJS + express + websocket.io + redis 快速搭建项目(二)
- NodeJS+Socket.io+ExpressJS实现web聊天应用
- 在web浏览器上显示室内温度(nodeJs+arduino+socket.io)
- node.js+socket.io 实现一个web聊天室
- Node.js+Express+Socket.IO搭建在线聊天室
- 使用Node.js+Socket.IO搭建WebSocket实时应用
- 使用Node.js+Socket.IO搭建WebSocket实时应用
- Node.js 和Socket.IO 实现chat
- node.js中Socket.IO的进阶使用技巧
- 一步一步教您用websocket+nodeJS搭建简易聊天室(1)
- [Docker] Build a Simple Node.js Web Server with Docker