tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Writing to multiple descriptors with one system call
On Wed, 17 Mar 2010 18:28:21 +0100
Vlad Galu <dudu%dudu.ro@localhost> wrote:
> On Wed, Mar 17, 2010 at 5:22 PM, Sad Clouds
> <cryintothebluesky%googlemail.com@localhost> wrote:
> > On Wed, 17 Mar 2010 16:01:28 +0000
> > Quentin Garnier <cube%cubidou.net@localhost> wrote:
> >
> >> Do you have a real world use for that? For instance, I wouldn't
> >> call a web server that sends the same data to all its clients *at
> >> the same time* realistic.
> >>
> > Why? Because it never happens? I think it happens quite often.
> > Another example is a server that is sending live data, i.e. audio
> > playback, video stream, etc. If you can't use multicasting over a
> > WAN, then you have a situation where you are streaming the same
> > data to large number of clients.
>
> That's almost never practical, since you never fall into the ideal
> case when all clients consume the data at the exact same rate.
>
That's true, but it could still improve overall performance. You need
to keep track of how much data is still outsdanding for which sockets.
As long as you have that data cached in memory (which is true for small
files), you update the data offsets and next time kevent() returns,
write data to sockets from those offsets
Home |
Main Index |
Thread Index |
Old Index