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

Clarifications

The general idea is to distribute everything that happens (user joining, leaving, updates) on all cluster nodes. To limit conflicts, a single node is the reference and other node receive all updates from it. The main node is the cluster leader as provider by the remote observation API.

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 from 651de05 to faf2384 Compare October 21, 2025 06:19
@tmortagne tmortagne force-pushed the feature-realtime-cluster branch from faf2384 to c56ff72 Compare October 23, 2025 07:26
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.

2 participants