Comet-like daemon on Windows Server 2008R2 on port 80 when running IIS


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
61 views
The conditions of the problem:

1. There is a server under Windows Server 2008R2 Enterprise.
2. As a "combat" web server there is running IIS 7.0

I want to make so that for a particular IIS website I am forwarding a GET request to /daemon
to a local service (for connection to a socket or something else), and other requests fulfilled independently.

The connection itself should not be closed: the local service will play the role of Comet-like demon, and to give the message stream for a long time.

Moreover, the whole structure has to withstand several thousand simultaneously open sessions to the daemon + to work out the usual requests for static content and server-side logic.

So to bother you have that would not have problems with firewalls and cross-domain security in JavaScript. For the ultimate browser that the request to the daemon, just the web server must be identical — same domain, same port, only the URI is different.

In UNIX-like systems this problem was solved by writing modules for nginx and Apache, but in programming in General and Windows .NET in particular I'm not good unfortunately :(.

You solve such a problem, in principle?
Google suggest NET.TCP Port Sharing (http://msdn.microsoft.com/en-us/library/ms734772.aspx).
If this technology is to solving the problem?

Or maybe there are more simple variants?
by | 61 views

4 Answers

0 like 0 dislike
Write HTTP Handler using ASP.NET. So you can "catch" all requests and determine what to do with them. HTTP Handler work almost as ISAPI Extension, so pretty fast. You also still have full control over the connection.
\r
First link from Google: www.15seconds.com/issue/020417.htm
Of course, MSDN will give more information.
by
0 like 0 dislike
Port sharing — this is one of the more common technologies HTTP API
\r
If you run
netsh http show servicestate
\r
you can see who and what url-s are signed at the moment. If it is at all independent app that can be run at least from the user, even from other services.
But if you want, you can write an ISAPI plugin for IIS.
by
0 like 0 dislike
I would IIS bug bear, and nginx would be handling, IIS-the request to give or that your.
by
0 like 0 dislike
In case someone is interested how the problem was solved:
\r
1) as a cross-the demon had used the script on NodeJS
2) On the Windows platform, the connection from the IIS web server it is forwarding to the daemon using the module IISNode from Tomas Yanchuk, working in Microsoft. The module is free, is updated frequently, the author is adequate and meets in the bug tracker.
\r
Changes in the code daemon "under Windows" — as much as one line.
\r
Your humble servant took active part in testing of the early branches of the module :)
by

Related questions

0 like 0 dislike
6 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
28,140 users