Ken Kolda
10/5/2004 10:01:00 PM
To me, this isn't an architecture I'd go with. There are a couple of reasons
for this:
1) Because this page is going to be executing for an indefinite period of
time, you will essentially always have one active request per client. The
threading model for IIS/.NET limits you to about 25 active requests per
processor, so you'd have to jack up the thread count for .NET and/or IIS to
something astronomical. THis could cause significant performance issues on
this server.
2) This is more of a philosophical issue, but you're attempting to use the
web server in a manner it wasn't mean to be used, almost as if it were a
connected, client/server application. Because you'll be fighting against the
inherent nature of IIS, the browser, ASP.NET, etc., you're bound to
encounter issues. I generally don't believe in fighting against the
underlying technology.
Web application generally use some form of polling to achieve
"near-real-time" updates from a server. If you want a more connected
solution, I'd recommend using a "smart application" which downloads and runs
on the client. You could then use remoting to achieve what you're after. If
that won't work (e.g. because you have to be cross-platform), you can
consider a Java applet, but even that is not supported natively by all the
browsers and could not leverage .NET remoting.
Good luck -
Ken
"Felipe Garcia" <#> wrote in message
news:ehOInJuqEHA.1988@TK2MSFTNGP09.phx.gbl...
> I've built a system in myjob that does the following:
> We have a page with frames one frame loads the default.aspx and the other
> frame loads the events.aspx.
>
> Inside events.aspx we have a loop that exists while IsClientConnected ==
> true, inside this loop we have a try/catch block, that catches exceptions
of
> type ThreadInterruptedException and inside the Try block we have only a
> Thread.Sleep(SOME_INTERVAL).
>
> When the page events.aspx is started, it connects to the remoting server
and
> register the user. We als have a global variable that references the
> ApplicationState variable, and when the page events.aspx connects to the
> remoting server, it adds the client and a reference to the clients thread
to
> a ClientsCollection variable inside the Application class. This global
> reference to the application state is visible to the remoting server also.
> So every time the ManagementTool, calls a specific client
Thread.Interrupt()
> method, the try/catch block, catches a exception of
> ThreadInterruptedException type, and inside the Catch block we write the
> javascript command that the management tool wrote to the client.
>
> The application is working, but the point is. Our system almost all time
> will have around 300 users online, so we will have 300 loops running and
> interacting with the remoting server. We will use Windows 2003 server, and
> we will use 3 servers. The 1st server will run the IIS that will run the
> site (i mean, the default.aspx and the other site pages) and in the 2nd
> server we will run only the IIS running the events.aspx and the remoting
> server and the 3rd will run the SQL Server.
>
> My question is, is this solution viable to using into an enterprise
solution
> ?
>
> Thanks.
>
> Felipe Garcia
>
>