[jsword-devel] HTTP module installer

DM Smith dmsmith555 at yahoo.com
Wed Aug 18 05:28:07 MST 2004


I said that there is a module server. Well not really. It is a module server in that it is a servelet that gets info about modules 
and then serves up a zip file from a directory using page refresh.

Here is the location for the zip files.
ftp://ftp.crosswire.org/pub/sword/packages/rawzip/

Using the zip files has an added benefit of faster downloads.

DM Smith wrote:

> In SwordInstaller there are two ways that ftp is invoked:
> 1) Download a single file.
> 2) Download everything, recursively.
> 
> The second action uses directory listing.
> 
> However these are private/protected, so their use is limited. When 
> looking at the code to determine the limits, it becomes clear that 
> option #2 is called not with a directory name but with a file. So it is 
> equivalent to option 1.
> 
> The Installer interface does not expose a multiple item download.
> 
> So in practice the way it works is that the mods.d.tar.gz is downloaded 
> and each conf is unpacked, read and built into BookMetaData. These are 
> listed to the user, who may pick them for download. From the 
> BookMetaData an installer request for each book is created. The book is 
> a directory containing various files and these are gotten by downloading 
> the directory recursively. But the directory, does not contain 
> sub-directories.
> 
> At another place in the code, these downloaded files are accessed by 
> knowing their name from the BookMetaData. It does not look on disk to 
> determine the file name.
> 
> See below where this can be handy.
> 
> Mark Goodwin wrote:
> 
>> I spent a couple of hours last night looking at the possibility of
>> making an HTTP installer.
>>
>> I plan to put together an initial version that looks at the mods.d.gz
>> file at http://www.crosswire.org/ftpmirror/pub/sword/raw/mods.d.tar.gz
>> (as the FTP installer does at  the moment), then gets a file listing
>> page from http://www.crosswire.org/ftpmirror/pub/sword/packages/rawzip/
>> before parsing out filenames, matching them to module names (where
>> possible) and downloading the module ZIPs.
>>
>> This will work, and should be more reliable than FTP (at least until
>> someone disables directory listings on the webserver), but offends my
>> sense of elegance.  In the long term, I think it would be good to have
>> some kind of module server (I think we've discussed this on list
>> before). Can anyone think of a better short-term option?
> 
> 
> There is a module server:
> http://crosswire.org/sword/servlet/SwordMod.Verify?modName=MAK&pkgType=raw
> This will return a zip file, that can be uncompressed to the expected 
> location.
> 
> And will remove the necessity of a directory listing.
> 
> Using POST rather than GET may also be an option as most servlets allow 
> both.
> 
>>
>> MarkG
>> _______________________________________________
>> jsword-devel mailing list
>> jsword-devel at crosswire.org
>> http://www.crosswire.org/mailman/listinfo/jsword-devel
>>
> 
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel
> 



More information about the jsword-devel mailing list