Thoughts on fetching data from iRev cgi's (in chunks)

David Bovill david at vaudevillecourt.tv
Sun Apr 11 07:28:19 EDT 2010


What would be the best strategy for fetching a series of pieces of data from
a url call to display the text first and then when ready the images or
larger binary data?

What I'd (naively) like to do is:

   1. Call the cgi  - possibly without using load url
   2. The CGI returns the text data
   3. After returning the text data the cgi goes and fetches the binary data
   - say a dozen or so images and stores them on the server
   4. Another call to the cgi (or a related cgi) returns the binary data if
   it has been loaded or "still loading" if it has not fetched all the images
   yet. (could be a load url call and only return the image data)

At the moment I've been looping through the images and using load url call
for each one - the logic on the client side gets quite messy on the client
side and there are often hunreds of url calls going off everywhere, also
there are cases where I'd like the server to do the asynch work, and not the
client. Does anyone have any thoughts on a good strategy for incrementally
fetching web data like this down to the client? Some fuzzy questions:

   1. Is it possible to get a cgi to return data first and still go on and
   do work afterwords (like fetch and cache the images on the server)
   2. Any possible uses of Cron jobs here - has anyone scripted cron jobs
   from Rev?
   3. What sort of things have people done with delayed action calls in iRev
   - is ti possible to use send in time or the equivalents?



More information about the use-livecode mailing list