|No such thing as a small change|
Re^2: Mixing sysread() with
by wanna_code_perl (Pilgrim)
|on May 26, 2008 at 23:26 UTC||Need Help??|
Truly, I don't want to re-invent FTP. The key here is that the only channel I can rely on is SSH, and it is going to be way too much overhead to open up separate data channels for each binary object.
Objects vary in size from a few bytes to about 1GB, and there could easily be thousands in a single session.
I guess I could open up one extra data channel when the original connection is initiated, and then use syswrite/read on that, approximately like this:
Then the client transmits the object in a series of syswrite() calls to the separate SSH. The separate process on the server would do sysread() only.
However, I would prefer to in-line it in one channel, to avoid the complexity of the extra connection and extra processes/threads. HTTP transmits a mixture of text and binary data pretty readily through a single socket.