Page tree
Skip to end of metadata
Go to start of metadata

Introduction

Since Magnolia 4.4 the Soft Locking module provides EE users with the ability to see in "real-time" who is collaborating on a given page and receive immediate feedback when such page gets updated by some other users. It is no actual JCR lock where a user (thread) holds the lock and prevents others from modifying the node before s/he releases the lock, rather a means to inform everyone collaborating on the same content about what is going on and possibly prevent/warn about possible conflicts.

The module for the Magnolia 4 series was basically injecting a jQuery script into the page polling the server at regular intervals in order to receive the current page status concerning who was working at it, if the page was modified while a user was working/looking at it and by whom. Such info was then used to asynchronously update the UI.

Given Magnolia 5 new architecture and Vaadin-based UI this whole approach has of course to be revisited - a different way of displaying the collaboration information in the UI has to be chosen and a new implementation devised to get such info from the server.

Display collaboration info in M5 UI

M5 comes with built-in support for a whole variety of message types. We need to see if one or more of the available types fit the soft locking use case or if we need to come up with an ad hoc solution.

Getting the collaboration status from the server

Since version 7.1.0 Vaadin features server push, meaning that the server sends data updates to the client when those occur, rather than having the client asking the server periodically for updates. This seems a perfect fit for the soft locking case. See more https://vaadin.com/book/vaadin7/-/page/advanced.push.html 

It is likely that M5 starting from version 5.3 will enable server push by default, thus the soft locking module will just use the feature without having to do anything special on its own to enable it. 

Contra of using a server-push approach

Talked shortly with Sasha and it looks like the server-push is not as straightforward as it seemed. 

Alternatives to server-push

Mockups

Andreas worked on some mockups which are attached to this page. Here are a couple of his remarks about them.

  • we show the state of how many users you're collaborating with in the status bar. A tooltip will reveal more (e.g. the names of the users)
  • any state change (i.e. another user has started editing; another user has saved his or her changes; another user has stopped editing) is announced by notifications, but also leads to the state in the status bar to change slightly (through colors and certainly by increasing the count). You will have to share that space with the status indicating the current publication state. Mikael is working on that currently.We've discussed the visual appearance already somewhat, but I expected to have some time to explore this with the visual designers. I want to avoid having a set of status icons/texts in multiple colors stacking up over time.

Ideas

It would be cool to turn the module into a more comprehensive collaboration tool by

  •  adding a small chat to let users working at the same page talk
  • displaying diff between our own in progress version and that saved by someone else while we were working at it
    • ability to resolve conflicts and do merges?
  • ability to save our own version in a personal drafts folder w/o necessarily having to save our changes by overwriting the last modified page
  • No labels