Application Level Thread In ASP.NET

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have ASP.NET application served as Live Web Video Viewer. The javascripts pull each frame(image) from IIS, and IIS pulls live image from Video Source through TCP channel. This works fine, but 1) It is slow because of two Pull Methods. 2) The IIS/Video Source have problem to support more than 10 users.

I modified my TCP Server, and use Push method. I tested with a Windows EXE as TCP Client. The performance was great. I then want to implement this to my ASP.NET application

Can I create a application level thread as TCP client in ASP.NET Global.asax file? The thread can run all the time. The thread will buffer live image to application variables which can be shared by all web users.

If the thread failed for some reasons, can I re-start it from each asp.net page

Your advices are helpful

Thanks.
 
Qingdong Z. said:
I have ASP.NET application served as Live Web Video Viewer. The
javascripts pull each frame(image) from IIS, and IIS pulls live image from
Video Source through TCP channel. This works fine, but 1) It is slow because
of two Pull Methods. 2) The IIS/Video Source have problem to support more
than 10 users.
I modified my TCP Server, and use Push method. I tested with a Windows EXE
as TCP Client. The performance was great. I then want to implement this to
my ASP.NET application.
Can I create a application level thread as TCP client in ASP.NET
Global.asax file? The thread can run all the time. The thread will buffer
live image to application variables which can be shared by all web users.
Sure. No problem.
If the thread failed for some reasons, can I re-start it from each asp.net
page?

Easiest thing is to not let it fail. In your thread proc have a try/catch
block and in case of an error, write a log entry, wait a bit and retry.

David
 
Back
Top