efficient rpc io using vstr
Stefan (metze) Metzmacher
metze at samba.org
Mon Jan 19 13:27:21 GMT 2004
Martin Pool wrote:
> Here's an sketch of the kind of packet buffering using vstr that I
> mentioned to tridge yesterday. More discussion is in the comments.
> A sample input file is here
> I haven't benchmarked it other than running it under strace.
sounds good! This is what I disired in this mail point 1.2)
I have some more ideas in mind which I need to put into code or a
...this hopefully let me abstract the server code a lot more,
here some goals I have in mind:
1.) have a full async protocol stacking
1.1) that means we have a 'service_context' for each listen socket
and attach a 'protocol_ops' struct to it which known the
first protocol on top of tcp.
1.2) for each connection to a 'service' we got an
'connection_context' which holds a read and write buffer for
the connection socket(s)(we'll handle the read and write fd's
seperate because this will us easy allow us to communicate over
the stdin and stdout fd's).
1.3) each subprotocol send's its data directly (this is non-blocking)
to it's parent protocol, till it's in the connection_context's
1.4) the connection_context's write fd event's write_handler will
then send the data to the socket.
Stefan Metzmacher <metze at samba.org> www.samba.org
More information about the samba-technical