modelcontextprotocol / modelcontextprotocol/java-sdk
Introduce a unified Virtual Threads friendly API
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Java
- Sterne
- 3.7k
- Forks
- 1.1k
- Ø Merge
- 1 T. 15 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
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
SyncorAsyncprefix - 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.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Überprüfung der bestehenden Sync- und Async-APIs sowie der aktuellen Modulhierarchie und vergleiche anschließend deren Reactor- und Reactive-Streams-Abhängigkeiten mit der vorgeschlagenen Java-21+/25+-Ausrichtung. Das Issue stellt keine Dateien oder Tests zum Ausführen bereit; Fortschritt bedeutet, einen Prototypen zu erstellen und zu diskutieren, der die aufgeführten Anforderungen an Virtual Threads, Streaming, Erweiterbarkeit und Abhängigkeiten erfüllt und einen Konsens der Community erreicht.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api, backend-api-design
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Ruhig
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100