By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,795 Members | 1,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,795 IT Pros & Developers. It's quick & easy.

need help on files

P: n/a
AVL
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...
Mar 15 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi,

AVL wrote:
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
Mar 15 '06 #2

P: n/a
Also check out the unlock statement in MSDN
Mar 15 '06 #3

P: n/a
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...

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"AVL" <AV*@discussions.microsoft.com> wrote in message
news:3A**********************************@microsof t.com...
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...

Mar 15 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.