[Plastic-devs] Temporary files and IDs for loadFromURL
Brought to you by:
johndavidtaylor,
thomasboch
|
From: John T. <jd...@ro...> - 2006-07-14 12:22:15
|
Hi All, We have a slight problem with the current ivo://votech.org/votable/loadFromURL message in that it uses the URL of the file as the table's ID. Here's the problem: The user is running three apps A, B, C. Application A creates a subset and wants to broadcast it to B and C. It does this by creating a temporary file and sending it to B and C. B & C dutifully make their own copies of it. The user then starts application D, and shuts down application A, which clears up its temporary file. How does the user then send the file from B to D and ensure that all three remaining apps think they are referring to the same table? The solution is to adopt the same argument list as ivo://.../votable/load and have a second argument specifying the ID. I suggest we make this second argument optional (but strongly recommended) to avoid breaking existing apps, and if it's missing assume that the id=url as we have now. Is anyone actually implementing ivo://.../votable/load? For symmetry's sake we could also make the id optional for this message, and use the table name if it's missing, but I'd prefer not to given the potential for lack of uniqueness. On the subject of optional arguments. I think it might be a good pattern that any optional args go into a struct tacked on after the mandatory arguments. That way they can be referred to by name rather than position. John -- ------------------------------------------------------------------------ AstroGrid/VOTech & Institute for Astronomy, Edinburgh Skype:johndavidtaylor <skype:johndavidtaylor?chat> ------------------------------------------------------------------------ |