Here you have two subtasks. Uniquely identify a specific visitor (I understand there is no registration). Depending on the details of the task, use cookies or session variables. Write there a unique identifier if the cookie / variable does not exist.
The second subtask is to generate a unique ID. Here, again, depends on the task. As an option - take the current time, Ip visitor and get a hash from these values. The probability of coincidence is small. The second option is to write the correspondence to the database (SQL or file).
If visitors need to know about each other, it is necessary to record information in the database or file (you can still in shared memory, for example)
So that everyone can see the inscription "Filled". You must provide either an update. The simplest: periodic page refresh. Correct - AJAX (what have the options)