In my Project Management application, I want to solve a problem when several users are viewing the same task record, and 1 or more of them are updating some of the Tasks data, while others are viewing it.
Here is the script ...
User # 1 views Task No. 1 and User # 2 views Task No. 1
User # 2 is now updating Task No. 1 Description
User # 1 is now viewing the task entry, but his view shows another obsolete Description , since only User # 2 is! Worse, he may want to edit the description on his own, which would completely rewrite the User # 2 Description update.
This is one example of a problem. Just add more users and the problem multiplies!
Ideally, I would like to use something like Sockets or the Pusher.com service to update data for all users as soon as any user updates it. However, this project will run on hundreds of servers and has limited capabilities regarding server requirements, so the question of sockets and even a service like Pusher is out of the question!
Another solution idea is based on what Twitter does. If you are viewing a Twitter page for people and they are creating a new post while you have a page loaded there. It will show a message with a DIV notification to inform you that there are X new messages and you will receive a link to restart the message flow with the latest messages.

I believe that a similar approach could work for my project. If the user does an update for any task data, and other users view this task record. It will display the โNotificationโ message in the โTaskโ modality window, informing the user that the โTaskโ data has been updated and that they should restart the task.
To do this work, I know that there must be some AJAX request made at some interval.
Then, for an AJAX request, you need to compare the timestamp of the last update made in the Task entry and compare it with the time when the user looked at the Task entry, starting to view it or since the last time they restarted the task.
I feel my logic is missing a piece of the puzzle? Is this all right or am I missing something?
Can someone explain how I can do this or say, do I mean correctly?
I know that, in short, I just need to determine if the last modified timestamp of the task was AFTER the other user started viewing the Task. At some point, although I feel that the time for users should also be updated?
UPDATE
I completely forgot that Qaru performs this exact task on questions and answers! When you browse the page on SO and the response is updated, it will display a message notifying you to reload the response and provide a link to reload it. Here is what I want to do!
StackOverflow uses Web sockets for this, but in my application, which is a plugin for various server configurations, I cannot use Sockets. I am trying to achieve a similar result with AJAX. Even if he requested AJAX every 30 seconds to get a given time change and compare it with another, to determine if the user should reload the task data, will work in my case
