mongo-java-driver icon indicating copy to clipboard operation
mongo-java-driver copied to clipboard

gRPC POC phase 1

Open stIncMale opened this issue 2 years ago • 0 comments

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

  1. Only synchronous API is implemented.
  2. 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. QueryBatchCursor and AsyncQueryBatchCursor always pin the connection that was used to create the corresponding server cursor. 2.2. TransactionContext.isConnectionPinningRequired always returns true. 2.3. com.mongodb.client.internal/com.mongodb.reactivestreams.client.internal.ClientSessionBinding.isConnectionSourcePinningRequired always returns true.
  3. While an attempt to support TLS was made, there is no way to test it because atlasproxy does not currently support gRPC with TLS.
  4. Authentication over gRPC is not implemented because atlasproxy does not support it.
  5. Closing a MongoClient does not release Java gRPC channels it created. Consequently, this codebase should not be used if many MongoClient instances are created and closed.

JAVA-5018

stIncMale avatar Jun 30 '23 00:06 stIncMale