I'm playing with using FTP to periodically upload small data files from a program to a server. Users access the data from a web page which reads the data with the javascript XMLHttpRequest function. It all seems to work but I'm struggling with some problems caused by the FTP and XMLHttpRequest getting in each others way. The only idea I've come up with is to retry failed uploads and detecting either failed XMLHttpRequests or those that return incomplete data and retrying those.
I'd like to use something simple like FTP since users of the application will probably not be able to host servers (they are likely behind NAT routers and have no fixed IP numbers) and not have access to any fancy external servers.
Anyone have any suggestions?