-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: AI/ML
Context
When I originally created ASyncMongoDBSaver, the workings of LangGraph were pretty obscure to me so I simply followed the pattern used in the reference implementations of SQLite and PostGreSQL. All worked fine, but the there isn't wasn't any particular concurrency added by its implementation. Nor was there in the reference implementations.
It only became clear that there could be an issue when I tried to integrate the ASync LangGraph Checkpointer with the LangChain vector store: MongoDBAtlasVectorSearch. There, our async solution used a synchronous client with langchain_core.runnables.run_in_executor. Combining the two proved a nightmare. So, it seems worthwhile to extend the synchronous checkpointer MongoDBSaver to include the asynchronous methods and simply use langchain_core.runnables.run_in_executor throughout.
Definition of done
Implement the async methods in langgraph.checkpoint.base.BaseCheckpointSaver. Test for equivalency between these and ASyncMongoDBSaver.
What must be done to consider the task complete?
Pitfalls
What should the implementer watch out for? What are the risks?
Probably add guidance about what to use when.