What kind of sockets does Stack Overflow use for the realtime reputation updates? Is it something like Netty-Jetty or SignalR? Are they using web sockets implemented in C#?
1 Answer
UPDATE: StackExchange.Netgain is now open source!!
https://github.com/StackExchange/NetGain
We use a custom socket server that we developed in house. It supports every historic + RFC version of the web-sockets api; not just Hixie 76; hixie-76 === hybi-00; hybi-4/5/6/7/8, and hybi-13 === RFC6455. We treat sockets as a value add for those who use modern browsers and don't rely on it to provide all updates to our sites as websockets aren't supported in all browsers at this point.
We developed our own very simple protocol on top of websockets to provide rudimentary updates to question lists and as well as other interactions. We use redis messaging to support a unified messaging bus between all of our socket servers. The server side is a Windows service written in C# and the client side is jQuery.
There was talk of open sourcing our implementation but haven't reached a release yet. I have been very impressed with the load we've been able to handle thus far.
Here's a snapshot of haproxy at the moment:
In case you're wondering - that is 128k simultaneously connected web socket clients all receiving updates via our unified messaging bus.
Note by Marc Gravell♦: if people would be genuinely interested in our releasing this as open source, please let us know. It will take some effort. but isn't impossible.
-
6
We use redis messaging to support a unified messaging bus between all of our socket servers
--- where can you find more information on that particular aspect?– walFeb 20, 2013 at 1:06 -
-
1@ShaWizDowArd we don't actually use service-stack for that; we have a separate library (BookSleeve) that we open-sourced ages ago - the key point in that library is that it is multiplexed, fully async-IO, and async
Task
oriented Feb 20, 2013 at 17:15 -
-
1@MarcGravell genuinely interested, but I would be even more interested in hearing details on it: how you designed it, why redis, which choices you made, how does it work... Mar 1, 2013 at 14:49
-
6Still really interested in the open source idea, any updates? Apr 30, 2015 at 14:50
-
@MarkGravell definitely still interested in hearing more about this! seems like every big site is forgoing websockets in favor or event-based subs (eg facebook's graphQL), so getting this info in the public domain could really help folks learn how to scale them well– Matt KJan 2, 2016 at 1:13
-
-
3We just open sourced our socket server library: github.com/StackExchange/NetGain Jan 26, 2016 at 17:55
-
We need best socket library for .net developer to go more with socket and SignalR comes in picture. But more of SignalR performance issue and not updating overtime i think best example of large Socket used in .net web application is Stack Exchange. Can community provide better Documentation to use this library?? Feb 22, 2016 at 3:08
-
I am large fan of how you have implement sockets and what you have used in back end. And yes an micro ORM Dapper.net that i found more powerful and better performance then all other ORM (Entity Framwork) Feb 22, 2016 at 3:11