modelcontextprotocol / modelcontextprotocol/java-sdk
Introduce a unified Virtual Threads friendly API
Nessuno ha ancora preso questa issue.
- Lingua principale
- Java
- Stelle
- 3.7k
- Fork
- 1.1k
- Merge medio
- 1g 15h
- PR unite (30g)
- 9
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando le API Sync e Async esistenti e l’attuale gerarchia dei moduli, quindi confronta le relative dipendenze da Reactor e Reactive Streams con la direzione proposta per Java 21+/25+. La issue non fornisce file o test da eseguire; fare progressi significa produrre e discutere un prototipo che soddisfi i requisiti elencati relativi a Virtual Threads, streaming, estensibilità e dipendenze, e raggiunga il consenso della community.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- api, backend-api-design
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100