Calendar Live Update notification plugin

Calendar Live Update notification plugin

Hello,

i would like to make a plugin that listens for events triggered by the underlying php application and notify me of the changes. Lets take the following example to clarify:

Imagine person a manages its events calendar which is contributable by more members than this person a. While he manages his events, the calendar is managed by person b too. Both want to add an event for the same date at the same time. While person a was faster, person b should be notified immediately like for example the facebook chat, where one is informed, that the chat partner started to write something.

How would this technically have to be done?

How do PHP and javascript come together?