I study Signal-R, and this is what I had in my head all the time.
- How does Signal-R fit into the IIS / ASP.NET life cycle?
- How long do hubs live (I see that they have reconnection semantics)?
- Does IIS Prevent AppDomain from Staying Connected?
As I understand it, IIS is designed to handle request-response scripts. The request goes to IIS, it finds the AppDomain, activates it, and then passes the request to it. And after downtime, turn off AppDomain. If the request takes too long, a timeout exception is thrown.
Now let's imagine that I have another application that transmits information through a TCP socket. I want my javascript clients to receive this information in real time, so I am building a Signal-R web application. I can create a TCP client when the application starts, but what guarantees that IIS will not close all this after a while of inactivity?
I could host the Signal-R application on the window service myself, but then I would have to use a different port, enable the cross-domain, etc. .... Many problems for deployment. But I'm interested in using the ASP.NET MVC application for this, since it seems to me that I am installing a drive wheel on a motorcycle.
Greetings.
vtortola
source share