modelcontextprotocol / modelcontextprotocol/java-sdk
Introduce a unified Virtual Threads friendly API
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Java
- Star
- 3.7k
- Fork
- 1.1k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 9
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng việc xem xét các API Sync và Async hiện có cùng với hệ phân cấp module hiện tại, sau đó so sánh các dependency của chúng đối với Reactor và Reactive Streams với định hướng Java 21+/25+ được đề xuất. Issue này không cung cấp file hoặc test nào để chạy; tiến độ có nghĩa là xây dựng và thảo luận về một prototype đáp ứng các yêu cầu được liệt kê về Virtual Threads, streaming, khả năng mở rộng và dependency, đồng thời đạt được sự đồng thuận của cộng đồng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java
- Lĩnh vực
- api, backend-api-design
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100