Karl Blessing
Programmer
I have a portion of a project, that generates images, into bmp stored on the server, and displays them as gif when passed thru a CGI executable, the problem is, I have recently created the ability for the user to customize the generation of these images (color change, legend location, ranges, etc) , the problem is this, I have thought of this as a possible scenario Although have not opening witnessed this, because its running off a developement server currently.
Everytime a user wants to request a map, for example population data.
the asp chloro.asp given the mapname and such, will generate the image, with the given color data, and other default information, and saves it to the server under /images/bmp.
then the user's viewing HTML will have it point to bmp2gif.exe?... given the bmp name, so that it is returned to the user as a gif (the CGI does something similar to binarywrite, so that the gif is never saved to the server)
now with the new customization feature for presentation, I have all the customized bmp saved to /images/bmp/custom/
now heres the possible problem I could see arise.
What if several users were to generate a customized view of their data for printout, and say 3 different people chose to change the view at about the same time, that would mean that by the time the first 2 people get the image pulled back from the server, it will contain the looks, of the way the 3rd latest person set it as. having it in a /custom folder, would minimize the problem a little more, by not having the default more commonly overwrite.
This is a possible solution I was thinking of, but am unsure.
Rather than the image name always being the same, I could generate a random imagename for that session. Then..
the user can view it based on the random image.
But....
it would fill up the server's harddrive space, so I figured, if it would be possible on global.asa that I could on a Session_End delete the file stored in that person's session.
that way the chances of a conflict would be much less.
Anyone else have any good ideas? Karl Blessing aka kb244{fastHACK}
Everytime a user wants to request a map, for example population data.
the asp chloro.asp given the mapname and such, will generate the image, with the given color data, and other default information, and saves it to the server under /images/bmp.
then the user's viewing HTML will have it point to bmp2gif.exe?... given the bmp name, so that it is returned to the user as a gif (the CGI does something similar to binarywrite, so that the gif is never saved to the server)
now with the new customization feature for presentation, I have all the customized bmp saved to /images/bmp/custom/
now heres the possible problem I could see arise.
What if several users were to generate a customized view of their data for printout, and say 3 different people chose to change the view at about the same time, that would mean that by the time the first 2 people get the image pulled back from the server, it will contain the looks, of the way the 3rd latest person set it as. having it in a /custom folder, would minimize the problem a little more, by not having the default more commonly overwrite.
This is a possible solution I was thinking of, but am unsure.
Rather than the image name always being the same, I could generate a random imagename for that session. Then..
the user can view it based on the random image.
But....
it would fill up the server's harddrive space, so I figured, if it would be possible on global.asa that I could on a Session_End delete the file stored in that person's session.
that way the chances of a conflict would be much less.
Anyone else have any good ideas? Karl Blessing aka kb244{fastHACK}