Skip to content

Conversation

@ljnelson
Copy link
Member

@ljnelson ljnelson commented Oct 27, 2025

Web Client Discovery

Summary

This PR integrates Discovery with Helidon Web Client by introducing a suitable WebClientService implementation (as required for such integrations).

Pull Request

The heart of the pull request is the WebClientDiscovery interface (an extension of the WebClientService interface) and the DefaultWebClientDiscovery class that implements it. All other .java files are boilerplate or scaffolding related to the required usage of Helidon Builder.

The full specification of this integration can be found in the documentation of the WebClientDiscovery#handle(io.helidon.webclient.spi.WebClientService.Chain, io.helidon.webclient.api.WebClientServiceRequest) method.

Documentation

Documentation included in this pull request consists of:

  • Full javadoc (class and method specifications)
  • Style- and length-compatible additions to webclient.adoc
  • A new section in discovery.adoc

Thanks in particular to @tjquinno, @romain-grecourt and @barchetta for their collective design and documentation help.

Requirements

  • Discovery is opt-in, not out-out, so Web Client Discovery must be opt-in as well.

  • Discovery itself can be disabled, and WebClientServiceProvider implementations can be disabled. When either is disabled, the implementation must continue by using any supplied URIs "as is".

  • Discovery must not prevent requests from completing, even in the face of errors, so Web Client Discovery must not either.

  • It must be easy to see (in configuration, etc.) which Web Client requests are subject to discovery, and which are not.

  • Given a WebClientServiceRequest, the implementation must be able to retrieve or infer a discovery name and a default URI from its contents.

  • Given a UriInfo, the implementation must have a deterministic algorithm for combining path information that is part of the discovered URI returned by discovery, path information that is part of the default URI submitted as part of discovery, and remaining path information that is part of the UriInfo that is not part of either.

Invariants and Constraints

Sample Javadoc

io.helidon.webclient.discovery.WebClientDiscovery

Javadoc HTML pages are not capturable by full-screen screenshot tools. Screenshots are accordingly paged below.

Page 1

io.helidon.webclient.discovery.WebClientDiscovery Page 1

Page 2

io.helidon.webclient.discovery.WebClientDiscovery Page 2

Page 3

io.helidon.webclient.discovery.WebClientDiscovery Page 3

Page 4

io.helidon.webclient.discovery.WebClientDiscovery Page 4

@ljnelson ljnelson self-assigned this Oct 27, 2025
@ljnelson ljnelson added the enhancement New feature or request label Oct 27, 2025
@ljnelson ljnelson added this to Backlog Oct 27, 2025
@ljnelson ljnelson added webclient 4.x Version 4.x labels Oct 27, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 27, 2025
@ljnelson ljnelson moved this to Sprint Scope in Backlog Oct 27, 2025
Copy link
Member

@tjquinno tjquinno left a comment

Choose a reason for hiding this comment

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

A couple possible small changes.

@ljnelson ljnelson requested a review from tjquinno October 28, 2025 18:12
tjquinno
tjquinno previously approved these changes Oct 28, 2025
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

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

The way the webclient discovery is configured seems very complicated to me. I think this deserves more attention. I think we should dedicate some time for it on our weekly meeting

@ljnelson ljnelson force-pushed the 4.x-webclient-discovery branch from 3cb5be0 to 94c1613 Compare November 20, 2025 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.x Version 4.x enhancement New feature or request OCA Verified All contributors have signed the Oracle Contributor Agreement. webclient

Projects

Status: Sprint Scope

Development

Successfully merging this pull request may close these issues.

3 participants