Well, the title explained a lot. I'm about to make 1 file object (let's called analytic.json), which is contains object like :
{"country":{"indonesia":
[{"uniqueID":'00000000000',"dateVisit":"20170129","visitTimes":17},
{"uniqueID":'00000000001',"dateVisit":"20170129","visitTimes":10}]}}
In this case, I'd like to track visitors. Each visitor known as 1 uniqueID, and each time visitor open a new page the visitTimes will be raised.
The problem I'm concerning about is when it's about > 1000 visitors in one time open any page together, what will be happen?
Each open and rewrite to this file is done with fopen, fwrite, and fclose each time its done. Any way doing this better without using database? Do I need to make a function to queuing those process? And how? A lot question, really appreciate that.