How to implement collaborative editing log recording

For instance, when multiple people are editing a document simultaneously, I want to keep track of who added or deleted what. Essentially, I’m aiming to track document changes. Would it be more feasible to achieve this by adding listeners in Python or by intercepting data with WebSockets on the frontend?

Which Approach is More Feasible?

  • Python Listeners (Backend): This is generally a safer and more stable approach if you have access to the Collabora Online backend or are comfortable working with PyUNO. It centralizes the change tracking and makes it easier to secure and store the logs. This approach is preferable in environments where you need control over the document lifecycle or want to ensure integrity.
  • WebSocket Interception (Frontend): This can be simpler to implement in environments where you don’t have backend access or if you want to quickly log changes made by multiple users in real time. However, security and performance concerns could arise in production settings.

Thanks,
Darshan