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

Add support for anonymous in-process servers. #8589

Merged
merged 11 commits into from Oct 25, 2021

Commits on Oct 11, 2021

  1. Add support for anonymous in-process servers.

    Anonymous servers aren't registered statically, meaning they can't be referenced by name.
    Only the InProcessSocketAddress, fetched via Server.getListenSockets()
    can be used to connect to the server.
    
    This is particularly useful for production Android usage of in-process servers,
    where process startup latency is crucial, since a custom name resolver can be
    used to create the server instance on demand without directly impacting
    the startup latency of in-process gRPC clients.
    
    This approach supports a more-standard approach to "OnDeviceServer" referenced in gRFC L73.
    https://github.com/grpc/proposal/blob/master/L73-java-binderchannel.md#ondeviceserver
    markb74 committed Oct 11, 2021
    Copy the full SHA
    babfb2b View commit details
    Browse the repository at this point in the history
  2. Restore overridden forAddress(name, int) method.

    Tests require it.
    markb74 committed Oct 11, 2021
    Copy the full SHA
    28fc525 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    361c9f8 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    df89d02 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2021

  1. Address review comments.

    markb74 committed Oct 14, 2021
    Copy the full SHA
    026113a View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2021

  1. Updates after API review.

    Created a new AnonymousInProcessSocketAddress class which is
    distinct from the existing InProcessSocketAddress.
    
    This simplifies the server builder API since we can have
    forAddress() instead of anonymous(), and removes the need for
    InProcessSocketAddress to handle anonymous servers, which had some
    tricy implications like getName() returning null.
    markb74 committed Oct 21, 2021
    Copy the full SHA
    ad8adb3 View commit details
    Browse the repository at this point in the history
  2. minor fixes

    markb74 committed Oct 21, 2021
    Copy the full SHA
    619902f View commit details
    Browse the repository at this point in the history
  3. fix style issue

    markb74 committed Oct 21, 2021
    Copy the full SHA
    506b46e View commit details
    Browse the repository at this point in the history
  4. fix style issues in tests

    markb74 committed Oct 21, 2021
    Copy the full SHA
    4ac409d View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2021

  1. Address review comments.

    markb74 committed Oct 22, 2021
    Copy the full SHA
    4d5a1e3 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2021

  1. Additional assertions

    markb74 committed Oct 25, 2021
    Copy the full SHA
    fc61151 View commit details
    Browse the repository at this point in the history