Current implementation of HttpServletStreamableServerTransportProvider or HttpServletSseServerTransportProvider needs strict stickyness

未关闭
#499 11 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
java

调研方向

从第 108 行附近的内存会话 Map 开始检查 HttpServletStreamableServerTransportProvider.java,然后检查 HttpServletSseServerTransportProvider 中相同的会话处理方式。比较由 builder 提供的 Map 方案和会话管理接口,并确定在没有严格会话粘性的复制部署中需要哪些操作。完成的标准是两个 servlet transport 都可以通过文档化的扩展点使用共享会话状态。

由索引模型根据 Issue 内容生成。

描述

enhancement feature/session-storage P2

Current implementations are holding mcp sessions into a in memory Map https://github.com/modelcontextprotocol/java-sdk/blob/713ee1add0e29d184224aabdf06d024ef30a2754/mcp/src/main/java/io/modelcontextprotocol/server/transport/HttpServletStreamableServerTransportProvider.java#L108
This make it mandatory to have strict stickyness "a la" browser" in a replicated/high availability environement which doesn't exist for agent (and we cannot rely on llm agents to implement this)
The feature could be

  • first very simple option an option for HttpServletStreamableServerTransportProvider.Builder to have an option to provide the map (then users can use different tools to have some shared Map)
  • create an interface to handle those sessions (with minimum operations such add, get. delete)
主要语言
Java
星标
3.7k
派生
1.1k
平均合并
1 天 15 小时
30 天内合并 PR
9

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelcontextprotocol/java-sdk 的其他 Issue

查看 modelcontextprotocol/java-sdk 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。