need help on files

G

Guest

Hi,

I need some info on text and xml files......

How many users can simultaneously read a text or xml file...

I've a web appliaction which needs to access a text file and a xml file..

The current users of the system are around 1000 people...

Can 500 amongst them read those files simultaneously??
Does it affect the performance of teh applcation in any ways.....

Help required on the above query...
 
L

Laurent Bugnion

Hi,
Hi,

I need some info on text and xml files......

How many users can simultaneously read a text or xml file...

I've a web appliaction which needs to access a text file and a xml file..

The current users of the system are around 1000 people...

Can 500 amongst them read those files simultaneously??
Does it affect the performance of teh applcation in any ways.....

Help required on the above query...

Not simultanously, because when you read a file, it is locked by the
operating system until you call the Close method on the stream.

The correct way to handle this is to lock the file using the "lock"
statement in C#, so that only one user at the time can open the file,
read it in the program's memory, and then release the file. Once the
file is in the program's memory, the next user can access it.

For help about real time programming, check the "lock" statement in MSDN.

HTH,
Laurent
 
S

Steve C. Orr [MVP, MCSD]

It depends on somewhat by what you mean when you say "read".
For example, millions of users can be reading the contents of the same text
file on their screen simultaneously without any problems because it only
takes a fraction of a second to send it to them and it takes them a long
time to read it on their screen.

If you're talking about programatically reading files simultaneously then
that number drops significantly but it still stays pretty high as long as no
process is trying to write to the file. If many processes are both trying
to read and write to the file then things start to get messy...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top