com.partnersoft.io.net
Class WebGuppyServer
java.lang.Object
com.partnersoft.io.net.WebGuppyServer
- All Implemented Interfaces:
- GuppyConstants
public class WebGuppyServer
- extends java.lang.Object
- implements GuppyConstants
HTTP-based Guppy update server implementation in Java.
Guppy is a simplified implementation of the rsync algorithms. It is
not compatible with the standard rsync.
This is a fairly peculiar usage of the cgi protocol. I am using it
as a way to avoid using a custom socket daemon, however in general
it behaves more like a socket daemon than a standard cgi-bin
program.
We're taking the PUT data (which comes in STDIN), processing it and
sending the results to STDOUT. The PUT data consists of a gzipped,
binary Guppy conversation. The client will ask for directory tree
listings, and provide rsync-style block checksums for files that it
wants to update. This program then returns the needed data to update
those files to match the server copy, again using rsync algorithms.
The result is not ideal; it doesn't seem possible to write to STDOUT
while reading from STDIN, for example; on the client side whenever I
open the input stream it terminates the output stream. I'm not sure
if that's a limitation in HTTP, Java, or somewhere else. To allow
for arbitrarily-sized inputs I spool them off to an tempfile, then
read it back in so I can output while processing.
So, the result is inefficient in time, since it causes a burst of
uploaded data, followed by a burst of downloaded data, with no
overlap to take advantage of full-duplex links. However it should be
fairly efficient in bytes transferred.
- Author:
- Paul Reavis
Copyright 2004 Partner Software, Inc.
| Fields inherited from interface com.partnersoft.io.net.GuppyConstants |
BLOCKSIZE, BUFFERSIZE, GZIP, OP_DIFF_FILE, OP_EOF, OP_EOT, OP_EXISTING_BLOCKS, OP_FILE_DIFFS, OP_FILE_LISTING, OP_LIST_FILES, OP_MD5, OP_MESSAGE, OP_NAMES, OP_NEW_BYTES, OP_NULL |
|
Method Summary |
static void |
main(java.lang.String[] argv)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebGuppyServer
public WebGuppyServer()
main
public static void main(java.lang.String[] argv)