How an abstract (full-featured) long polling server works abstractly

Since you use an event loop as opposed to threads, what does a real server look like?

I know that it uses an event loop, but how do you separate the requests? And how do you stop your server from working very slowly (since, I suppose, it can only push one thing at a time, since it is threadless?)

Some kind of pseudo code would be great.

Forgive my ignorance; of course, if something explains it in a non-basic “it's good enough until you get 1000 visitors”, I would be happy to know about it.

+2
source share
1 answer

, .

COMET - .NET. HttpListener, http- Microsoft CCR -. , . , , . , . CCRs async enumerator pattern , .

. 20000 , IO. ( "" , 30 ), 1-2%. , , , . , .NET , IO, - . , IO, , . IOCP .

+5

Source: https://habr.com/ru/post/1758656/


All Articles