Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Introduce a unified Virtual Threads friendly API #778

Copy link
Copy link
@sdeleuze

Description

@sdeleuze
Issue body actions

The MCP Java SDK team and myself would like to acknowledge the strong desire to evolve the MCP Java SDK to leverage Virtual Threads as a key building block.

This issue is about introducing a new unified Virtual Threads friendly API with the following characteristics:

  • Natively designed for Virtual Threads both in terms of idiomatic API and implementation
  • Designed with Structured Concurrency in mind but SC will not be required
  • Introduce a new way to expose streaming based features
  • Extensible design that should allow changing the implementation
  • No dependency on Reactor or Reactive Streams
  • No Sync or Async prefix
  • Technically could run on Java 21+ but Java 25+ (latest LTS version without the thread pinning issue) will be the recommended baseline

The Sync and Async API and implementation would remain close to what they are today for now, to not break existing use cases and remain fully compatible with Java 17+, while the new unified API would potentially mean a changed module hierarchy where Project Reactor is not a required dependency.

A prototype of this unified Virtual Threads friendly API, using the Sync API as the starting point but achieving the characteristics shared above, will be shared in this issue or via a related PR and discussed with the community to gather feedback and hopefully reach a consensus.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.