vaadin / collaboration-engine

The simplest way to build real-time collaboration into web apps
https://vaadin.com/collaboration
Other
3 stars 1 forks source link

User colors are not consistent across the cluster #66

Closed heruan closed 1 year ago

heruan commented 2 years ago

Describe the bug Users connecting to app instances on different nodes will most probably see different colors assigned to the same users.

To Reproduce Steps to reproduce the behavior:

  1. Run the application in a cluster
  2. Navigate to a view with a CollaborationAvatarGroup
  3. Navigate to the same view targeting a different node

Expected behavior User colors used in the avatars are consistent in the two nodes.

Versions

MatthewVaadin commented 2 years ago

This could be a good opportunity to introduce a topic for internal use that can store data like the user colors and distribute them across nodes in a cluster.

We already use this pattern with the LicenseHandler so we could either expand the use of that, or incorporate it into a new combined topic.

Note: We need to guard against accidental (or malicious) tampering of the topic. One way we could do this is to prefix all developer-generated topics with something (e.g. '$') and any internal topics either have different prefix or none.