Real-time collaboration¶
Activate¶
The feature is available as soon as the "Real-time collaboration" island is attached to the profile:

Use¶
The island is showing the faces of the users which did a change the last 15 minutes.

If no users, or only the current user, were active the last 15 minutes, the island is not displayed.
The live updates still run while the island is hidden, as long as it is enabled in the profile: each user must see the changes made by others with a 2 seconds delay maximum. Without the island, no stream is opened (IslandInterface::needsSse()).
The loop is executing three checks in this order:
- is there a change? if not, wait 2 seconds and start again
- is it done in another session? if not, wait 2 seconds and start again. Sessions, not users, are compared: the same user in another browser gets the change, and a change made outside the builder (an AI agent, a queue worker, drush, a module calling the instance) is relayed to everyone
- is the change made the last 3 seconds? if not, wait 2 seconds and start again
If all three are OK, a stream is sent with the updated HTML fragments to replace.
Each open Builder holds one PHP worker for as long as its tab stays open. Size the PHP-FPM pool for it before enabling the island on a busy profile.
A change is recorded when the instance is saved: an edit, an undo, a redo, a restore, a revert or a publish. Adding a translation records nothing, as it changes nothing on screen.
Under the hood¶
We use the SSE extension of HTMX with the EventStreamResponse introduced in Symfony 7.3