I will not try to compare any frameworks but would share my own experience with the frameworks. I did some research when I was trying to develop a chat app, and so the following are what I found.
Go with Node.js, and consider using Socket.io library.
Socket.IO[
^] is the library that allows you to utilize the power of web sockets and allows you to send push messages to the clients. This library is really light-weight.
I personally was developing an on-demand chat application using these two, and trust me, it is the easiest and simplest way to developed a chat application including, private rooms, group rooms, and allows you to control how many users are connected. Rest of the stuff is just your own business logic—I added MongoDB at the backend to persiste the chat messages and history. Passport, and other stuff can be added as well. But I leave that all to you.
For a quick demo, please check out their page,
Socket.IO — Chat | Socket.IO[
^], the server is merely,
var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);
app.get('/', function(req, res){
res.sendFile(__dirname + '/index.html');
});
io.on('connection', function(socket){
console.log('a user connected');
});
http.listen(3000, function(){
console.log('listening on *:3000');
});
And the web page, would be having,
<script src="/socket.io/socket.io.js"></script>
<script src="https://code.jquery.com/jquery-1.11.1.js"></script>
<script>
$(function () {
var socket = io();
$('form').submit(function(){
socket.emit('chat message', $('#m').val());
$('#m').val('');
return false;
});
});
</script>
You can add your own controls and elements, but you get the point. Socket.io API and the references are also quick and easy to find, you will be in a good company.
Socket.IO — Docs | Socket.IO[
^]
Apart from this, I would have also suggested SignalR but .NET or C# was not in the tags, anyways you can check that too,
Introduction to ASP.NET Core SignalR | Microsoft Docs[
^]