I have a business need where basically there’s a resource (in this case, a rich text form builder document encoded in base64) that needs to be edited by multiple people, but at different times.
I need a realtime protocol where users can gain access to the same resource, but the document can only be edited by one user (in one browser tab) at a time, and clients can request to kick out and receive requests to be kicked out and respond to them effectively by either allowing or denying the request to be kicked out coming in realtime from the server.
I have recently started to design out a protocol (sequence of events for protocol, client decisions, server responses, payload data structures, like RTSP) in JS and PHP using the Pusher Channel API (I believe it works via websockets), where users subscribe and receive realtime communication from the server per given resource (in this case, a document). Tabs will be uniquely identified by uuid tokens stored in session storage.
I then thought there already might exist a realtime protocol for this sort of thing. Is there a library or application protocol for requesting to use the same resource and requesting to kick out other users to gain access to a resource, that works in realtime? Ideally, something that I could use in PHP, since the 2 projects I need this for are written in Code Igniter and Laravel.