On Sat, Jun 03, 2000, Henrik Nordstrom wrote:
[snip]
> Basically the thread I want is:
>
> poll(accept) for client connect
> accept()
> poll(client) for request data
> read()
> connect(server)
> poll(server) for connection
> write(server)
> poll(server) for response
> read(server)
> write(client)
> poll(server) for mor data
> read(server)
> write(client) (buffer full, blocking)
> poll(client)
> write(client) (no more data to send)
> read(server)
> write(client) (again full buffer)
> poll(client)
> write(client)
> read(server) (partial reply only..)
> write(client) (not full buffer this time)
> poll(server)
> read(server)
> write(client)
>
>
> Each poll() statement here is a comm_poll loop roundtrip where a
> multiple of sockets are checked, not only this one. What is important is
> that both the client and server are rarely scheduled for poll() at the
> same time, and no poll() in between the two..
>
> One simple way to make this happen is to have comm_read/write schedule
> for poll() when required, instead of having comm_poll() call
> comm_read/write.
One of the problems I had while planning out a more efficient storage manager
is handling range requests. My opinion for this is that these requests
shouldn't touch the storage manager for server->client data transfers.
What I was working toward was a way that the server can serve data to the
client without going through the storage manager at all.
If data is fed to the client from the server by a suitable callback
mechanism, then the storage manager could slot in between the two in
the case of a cached reply, and not at all in the case of a non-cacheable
reply. This would simplify the storage manager code considerably, and
allow the above to take place in both a poll and event based setup.
Since I have some further ideas about making the code copy-friendly,
I'll continue working this out on paper and post updates on the list.
I'd really appreciate some feedback here ...
Adrian
-- Adrian Chadd Build a man a fire, and he's warm for the <adrian@creative.net.au> rest of the evening. Set a man on fire and he's warm for the rest of his life.Received on Sun Jun 04 2000 - 13:11:05 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:28 MST