T
Tim_Mac
hi,
i'm generating PDF files from crystal reports in my .Net 1.1 web site, and
saving them to disk for the user to download in their own time.
the format i'm currently using is: FileName_<DateTime.Now.Ticks>.PDF
there is a relatively low level of concurrent users on this site, but i am a
little concerned that two requests could happen within the same tick,
resulting in a filename clash and overwrite. is this possible? the docs
say a tick is 100 nanoseconds, which is a very short time i know. i have a
reasonable understanding of memory and disk access times, and the IIS/.Net
request life cycle, which would tell me that because disks are so relatively
slow, being measured in milliseconds, that IIS couldn't perform two
synchronous writes in the same tick. my nagging doubt is that two
simultaneous requests could run to the point in code where the file names
are calculated within the same tick, and then the disk I/O could be
executed.
i like having the Ticks in the file name because it is somewhat useful to me
that they are sequential. but if it is at all risky then i would change to
using a GUID in the filename.
any ideas? i know this is overkill to be concerned like this but i'm
interested anyway
many thanks in advance
tim mackey
i'm generating PDF files from crystal reports in my .Net 1.1 web site, and
saving them to disk for the user to download in their own time.
the format i'm currently using is: FileName_<DateTime.Now.Ticks>.PDF
there is a relatively low level of concurrent users on this site, but i am a
little concerned that two requests could happen within the same tick,
resulting in a filename clash and overwrite. is this possible? the docs
say a tick is 100 nanoseconds, which is a very short time i know. i have a
reasonable understanding of memory and disk access times, and the IIS/.Net
request life cycle, which would tell me that because disks are so relatively
slow, being measured in milliseconds, that IIS couldn't perform two
synchronous writes in the same tick. my nagging doubt is that two
simultaneous requests could run to the point in code where the file names
are calculated within the same tick, and then the disk I/O could be
executed.
i like having the Ticks in the file name because it is somewhat useful to me
that they are sequential. but if it is at all risky then i would change to
using a GUID in the filename.
any ideas? i know this is overkill to be concerned like this but i'm
interested anyway

many thanks in advance
tim mackey