Reputation: 677
I have a scenario where for every request I need to open a file and read it . This file will be mostly small in size. There is a constraint that the node I am on doesnt have database . so data can be stored in files only. Will there be any issues when multiple requests execute parallely on same file ? Are there any alternatives? I am using java and doing file IO using java.
Upvotes: 1
Views: 77
Reputation: 21435
File opening and closing doesn't necessarily lead to performance problems - an OS is usually rather good at it and can open / close thousands of files per second (especially if it is always the same file - the OS will cache it for you)
Upvotes: 1