Ask HN: Desktop push notifications

1 points by xandroid4net ↗ HN
I have been looking to implement a private desktop push notification system. I have used signalR for a proof of concept, but I have read about long lived socket connections. Can anyone point me to resources on how to build such a notification system? I don't think signalR will scale, but the biggest problem is IIS app pool recycles and I loose all my connections.

3 comments

[ 2.7 ms ] story [ 17.8 ms ] thread
If using .net stack, why not self-host signalR in OWIN + windows service instead of IIS?

Although, you did not specify the type of traffic. So not sure if you'll have scaling issues. I've used SignalR as a self-hosted service for couple of in-house applications and it worked fine. Usually about 10-20 concurrent connections.

I don't know much about windows services vs web applications. I will look into it thanks! Right now the traffic is minimal less than 10 connections, but it is an iot project so I want to know how to handle this at scale if the product catches on. It likely wont catch on but I would still like to know how to scale anyway to thousands of connections if not tens of thousands.
Window services are easy to build these days. There are quite a few excellent libraries that can make building a windows service very easy. Look at TopShelf. It's one of the best and one of the most popular libaries out there. Basically take your existing console app code and just drop it into a few methods. Easy to debug as well, since you can the same windows service as a console app while debugging.

Once you build out your service, it will act as a SignalR backend that will then communicate to a Signalr client code in a browser.

You can use .NET core to make all the above run cross-platform. In your case, for IOT devices powered by things like the RaspberryPi.