I am using .Net framework 4.5.2 and I will start to make a notification system that send notifications from web application into users that are connected from windows forms desktop application .
after investigations i found that the suitable solution is using signalR as it supports filtering the notification before sending it to the connected clients .
but my concern here is that : when i created my HUB class in the web application , i implemented the method OnConnected that will detect any client who is connected to the server to recieve the notifications , i thought about collecting the connected users in dictionary (in memory) i know it is a solution that couldn't be implemented in the production as this is not reliable to set the connected users in a memory variable (dictionary) . In my case the number of connected users may be 20,000 or over and it may get larger in future . I need to know the best way to track all connected users and at the same time the bets way to handle the concurrent requests without having any scalability issues . I am new in this and i have to make my decision very fast please.
I also need to know in what is the usage of OnReconnect method which can be overidden in the hub class .
I need also to know how to handle the connection to not being lost in case if the iis restarts the internet application for any reason.