I’m doing something very similar to this: https://clojurians.slack.com/archives/C015LCR9MHD/p1757700192260519 I'd like my mcp client to start sci sessions and connect back to it with a handle. Has anyone tried something similar? Sci is hosted on a JVM running on aws ecs so not the most trivial to route session requests to the same JVM.
@bhauman curious about your progress on the project. Always look forward to your novelty. I’ve pretty much been building a second brain (todos and all kinds of types).
I didn't try it on AWS but I hacked something basic together that Claude could talk to. Nothing production ready though just for myself to try locally. Claude talks to my local babashka client which sends a post request to another server (in my case localhost, but could also be AWS). Why do you think it is hard to match sessions? You can use cookies or API keys?
I meant matching SCI ctx when I meant session. But I think I have a work around. All my state is immutable given a basis. All my effects in sci are pure and only output what needs to change. So I can simply store the sci source string every time there is a request in a distributed kv store. And fetch it on a different node if the request is asking for a sci session that it doesn't have and simply eval the stored source string till that point.
I see. Maybe as alternative you can use sticky sessions with the load balancer of ecs. Then you can have the SCI context in memory of the correct instance. Disclaimer: I haven't used sticky sessions myself so I don't know how well it works.