mongo-java-driver
mongo-java-driver copied to clipboard
gRPC POC phase 1
Java5018.java contains a smoke test and instructions on how to set up and start atlasproxy. The core code where we integrate with Java gRPC is in the following classes:
-
SharingGrpcStreamFactoryFactory.Channels -
GrpcStream
Limitations
- Only synchronous API is implemented.
- No mechanism is implemented to detect in the following places whether gRPC is being used. Consequently, some tests fail, and this codebase should not be used without gRPC if performance matters.
2.1.
QueryBatchCursorandAsyncQueryBatchCursoralways pin the connection that was used to create the corresponding server cursor. 2.2.TransactionContext.isConnectionPinningRequiredalways returnstrue. 2.3.com.mongodb.client.internal/com.mongodb.reactivestreams.client.internal.ClientSessionBinding.isConnectionSourcePinningRequiredalways returnstrue. - While an attempt to support TLS was made, there is no way to test it because atlasproxy does not currently support gRPC with TLS.
- Authentication over gRPC is not implemented because atlasproxy does not support it.
- Closing a
MongoClientdoes not release Java gRPC channels it created. Consequently, this codebase should not be used if manyMongoClientinstances are created and closed.
JAVA-5018