Menu

Home

Josías

On Demand Loader

Suppose you need to download a document or executable file on demand.

Every time, you need to check if it is updated, and download the latest version.

The idea is simple, suppose you have a helloworld.exe, instead to run as is, use OnDemandLoader...

Command Line Before:
helloworld.exe

Command Line after:
OnDemandLoader.exe helloworld.exe

OnDemandLoader.exe filename

The OnDemandLoader program looks into a remote HTTP server for the filename information:
filename.xml: An XML document describing what download. Ex. helloworld.exe.xml
filename.sig: A file containing a hash signature of the filename. Ex. Helloworld.exe.md5

Rules:
filename is always lowercase.

Requeriments:
HTTP/Web Public Folder

The OnDemandLoader has a cache storage where to put the downloaded file, and where it checks differences against the file signature in order to decide if re-download the file.