[Xpilot-hacks] The "improved?" client

Juha Lindström juhal at users.sourceforge.net
Fri Feb 13 18:33:12 AST 2004


On Fri, 2004-02-13 at 21:50, Jarrod Miller wrote:
> I was figuring that data would be checksum compared to
> the clients localcached copy, and only different data
> sent. Possibly all the extra bitmaps etc would be
> tarballs in a
> $HOME/.xpilot_data/frank.buckosoft.com.tar.gz style of
> thing.
> I'm not sure how "ng" is handling this right now...are
> the files ALWAYS downloaded by the client when
> connecting? That would seem like quite a bit of
> unnecessary traffic/delay.

Currently the URL to the datafile is transmitted to the client as part
of the map data. The client then checks if it has already downloaded the
data archive (.xpd) specified in the URL. It uses only the name of the
datafile for the check, so if the map author updates the map data he
should change the datafile name e.g. from polybloods-1.0.xpd to
polybloods-1.1.xpd. Some checksum based solution would surely be better
than this. Anyway, if it finds a file with the correct name it won't
download it again.

The datafile contains the images and information about their names and
lengths. The layout is like this:
XPD <n>\n
<image name #1>\n
<image length #1>\n
<image data #1>
...
<image name #n>\n
<image length #n>\n
<image data #n>

The datafile is also compressed using zlib because the images are in ppm
format which is not exactly very compact. If we ever add support for a
better image format (png), the zlib compression should probably be
removed.

I wrote a simple tool that can manipulate (create and extract) those
.xpd datafiles. It is located in the xpilot.sf.net CVS in
xpilot/contrib/mapzip.

> It's really two different ways of getting the job
> done, and the "http" way may be more simple,
> especially to implement. In my concept, it would be
> seamless for the client user (as I think it is now in
> ng, with the "http" way. And for the server
> administrator...well, theyre going to have to do some
> firewall work to get a server up at all arent they?

My vote is on HTTP as it is simple and well known. A simple HTTP server
for serving the datafiles could be included in the xpilot distribution.
Writing one e.g. in python would probably require only a few lines of
code. 

- Juha (aka Baron)

_______________________________________________
Xpilot-hacks mailing list
Xpilot-hacks at nslug.ns.ca
http://nslug.ns.ca/cgi-bin/mailman/listinfo/xpilot-hacks




More information about the Xpilot-hacks mailing list