[sword-devel] Remote Module Repository Wiki

Nic Carter niccarter at mac.com
Fri Nov 5 21:36:51 MST 2010

On 06/11/2010, at 1:53 AM, Karl Kleinpaste wrote:
Jonathan Morgan <jonmmorgan at gmail.com> writes:
>>> You can access http://ftp.xiphos.org/sword/mods.d.tar.gz, crack it open,
>>> and see what's available.  Just two assumptions:
>>> - the zip subdir is at the same level as mods.d
>>> - xyz.conf has a corresponding xyz.zip.
>> Agreed.  I can and have.  I don't expect my average user to, though.
> My point was that a module manager (that is, the InstallManager class)
> can do this readily.  It should be invisible for http+zip retrieval,
> just as it already is for ftp+components retrieval.  It should just
> happen as part of the request for local refresh of the remote content.
> The downside is that, for ftp access today, mods.d.tar.gz is technically
> not required; in its absence, InstallManager will crawl into mods.d and
> find *.conf the hard way.  I don't get warm, fuzzy feelings about the
> possibility of implementing an adequately general and successful parsing
> scheme of directory content via http access.

Actually, I was planning on implementing this for PocketSword in the near future.  The idea was that I was going to move completely away from FTP and only support HTTP.  But given that parsing HTTP is too painful (I initially submitted a patch for HTTP parsing, but it only works for CrossWire and not for the Bible.org nor for the Xiphos repos, and I have no intention of modifying the parsing code even more in order to try to support more web servers!), I was going to download the mods.d.tar.gz file (over HTTP) and use that for module information.  Then download the ZIP of the module over HTTP.  If a repo doesn't have the zip folder (or the mods.d.tar.gz file), then I would either have a fall-back to use the normal InstallManager, or perhaps I'd just say that PocketSword wouldn't support that repo.  But after a year of PocketSword doing things the "right" way, I've decided to take the JSword approach and hope that doesn't cause too many issues...  :(

FYI, my personal tests on an iOS device show that accessing the CrossWire repo via FTP is reasonably slower than accessing it via HTTP.  And that's simply by using the existing InstallManager code (including my HTTP parsing patch) and switching protocols between FTP & HTTP.  And given that PocketSword only runs on iOS devices, I want the reasonably large performance gains that I can gain from simply switching protocols!  :)

Given my lack of free programming hours atm, this isn't going to happen this year.  But it is in the back of my head to implement at some stage in the future.  I also have some other "urgent" fixes to do to PocketSword's downloads mechanism, such as providing background downloading.  I mentioned to David the other day that I'm finishing up my current job at the end of the year in order to resume studying next year, but will have a few weeks of (hopefully!) full-time work on PocketSword in order to try to catch up on some of these "urgent" tasks.

I'm glad this discussion is taking place now, so I can see the resolution of all of this, and that may influence my decision on how I proceed with "improving" PocketSword's download mechanism.

Thanks heaps for all the discussion so far, please keep it coming!
	nic...  :)

More information about the sword-devel mailing list