-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Strategy for dual-mode APIs (REST + gRPC) #1696
Copy link
Copy link
Closed
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the Datastore API.Issues related to the Datastore API.api: loggingIssues related to the Cloud Logging API.Issues related to the Cloud Logging API.api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.Request for information or clarification. Not an issue.
For the APIs which support both REST and gRPC, how should we expose the choice? One option would be to have a different
Connectionclass for each endpoint: if it works, then after instantiating the desired client, calling code would in theory be happy without caring again which one was chosen. Thoughts?Because the
datastoreAPI is protobufs-over-REST, itsConnectionclass already has a bunch of domain-specific API calls already, which would make this plan simpler. theConnectionclasses forpubsubandloggingexpose onlymake_api_request, which won't be much help.