Click here to Skip to main content
15,918,808 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Creating a generic library of web controls Pin
Paddy Boyd21-Apr-08 2:19
Paddy Boyd21-Apr-08 2:19 
QuestionRe: Creating a generic library of web controls Pin
KeziahN21-Apr-08 5:02
KeziahN21-Apr-08 5:02 
GeneralWant to add a webservice in my .net application Pin
indian14321-Apr-08 0:45
indian14321-Apr-08 0:45 
GeneralRe: Want to add a webservice in my .net application Pin
kanavgupta21-Apr-08 20:06
kanavgupta21-Apr-08 20:06 
GeneralRe: Want to add a webservice in my .net application Pin
indian14323-Apr-08 8:01
indian14323-Apr-08 8:01 
Generalupdating problem in gridview Pin
Miss Maheshwari21-Apr-08 0:44
Miss Maheshwari21-Apr-08 0:44 
GeneralRe: updating problem in gridview Pin
eyeseetee21-Apr-08 0:52
eyeseetee21-Apr-08 0:52 
GeneralASP.NET -> Ajax And Comet - Braindump Pin
James Simpson21-Apr-08 0:36
James Simpson21-Apr-08 0:36 
Hey,

Im trying to implement long-lived ajax connections (aka the comet pattern) in a WCF service I have written. The issue is the obvious gobbling up of ASP.NET threads - which would literally limit 1 per connection.

So, ideas started flying around - and the idea of an Async HTTP handler came to light, with the ability to send the processing of the wait loop in the connection to a different thread thus returning the ASP.NET thread back to the pool to process other page requests. THe bottle neck now still lives on whatever I employ to handle the waitloop (probably a custom TCP service, keeping a socket open)

So, I thought some more and wondered if it would be possible to have a Async Handler, that handed off execution to a service say 100 threads in which are typically looping around and these can be used to handle the wait loop for the long lived connection. Now if more than 100 connections exist, I thought about putting more than 1 connection on the same thread, which I think would require a custom TCP server. e.g

Client -> ASP.NET ASync Handler ->
Open Connection To Server Async ->
Send Request -> Async
Wait For Response -> Async

On the service I would use a non blocking socket calls (e.g the IO Completion ports, beginreceive etc..) to accept the connections and send and receive data, and it would put the connection handling the request in some sort of queue that can be handled by one of the 100 threads in the service. If more than 100 connections come in, it would start to reuse the while loops (e.g iterate, test messages for connection 1, iterate, test messages for connection 2... iterate, test messages for connection 3... )

Obviously those 100 threads would be configurable, and I may only need 10, or twenty ...

I am assuming that using sockets I am not consuming a thread until a Begin operation, e.g inbetween they waiting to be resused, which would essentially make the system scalable? And because Im not handling the wait loop in the End operation of the socket call, im not keeping the socket thread open, im handing it of to one of the 100 (or 10, 20) threads in the service which can queue automatically...

Any thoughts? I hope i Have explained myself correctly...

THanks, James

James Simpson
Web Developer
imebgo@hotmail.com

P S - This is what part of the alphabet would look like if Q and R were eliminated
Mitch Hedberg

GeneralRe: ASP.NET -> Ajax And Comet - Braindump Pin
ChrisKo21-Apr-08 6:13
ChrisKo21-Apr-08 6:13 
GeneralRe: ASP.NET -> Ajax And Comet - Braindump Pin
James Simpson21-Apr-08 22:51
James Simpson21-Apr-08 22:51 
Questionhow to send mail using .net with c# Pin
sugunavathysubramanian20-Apr-08 23:57
sugunavathysubramanian20-Apr-08 23:57 
AnswerRe: how to send mail using .net with c# Pin
eyeseetee21-Apr-08 0:33
eyeseetee21-Apr-08 0:33 
GeneralRe: how to send mail using .net with c# Pin
sugunavathysubramanian21-Apr-08 20:19
sugunavathysubramanian21-Apr-08 20:19 
GeneralInvalid postback or callback argument Pin
dabuskol20-Apr-08 23:32
dabuskol20-Apr-08 23:32 
GeneralRe: Invalid postback or callback argument Pin
eyeseetee20-Apr-08 23:44
eyeseetee20-Apr-08 23:44 
QuestionTracking URL of the Opened Window. Pin
kanavgupta20-Apr-08 23:18
kanavgupta20-Apr-08 23:18 
GeneralRe: Tracking URL of the Opened Window. Pin
eyeseetee20-Apr-08 23:46
eyeseetee20-Apr-08 23:46 
GeneralRe: Tracking URL of the Opened Window. Pin
kanavgupta21-Apr-08 3:09
kanavgupta21-Apr-08 3:09 
GeneralRe: Tracking URL of the Opened Window. Pin
eyeseetee21-Apr-08 4:12
eyeseetee21-Apr-08 4:12 
GeneralRe: Tracking URL of the Opened Window. Pin
kanavgupta21-Apr-08 19:50
kanavgupta21-Apr-08 19:50 
Generalajax tab control Pin
Krazy Programmer20-Apr-08 23:07
Krazy Programmer20-Apr-08 23:07 
GeneralRe: ajax tab control Pin
eyeseetee20-Apr-08 23:16
eyeseetee20-Apr-08 23:16 
GeneralRe: ajax tab control Pin
Krazy Programmer20-Apr-08 23:24
Krazy Programmer20-Apr-08 23:24 
Questionfiring event problem .. Plz Help Pin
legend_of_zanado20-Apr-08 22:50
legend_of_zanado20-Apr-08 22:50 
GeneralRe: firing event problem .. Plz Help Pin
eyeseetee20-Apr-08 23:13
eyeseetee20-Apr-08 23:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.