Skip to content

Conversation

@tmortagne
Copy link
Member

@tmortagne tmortagne commented Oct 10, 2025

Jira URL

Changes

Description

  • Remove leftovers from a previous implementation which did not really made sense anymore (mainly around the concept of "connected user")
  • Add the concept of Remote and Local users

xwiki-platform side of things: xwiki/xwiki-platform#4656

TODO:

  • To limit conflicts, a single node should be the reference (for example the cluster leader) and other nodes receive all updates through it.

Clarifications

The general idea is to distribute everything that happens (user joining, leaving, updates) on all cluster nodes.

Screenshots & Video

Executed Tests

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches: no backport (big dangerous refactoring of most of the netflux code)

try {
user.getSession().getBasicRemote().sendText(text);
} catch (IOException e) {
throw new NetfluxException("Faield to send the message [%s] to use [%s]".formatted(text, user), e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo on "Faield" and "use"

* @param user the user to send the message to
* @param text the message to be sent.
* @throws IllegalArgumentException if the text is {@code null}.
* @throws NetfluxException when failing to send the message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small inconsistencies in ending dots (sometimes there's a dot, sometimes there isn't)

import org.xwiki.netflux.internal.user.local.LocalUser;

/**
* {@link UserHandler} implementation for {@link LocalUser}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this javadoc correct? It's the same as LocalUserHandler's.

.getInstance(new DefaultParameterizedType(null, UserHandler.class, user.getClass()));
} catch (ComponentLookupException e) {
throw new NoUserHandlerException(
"Failed to find a UserHandler for type [%s]".formatted(user.getClass()));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing the rethrow of e

@tmortagne tmortagne force-pushed the feature-realtime-cluster branch 5 times, most recently from 7b23e1c to 651de05 Compare October 15, 2025 16:32
@tmortagne tmortagne force-pushed the feature-realtime-cluster branch 7 times, most recently from 4c568b3 to 04a7ae7 Compare October 27, 2025 10:32
@tmortagne tmortagne force-pushed the feature-realtime-cluster branch from 04a7ae7 to ad7f3f1 Compare October 29, 2025 12:18
@tmortagne tmortagne force-pushed the feature-realtime-cluster branch from ad7f3f1 to 1fbe7f8 Compare November 5, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants