Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gRPC POC phase 1 #1154

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

gRPC POC phase 1 #1154

wants to merge 2 commits into from

Conversation

stIncMale
Copy link
Member

@stIncMale stIncMale commented Jun 30, 2023

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 stIncMale self-assigned this Jun 30, 2023
@stIncMale stIncMale force-pushed the JAVA-5018 branch 8 times, most recently from 07fb471 to aaffc17 Compare July 5, 2023 17:16
@stIncMale stIncMale changed the title gRPC proof of concept gRPC POC phase 1 Jul 10, 2023
@stIncMale stIncMale force-pushed the JAVA-5018 branch 2 times, most recently from a6b1b5e to 06331f2 Compare July 27, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant