modelcontextprotocol / modelcontextprotocol/java-sdk

Introduce a unified Virtual Threads friendly API

オープン
#778 コメント 1 件 リアクション 19 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

enhancement
主要言語
Java
スター
3.7k
フォーク
1.1k
平均マージ
1日 15時間
マージ済み PR(30日)
9

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず既存の Sync API と Async API、および現在のモジュール階層を確認し、次にそれらの Reactor と Reactive Streams への依存関係を、提案されている Java 21+/25+ の方向性と比較します。この issue には実行するファイルやテストはありません。進展とは、一覧にある Virtual Threads、ストリーミング、拡張性、依存関係の要件を満たし、コミュニティの合意に達するプロトタイプを作成して議論することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api, backend-api-design
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
静か
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。