From 57e2047fb57d4cb9bf8024e17bfb0f1fbef224b9 Mon Sep 17 00:00:00 2001 From: Nate Bauernfeind Date: Wed, 5 Jul 2023 13:53:14 -0600 Subject: [PATCH] Create gRPC SessionService#publishFromTicket (#4101) Fixes #4075. Colin pointed out that DnD needs to be able to disable publishing to ScopeTickets for PQ's (which need to have frozen query scopes). This adds a flag that can be set. It highlights that we might need to add authorization hooks for TicketResolver#publish. This is a breaking change for DnD shim as it changes the TicketResolver API to add a callback that can be invoked once the publish is complete. --- .../impl/SessionServiceAuthWiring.java | 27 + .../proto/deephaven/proto/session.grpc.pb.cc | 48 +- .../proto/deephaven/proto/session.grpc.pb.h | 208 +++++++- .../proto/deephaven/proto/session.pb.cc | 461 ++++++++++++++--- .../client/proto/deephaven/proto/session.pb.h | 488 +++++++++++++++++- go/internal/proto/session/session.pb.go | 484 +++++++++++------ go/internal/proto/session/session_grpc.pb.go | 40 ++ .../io/deephaven/client/examples/Ticket.java | 16 + .../deephaven/client/examples/DoPutTable.java | 11 +- java-client/session-examples/build.gradle | 1 + .../io/deephaven/client/examples/Publish.java | 31 ++ .../io/deephaven/client/impl/Session.java | 12 + .../io/deephaven/client/impl/SessionImpl.java | 10 + .../main/proto/deephaven/proto/session.proto | 15 + py/client/pydeephaven/proto/session_pb2.py | 34 +- .../pydeephaven/proto/session_pb2_grpc.py | 36 ++ .../appmode/ApplicationTicketResolver.java | 16 +- .../server/arrow/ArrowFlightUtil.java | 2 +- .../auth/AllowAllAuthorizationProvider.java | 7 +- .../server/auth/AuthorizationProvider.java | 6 +- .../server/console/ScopeTicketResolver.java | 26 +- .../HierarchicalTableServiceGrpcImpl.java | 9 +- .../PartitionedTableServiceGrpcImpl.java | 9 +- .../server/session/ExportTicketResolver.java | 28 +- .../NoopTicketResolverAuthorization.java | 22 + .../session/SessionServiceGrpcImpl.java | 34 +- .../server/session/TicketResolver.java | 56 +- .../server/session/TicketResolverBase.java | 37 +- .../server/session/TicketRouter.java | 66 ++- .../test/FlightMessageRoundTripTest.java | 10 +- .../test/TestAuthorizationProvider.java | 28 +- .../proto/session_pb/PublishRequest.java | 206 ++++++++ .../proto/session_pb/PublishResponse.java | 26 + .../session_pb_service/SessionService.java | 45 ++ .../SessionServiceClient.java | 145 ++++++ 35 files changed, 2324 insertions(+), 376 deletions(-) create mode 100644 java-client/session-examples/src/main/java/io/deephaven/client/examples/Publish.java create mode 100644 server/src/main/java/io/deephaven/server/session/NoopTicketResolverAuthorization.java create mode 100644 web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishRequest.java create mode 100644 web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishResponse.java diff --git a/authorization/src/main/java/io/deephaven/auth/codegen/impl/SessionServiceAuthWiring.java b/authorization/src/main/java/io/deephaven/auth/codegen/impl/SessionServiceAuthWiring.java index 447a92fd8ed..52939600d95 100644 --- a/authorization/src/main/java/io/deephaven/auth/codegen/impl/SessionServiceAuthWiring.java +++ b/authorization/src/main/java/io/deephaven/auth/codegen/impl/SessionServiceAuthWiring.java @@ -12,6 +12,7 @@ import io.deephaven.proto.backplane.grpc.ExportNotificationRequest; import io.deephaven.proto.backplane.grpc.ExportRequest; import io.deephaven.proto.backplane.grpc.HandshakeRequest; +import io.deephaven.proto.backplane.grpc.PublishRequest; import io.deephaven.proto.backplane.grpc.ReleaseRequest; import io.deephaven.proto.backplane.grpc.SessionServiceGrpc; import io.deephaven.proto.backplane.grpc.TerminationNotificationRequest; @@ -42,6 +43,8 @@ default ServerServiceDefinition intercept(SessionServiceGrpc.SessionServiceImplB service, "Release", null, this::onMessageReceivedRelease)); serviceBuilder.addMethod(ServiceAuthWiring.intercept( service, "ExportFromTicket", null, this::onMessageReceivedExportFromTicket)); + serviceBuilder.addMethod(ServiceAuthWiring.intercept( + service, "PublishFromTicket", null, this::onMessageReceivedPublishFromTicket)); serviceBuilder.addMethod(ServiceAuthWiring.intercept( service, "ExportNotifications", null, this::onMessageReceivedExportNotifications)); serviceBuilder.addMethod(ServiceAuthWiring.intercept( @@ -95,6 +98,15 @@ default ServerServiceDefinition intercept(SessionServiceGrpc.SessionServiceImplB */ void onMessageReceivedExportFromTicket(AuthContext authContext, ExportRequest request); + /** + * Authorize a request to PublishFromTicket. + * + * @param authContext the authentication context of the request + * @param request the request to authorize + * @throws io.grpc.StatusRuntimeException if the user is not authorized to invoke PublishFromTicket + */ + void onMessageReceivedPublishFromTicket(AuthContext authContext, PublishRequest request); + /** * Authorize a request to ExportNotifications. * @@ -127,6 +139,9 @@ public void onMessageReceivedRelease(AuthContext authContext, ReleaseRequest req public void onMessageReceivedExportFromTicket(AuthContext authContext, ExportRequest request) {} + public void onMessageReceivedPublishFromTicket(AuthContext authContext, + PublishRequest request) {} + public void onMessageReceivedExportNotifications(AuthContext authContext, ExportNotificationRequest request) {} @@ -156,6 +171,11 @@ public void onMessageReceivedExportFromTicket(AuthContext authContext, ExportReq ServiceAuthWiring.operationNotAllowed(); } + public void onMessageReceivedPublishFromTicket(AuthContext authContext, + PublishRequest request) { + ServiceAuthWiring.operationNotAllowed(); + } + public void onMessageReceivedExportNotifications(AuthContext authContext, ExportNotificationRequest request) { ServiceAuthWiring.operationNotAllowed(); @@ -201,6 +221,13 @@ public void onMessageReceivedExportFromTicket(AuthContext authContext, ExportReq } } + public void onMessageReceivedPublishFromTicket(AuthContext authContext, + PublishRequest request) { + if (delegate != null) { + delegate.onMessageReceivedPublishFromTicket(authContext, request); + } + } + public void onMessageReceivedExportNotifications(AuthContext authContext, ExportNotificationRequest request) { if (delegate != null) { diff --git a/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.cc b/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.cc index 752e55ede75..d46cec5790d 100644 --- a/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.cc +++ b/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.cc @@ -31,6 +31,7 @@ static const char* SessionService_method_names[] = { "/io.deephaven.proto.backplane.grpc.SessionService/CloseSession", "/io.deephaven.proto.backplane.grpc.SessionService/Release", "/io.deephaven.proto.backplane.grpc.SessionService/ExportFromTicket", + "/io.deephaven.proto.backplane.grpc.SessionService/PublishFromTicket", "/io.deephaven.proto.backplane.grpc.SessionService/ExportNotifications", "/io.deephaven.proto.backplane.grpc.SessionService/TerminationNotification", }; @@ -47,8 +48,9 @@ SessionService::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& cha , rpcmethod_CloseSession_(SessionService_method_names[2], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_Release_(SessionService_method_names[3], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) , rpcmethod_ExportFromTicket_(SessionService_method_names[4], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) - , rpcmethod_ExportNotifications_(SessionService_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) - , rpcmethod_TerminationNotification_(SessionService_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_PublishFromTicket_(SessionService_method_names[5], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) + , rpcmethod_ExportNotifications_(SessionService_method_names[6], options.suffix_for_stats(),::grpc::internal::RpcMethod::SERVER_STREAMING, channel) + , rpcmethod_TerminationNotification_(SessionService_method_names[7], options.suffix_for_stats(),::grpc::internal::RpcMethod::NORMAL_RPC, channel) {} ::grpc::Status SessionService::Stub::NewSession(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::HandshakeRequest& request, ::io::deephaven::proto::backplane::grpc::HandshakeResponse* response) { @@ -166,6 +168,29 @@ ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::Expo return result; } +::grpc::Status SessionService::Stub::PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response) { + return ::grpc::internal::BlockingUnaryCall< ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_PublishFromTicket_, context, request, response); +} + +void SessionService::Stub::async::PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response, std::function f) { + ::grpc::internal::CallbackUnaryCall< ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PublishFromTicket_, context, request, response, std::move(f)); +} + +void SessionService::Stub::async::PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response, ::grpc::ClientUnaryReactor* reactor) { + ::grpc::internal::ClientCallbackUnaryFactory::Create< ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_PublishFromTicket_, context, request, response, reactor); +} + +::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>* SessionService::Stub::PrepareAsyncPublishFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create< ::io::deephaven::proto::backplane::grpc::PublishResponse, ::io::deephaven::proto::backplane::grpc::PublishRequest, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_PublishFromTicket_, context, request); +} + +::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>* SessionService::Stub::AsyncPublishFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) { + auto* result = + this->PrepareAsyncPublishFromTicketRaw(context, request, cq); + result->StartCall(); + return result; +} + ::grpc::ClientReader< ::io::deephaven::proto::backplane::grpc::ExportNotification>* SessionService::Stub::ExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request) { return ::grpc::internal::ClientReaderFactory< ::io::deephaven::proto::backplane::grpc::ExportNotification>::Create(channel_.get(), rpcmethod_ExportNotifications_, context, request); } @@ -258,6 +283,16 @@ SessionService::Service::Service() { }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( SessionService_method_names[5], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler< SessionService::Service, ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( + [](SessionService::Service* service, + ::grpc::ServerContext* ctx, + const ::io::deephaven::proto::backplane::grpc::PublishRequest* req, + ::io::deephaven::proto::backplane::grpc::PublishResponse* resp) { + return service->PublishFromTicket(ctx, req, resp); + }, this))); + AddMethod(new ::grpc::internal::RpcServiceMethod( + SessionService_method_names[6], ::grpc::internal::RpcMethod::SERVER_STREAMING, new ::grpc::internal::ServerStreamingHandler< SessionService::Service, ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest, ::io::deephaven::proto::backplane::grpc::ExportNotification>( [](SessionService::Service* service, @@ -267,7 +302,7 @@ SessionService::Service::Service() { return service->ExportNotifications(ctx, req, writer); }, this))); AddMethod(new ::grpc::internal::RpcServiceMethod( - SessionService_method_names[6], + SessionService_method_names[7], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler< SessionService::Service, ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>( [](SessionService::Service* service, @@ -316,6 +351,13 @@ ::grpc::Status SessionService::Service::ExportFromTicket(::grpc::ServerContext* return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } +::grpc::Status SessionService::Service::PublishFromTicket(::grpc::ServerContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response) { + (void) context; + (void) request; + (void) response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + ::grpc::Status SessionService::Service::ExportNotifications(::grpc::ServerContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest* request, ::grpc::ServerWriter< ::io::deephaven::proto::backplane::grpc::ExportNotification>* writer) { (void) context; (void) request; diff --git a/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.h b/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.h index 17959c6bdc9..0a719cc929b 100644 --- a/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.h +++ b/cpp-client/deephaven/client/proto/deephaven/proto/session.grpc.pb.h @@ -113,6 +113,16 @@ class SessionService final { return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::ExportResponse>>(PrepareAsyncExportFromTicketRaw(context, request, cq)); } // + // Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + // ticket, need to be a client managed ticket. + virtual ::grpc::Status PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response) = 0; + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::PublishResponse>> AsyncPublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::PublishResponse>>(AsyncPublishFromTicketRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::PublishResponse>> PrepareAsyncPublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::PublishResponse>>(PrepareAsyncPublishFromTicketRaw(context, request, cq)); + } + // // Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. // // New streams will flush notifications for all un-released exports, prior to seeing any new or updated exports @@ -172,6 +182,11 @@ class SessionService final { virtual void ExportFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest* request, ::io::deephaven::proto::backplane::grpc::ExportResponse* response, std::function) = 0; virtual void ExportFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest* request, ::io::deephaven::proto::backplane::grpc::ExportResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; // + // Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + // ticket, need to be a client managed ticket. + virtual void PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response, std::function) = 0; + virtual void PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // // Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. // // New streams will flush notifications for all un-released exports, prior to seeing any new or updated exports @@ -198,6 +213,8 @@ class SessionService final { virtual ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::ReleaseResponse>* PrepareAsyncReleaseRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ReleaseRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::ExportResponse>* AsyncExportFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::ExportResponse>* PrepareAsyncExportFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::PublishResponse>* AsyncPublishFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< ::io::deephaven::proto::backplane::grpc::PublishResponse>* PrepareAsyncPublishFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientReaderInterface< ::io::deephaven::proto::backplane::grpc::ExportNotification>* ExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request) = 0; virtual ::grpc::ClientAsyncReaderInterface< ::io::deephaven::proto::backplane::grpc::ExportNotification>* AsyncExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0; virtual ::grpc::ClientAsyncReaderInterface< ::io::deephaven::proto::backplane::grpc::ExportNotification>* PrepareAsyncExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request, ::grpc::CompletionQueue* cq) = 0; @@ -242,6 +259,13 @@ class SessionService final { std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::ExportResponse>> PrepareAsyncExportFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest& request, ::grpc::CompletionQueue* cq) { return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::ExportResponse>>(PrepareAsyncExportFromTicketRaw(context, request, cq)); } + ::grpc::Status PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response) override; + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>> AsyncPublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>>(AsyncPublishFromTicketRaw(context, request, cq)); + } + std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>> PrepareAsyncPublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) { + return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>>(PrepareAsyncPublishFromTicketRaw(context, request, cq)); + } std::unique_ptr< ::grpc::ClientReader< ::io::deephaven::proto::backplane::grpc::ExportNotification>> ExportNotifications(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request) { return std::unique_ptr< ::grpc::ClientReader< ::io::deephaven::proto::backplane::grpc::ExportNotification>>(ExportNotificationsRaw(context, request)); } @@ -271,6 +295,8 @@ class SessionService final { void Release(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ReleaseRequest* request, ::io::deephaven::proto::backplane::grpc::ReleaseResponse* response, ::grpc::ClientUnaryReactor* reactor) override; void ExportFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest* request, ::io::deephaven::proto::backplane::grpc::ExportResponse* response, std::function) override; void ExportFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest* request, ::io::deephaven::proto::backplane::grpc::ExportResponse* response, ::grpc::ClientUnaryReactor* reactor) override; + void PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response, std::function) override; + void PublishFromTicket(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response, ::grpc::ClientUnaryReactor* reactor) override; void ExportNotifications(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest* request, ::grpc::ClientReadReactor< ::io::deephaven::proto::backplane::grpc::ExportNotification>* reactor) override; void TerminationNotification(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest* request, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse* response, std::function) override; void TerminationNotification(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest* request, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse* response, ::grpc::ClientUnaryReactor* reactor) override; @@ -295,6 +321,8 @@ class SessionService final { ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::ReleaseResponse>* PrepareAsyncReleaseRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ReleaseRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::ExportResponse>* AsyncExportFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::ExportResponse>* PrepareAsyncExportFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>* AsyncPublishFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader< ::io::deephaven::proto::backplane::grpc::PublishResponse>* PrepareAsyncPublishFromTicketRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientReader< ::io::deephaven::proto::backplane::grpc::ExportNotification>* ExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request) override; ::grpc::ClientAsyncReader< ::io::deephaven::proto::backplane::grpc::ExportNotification>* AsyncExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request, ::grpc::CompletionQueue* cq, void* tag) override; ::grpc::ClientAsyncReader< ::io::deephaven::proto::backplane::grpc::ExportNotification>* PrepareAsyncExportNotificationsRaw(::grpc::ClientContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest& request, ::grpc::CompletionQueue* cq) override; @@ -305,6 +333,7 @@ class SessionService final { const ::grpc::internal::RpcMethod rpcmethod_CloseSession_; const ::grpc::internal::RpcMethod rpcmethod_Release_; const ::grpc::internal::RpcMethod rpcmethod_ExportFromTicket_; + const ::grpc::internal::RpcMethod rpcmethod_PublishFromTicket_; const ::grpc::internal::RpcMethod rpcmethod_ExportNotifications_; const ::grpc::internal::RpcMethod rpcmethod_TerminationNotification_; }; @@ -341,6 +370,10 @@ class SessionService final { // a client managed ticket. virtual ::grpc::Status ExportFromTicket(::grpc::ServerContext* context, const ::io::deephaven::proto::backplane::grpc::ExportRequest* request, ::io::deephaven::proto::backplane::grpc::ExportResponse* response); // + // Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + // ticket, need to be a client managed ticket. + virtual ::grpc::Status PublishFromTicket(::grpc::ServerContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response); + // // Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. // // New streams will flush notifications for all un-released exports, prior to seeing any new or updated exports @@ -453,12 +486,32 @@ class SessionService final { } }; template + class WithAsyncMethod_PublishFromTicket : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithAsyncMethod_PublishFromTicket() { + ::grpc::Service::MarkMethodAsync(5); + } + ~WithAsyncMethod_PublishFromTicket() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PublishFromTicket(::grpc::ServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPublishFromTicket(::grpc::ServerContext* context, ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::grpc::ServerAsyncResponseWriter< ::io::deephaven::proto::backplane::grpc::PublishResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithAsyncMethod_ExportNotifications : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_ExportNotifications() { - ::grpc::Service::MarkMethodAsync(5); + ::grpc::Service::MarkMethodAsync(6); } ~WithAsyncMethod_ExportNotifications() override { BaseClassMustBeDerivedFromService(this); @@ -469,7 +522,7 @@ class SessionService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestExportNotifications(::grpc::ServerContext* context, ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest* request, ::grpc::ServerAsyncWriter< ::io::deephaven::proto::backplane::grpc::ExportNotification>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(5, context, request, writer, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag); } }; template @@ -478,7 +531,7 @@ class SessionService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_TerminationNotification() { - ::grpc::Service::MarkMethodAsync(6); + ::grpc::Service::MarkMethodAsync(7); } ~WithAsyncMethod_TerminationNotification() override { BaseClassMustBeDerivedFromService(this); @@ -489,10 +542,10 @@ class SessionService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestTerminationNotification(::grpc::ServerContext* context, ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest* request, ::grpc::ServerAsyncResponseWriter< ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_NewSession > > > > > > AsyncService; + typedef WithAsyncMethod_NewSession > > > > > > > AsyncService; template class WithCallbackMethod_NewSession : public BaseClass { private: @@ -629,12 +682,39 @@ class SessionService final { ::grpc::CallbackServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::ExportRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::ExportResponse* /*response*/) { return nullptr; } }; template + class WithCallbackMethod_PublishFromTicket : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithCallbackMethod_PublishFromTicket() { + ::grpc::Service::MarkMethodCallback(5, + new ::grpc::internal::CallbackUnaryHandler< ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse>( + [this]( + ::grpc::CallbackServerContext* context, const ::io::deephaven::proto::backplane::grpc::PublishRequest* request, ::io::deephaven::proto::backplane::grpc::PublishResponse* response) { return this->PublishFromTicket(context, request, response); }));} + void SetMessageAllocatorFor_PublishFromTicket( + ::grpc::MessageAllocator< ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse>* allocator) { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5); + static_cast<::grpc::internal::CallbackUnaryHandler< ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_PublishFromTicket() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PublishFromTicket(::grpc::ServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* PublishFromTicket( + ::grpc::CallbackServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) { return nullptr; } + }; + template class WithCallbackMethod_ExportNotifications : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_ExportNotifications() { - ::grpc::Service::MarkMethodCallback(5, + ::grpc::Service::MarkMethodCallback(6, new ::grpc::internal::CallbackServerStreamingHandler< ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest, ::io::deephaven::proto::backplane::grpc::ExportNotification>( [this]( ::grpc::CallbackServerContext* context, const ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest* request) { return this->ExportNotifications(context, request); })); @@ -656,13 +736,13 @@ class SessionService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithCallbackMethod_TerminationNotification() { - ::grpc::Service::MarkMethodCallback(6, + ::grpc::Service::MarkMethodCallback(7, new ::grpc::internal::CallbackUnaryHandler< ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse>( [this]( ::grpc::CallbackServerContext* context, const ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest* request, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse* response) { return this->TerminationNotification(context, request, response); }));} void SetMessageAllocatorFor_TerminationNotification( ::grpc::MessageAllocator< ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse>* allocator) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(6); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(7); static_cast<::grpc::internal::CallbackUnaryHandler< ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse>*>(handler) ->SetMessageAllocator(allocator); } @@ -677,7 +757,7 @@ class SessionService final { virtual ::grpc::ServerUnaryReactor* TerminationNotification( ::grpc::CallbackServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse* /*response*/) { return nullptr; } }; - typedef WithCallbackMethod_NewSession > > > > > > CallbackService; + typedef WithCallbackMethod_NewSession > > > > > > > CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_NewSession : public BaseClass { @@ -765,12 +845,29 @@ class SessionService final { } }; template + class WithGenericMethod_PublishFromTicket : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithGenericMethod_PublishFromTicket() { + ::grpc::Service::MarkMethodGeneric(5); + } + ~WithGenericMethod_PublishFromTicket() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PublishFromTicket(::grpc::ServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template class WithGenericMethod_ExportNotifications : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_ExportNotifications() { - ::grpc::Service::MarkMethodGeneric(5); + ::grpc::Service::MarkMethodGeneric(6); } ~WithGenericMethod_ExportNotifications() override { BaseClassMustBeDerivedFromService(this); @@ -787,7 +884,7 @@ class SessionService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_TerminationNotification() { - ::grpc::Service::MarkMethodGeneric(6); + ::grpc::Service::MarkMethodGeneric(7); } ~WithGenericMethod_TerminationNotification() override { BaseClassMustBeDerivedFromService(this); @@ -899,12 +996,32 @@ class SessionService final { } }; template + class WithRawMethod_PublishFromTicket : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawMethod_PublishFromTicket() { + ::grpc::Service::MarkMethodRaw(5); + } + ~WithRawMethod_PublishFromTicket() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PublishFromTicket(::grpc::ServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestPublishFromTicket(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template class WithRawMethod_ExportNotifications : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_ExportNotifications() { - ::grpc::Service::MarkMethodRaw(5); + ::grpc::Service::MarkMethodRaw(6); } ~WithRawMethod_ExportNotifications() override { BaseClassMustBeDerivedFromService(this); @@ -915,7 +1032,7 @@ class SessionService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestExportNotifications(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncServerStreaming(5, context, request, writer, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag); } }; template @@ -924,7 +1041,7 @@ class SessionService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_TerminationNotification() { - ::grpc::Service::MarkMethodRaw(6); + ::grpc::Service::MarkMethodRaw(7); } ~WithRawMethod_TerminationNotification() override { BaseClassMustBeDerivedFromService(this); @@ -935,7 +1052,7 @@ class SessionService final { return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } void RequestTerminationNotification(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncUnary(6, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(7, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1049,12 +1166,34 @@ class SessionService final { ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } }; template + class WithRawCallbackMethod_PublishFromTicket : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithRawCallbackMethod_PublishFromTicket() { + ::grpc::Service::MarkMethodRawCallback(5, + new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + [this]( + ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->PublishFromTicket(context, request, response); })); + } + ~WithRawCallbackMethod_PublishFromTicket() override { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status PublishFromTicket(::grpc::ServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* PublishFromTicket( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) { return nullptr; } + }; + template class WithRawCallbackMethod_ExportNotifications : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_ExportNotifications() { - ::grpc::Service::MarkMethodRawCallback(5, + ::grpc::Service::MarkMethodRawCallback(6, new ::grpc::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const::grpc::ByteBuffer* request) { return this->ExportNotifications(context, request); })); @@ -1076,7 +1215,7 @@ class SessionService final { void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawCallbackMethod_TerminationNotification() { - ::grpc::Service::MarkMethodRawCallback(6, + ::grpc::Service::MarkMethodRawCallback(7, new ::grpc::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this]( ::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->TerminationNotification(context, request, response); })); @@ -1228,12 +1367,39 @@ class SessionService final { virtual ::grpc::Status StreamedExportFromTicket(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::io::deephaven::proto::backplane::grpc::ExportRequest,::io::deephaven::proto::backplane::grpc::ExportResponse>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_PublishFromTicket : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} + public: + WithStreamedUnaryMethod_PublishFromTicket() { + ::grpc::Service::MarkMethodStreamed(5, + new ::grpc::internal::StreamedUnaryHandler< + ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse>( + [this](::grpc::ServerContext* context, + ::grpc::ServerUnaryStreamer< + ::io::deephaven::proto::backplane::grpc::PublishRequest, ::io::deephaven::proto::backplane::grpc::PublishResponse>* streamer) { + return this->StreamedPublishFromTicket(context, + streamer); + })); + } + ~WithStreamedUnaryMethod_PublishFromTicket() override { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status PublishFromTicket(::grpc::ServerContext* /*context*/, const ::io::deephaven::proto::backplane::grpc::PublishRequest* /*request*/, ::io::deephaven::proto::backplane::grpc::PublishResponse* /*response*/) override { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedPublishFromTicket(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::io::deephaven::proto::backplane::grpc::PublishRequest,::io::deephaven::proto::backplane::grpc::PublishResponse>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_TerminationNotification : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_TerminationNotification() { - ::grpc::Service::MarkMethodStreamed(6, + ::grpc::Service::MarkMethodStreamed(7, new ::grpc::internal::StreamedUnaryHandler< ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest, ::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse>( [this](::grpc::ServerContext* context, @@ -1254,14 +1420,14 @@ class SessionService final { // replace default version of method with streamed unary virtual ::grpc::Status StreamedTerminationNotification(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest,::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_NewSession > > > > > StreamedUnaryService; + typedef WithStreamedUnaryMethod_NewSession > > > > > > StreamedUnaryService; template class WithSplitStreamingMethod_ExportNotifications : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithSplitStreamingMethod_ExportNotifications() { - ::grpc::Service::MarkMethodStreamed(5, + ::grpc::Service::MarkMethodStreamed(6, new ::grpc::internal::SplitServerStreamingHandler< ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest, ::io::deephaven::proto::backplane::grpc::ExportNotification>( [this](::grpc::ServerContext* context, @@ -1283,7 +1449,7 @@ class SessionService final { virtual ::grpc::Status StreamedExportNotifications(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest,::io::deephaven::proto::backplane::grpc::ExportNotification>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_ExportNotifications SplitStreamedService; - typedef WithStreamedUnaryMethod_NewSession > > > > > > StreamedService; + typedef WithStreamedUnaryMethod_NewSession > > > > > > > StreamedService; }; } // namespace grpc diff --git a/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.cc b/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.cc index 15e694b3114..7d866559471 100644 --- a/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.cc +++ b/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.cc @@ -124,6 +124,30 @@ struct ExportResponseDefaultTypeInternal { }; }; PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ExportResponseDefaultTypeInternal _ExportResponse_default_instance_; +PROTOBUF_CONSTEXPR PublishRequest::PublishRequest( + ::_pbi::ConstantInitialized) + : source_id_(nullptr) + , result_id_(nullptr){} +struct PublishRequestDefaultTypeInternal { + PROTOBUF_CONSTEXPR PublishRequestDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PublishRequestDefaultTypeInternal() {} + union { + PublishRequest _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PublishRequestDefaultTypeInternal _PublishRequest_default_instance_; +PROTOBUF_CONSTEXPR PublishResponse::PublishResponse( + ::_pbi::ConstantInitialized){} +struct PublishResponseDefaultTypeInternal { + PROTOBUF_CONSTEXPR PublishResponseDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~PublishResponseDefaultTypeInternal() {} + union { + PublishResponse _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PublishResponseDefaultTypeInternal _PublishResponse_default_instance_; PROTOBUF_CONSTEXPR ExportNotificationRequest::ExportNotificationRequest( ::_pbi::ConstantInitialized){} struct ExportNotificationRequestDefaultTypeInternal { @@ -196,7 +220,7 @@ PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORIT } // namespace proto } // namespace deephaven } // namespace io -static ::_pb::Metadata file_level_metadata_deephaven_2fproto_2fsession_2eproto[13]; +static ::_pb::Metadata file_level_metadata_deephaven_2fproto_2fsession_2eproto[15]; static const ::_pb::EnumDescriptor* file_level_enum_descriptors_deephaven_2fproto_2fsession_2eproto[1]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_deephaven_2fproto_2fsession_2eproto = nullptr; @@ -261,6 +285,20 @@ const uint32_t TableStruct_deephaven_2fproto_2fsession_2eproto::offsets[] PROTOB ~0u, // no _weak_field_map_ ~0u, // no _inlined_string_donated_ ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::io::deephaven::proto::backplane::grpc::PublishRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::io::deephaven::proto::backplane::grpc::PublishRequest, source_id_), + PROTOBUF_FIELD_OFFSET(::io::deephaven::proto::backplane::grpc::PublishRequest, result_id_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::io::deephaven::proto::backplane::grpc::PublishResponse, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::io::deephaven::proto::backplane::grpc::ExportNotificationRequest, _internal_metadata_), ~0u, // no _extensions_ ~0u, // no _oneof_case_ @@ -311,11 +349,13 @@ static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protode { 39, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ReleaseResponse)}, { 45, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ExportRequest)}, { 53, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ExportResponse)}, - { 59, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ExportNotificationRequest)}, - { 65, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ExportNotification)}, - { 75, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest)}, - { 81, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse_StackTrace)}, - { 90, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse)}, + { 59, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::PublishRequest)}, + { 67, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::PublishResponse)}, + { 73, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ExportNotificationRequest)}, + { 79, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::ExportNotification)}, + { 89, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest)}, + { 95, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse_StackTrace)}, + { 104, -1, -1, sizeof(::io::deephaven::proto::backplane::grpc::TerminationNotificationResponse)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -327,6 +367,8 @@ static const ::_pb::Message* const file_default_instances[] = { &::io::deephaven::proto::backplane::grpc::_ReleaseResponse_default_instance_._instance, &::io::deephaven::proto::backplane::grpc::_ExportRequest_default_instance_._instance, &::io::deephaven::proto::backplane::grpc::_ExportResponse_default_instance_._instance, + &::io::deephaven::proto::backplane::grpc::_PublishRequest_default_instance_._instance, + &::io::deephaven::proto::backplane::grpc::_PublishResponse_default_instance_._instance, &::io::deephaven::proto::backplane::grpc::_ExportNotificationRequest_default_instance_._instance, &::io::deephaven::proto::backplane::grpc::_ExportNotification_default_instance_._instance, &::io::deephaven::proto::backplane::grpc::_TerminationNotificationRequest_default_instance_._instance, @@ -352,61 +394,68 @@ const char descriptor_table_protodef_deephaven_2fproto_2fsession_2eproto[] PROTO "io.deephaven.proto.backplane.grpc.Ticket" "\022<\n\tresult_id\030\002 \001(\0132).io.deephaven.proto" ".backplane.grpc.Ticket\"\020\n\016ExportResponse" - "\"\033\n\031ExportNotificationRequest\"\267\003\n\022Export" - "Notification\0229\n\006ticket\030\001 \001(\0132).io.deepha" - "ven.proto.backplane.grpc.Ticket\022Q\n\014expor" - "t_state\030\002 \001(\0162;.io.deephaven.proto.backp" - "lane.grpc.ExportNotification.State\022\017\n\007co" - "ntext\030\003 \001(\t\022\030\n\020dependent_handle\030\004 \001(\t\"\347\001" - "\n\005State\022\013\n\007UNKNOWN\020\000\022\013\n\007PENDING\020\001\022\016\n\nPUB" - "LISHING\020\002\022\n\n\006QUEUED\020\003\022\013\n\007RUNNING\020\004\022\014\n\010EX" - "PORTED\020\005\022\014\n\010RELEASED\020\006\022\r\n\tCANCELLED\020\007\022\n\n" - "\006FAILED\020\010\022\025\n\021DEPENDENCY_FAILED\020\t\022\032\n\026DEPE" - "NDENCY_NEVER_FOUND\020\n\022\030\n\024DEPENDENCY_CANCE" - "LLED\020\013\022\027\n\023DEPENDENCY_RELEASED\020\014\" \n\036Termi" - "nationNotificationRequest\"\227\002\n\037Terminatio" - "nNotificationResponse\022\034\n\024abnormal_termin" - "ation\030\001 \001(\010\022\016\n\006reason\030\002 \001(\t\022\"\n\032is_from_u" - "ncaught_exception\030\003 \001(\010\022c\n\014stack_traces\030" - "\004 \003(\0132M.io.deephaven.proto.backplane.grp" - "c.TerminationNotificationResponse.StackT" - "race\032=\n\nStackTrace\022\014\n\004type\030\001 \001(\t\022\017\n\007mess" - "age\030\002 \001(\t\022\020\n\010elements\030\003 \003(\t2\273\007\n\016SessionS" - "ervice\022|\n\nNewSession\0223.io.deephaven.prot" - "o.backplane.grpc.HandshakeRequest\0324.io.d" - "eephaven.proto.backplane.grpc.HandshakeR" - "esponse\"\003\210\002\001\022\205\001\n\023RefreshSessionToken\0223.i" - "o.deephaven.proto.backplane.grpc.Handsha" - "keRequest\0324.io.deephaven.proto.backplane" - ".grpc.HandshakeResponse\"\003\210\002\001\022~\n\014CloseSes" - "sion\0223.io.deephaven.proto.backplane.grpc" - ".HandshakeRequest\0327.io.deephaven.proto.b" - "ackplane.grpc.CloseSessionResponse\"\000\022r\n\007" - "Release\0221.io.deephaven.proto.backplane.g" - "rpc.ReleaseRequest\0322.io.deephaven.proto." - "backplane.grpc.ReleaseResponse\"\000\022y\n\020Expo" - "rtFromTicket\0220.io.deephaven.proto.backpl" - "ane.grpc.ExportRequest\0321.io.deephaven.pr" - "oto.backplane.grpc.ExportResponse\"\000\022\216\001\n\023" - "ExportNotifications\022<.io.deephaven.proto" - ".backplane.grpc.ExportNotificationReques" - "t\0325.io.deephaven.proto.backplane.grpc.Ex" - "portNotification\"\0000\001\022\242\001\n\027TerminationNoti" - "fication\022A.io.deephaven.proto.backplane." - "grpc.TerminationNotificationRequest\032B.io" - ".deephaven.proto.backplane.grpc.Terminat" - "ionNotificationResponse\"\000BCH\001P\001Z=github." - "com/deephaven/deephaven-core/go/internal" - "/proto/sessionb\006proto3" + "\"\214\001\n\016PublishRequest\022<\n\tsource_id\030\001 \001(\0132)" + ".io.deephaven.proto.backplane.grpc.Ticke" + "t\022<\n\tresult_id\030\002 \001(\0132).io.deephaven.prot" + "o.backplane.grpc.Ticket\"\021\n\017PublishRespon" + "se\"\033\n\031ExportNotificationRequest\"\267\003\n\022Expo" + "rtNotification\0229\n\006ticket\030\001 \001(\0132).io.deep" + "haven.proto.backplane.grpc.Ticket\022Q\n\014exp" + "ort_state\030\002 \001(\0162;.io.deephaven.proto.bac" + "kplane.grpc.ExportNotification.State\022\017\n\007" + "context\030\003 \001(\t\022\030\n\020dependent_handle\030\004 \001(\t\"" + "\347\001\n\005State\022\013\n\007UNKNOWN\020\000\022\013\n\007PENDING\020\001\022\016\n\nP" + "UBLISHING\020\002\022\n\n\006QUEUED\020\003\022\013\n\007RUNNING\020\004\022\014\n\010" + "EXPORTED\020\005\022\014\n\010RELEASED\020\006\022\r\n\tCANCELLED\020\007\022" + "\n\n\006FAILED\020\010\022\025\n\021DEPENDENCY_FAILED\020\t\022\032\n\026DE" + "PENDENCY_NEVER_FOUND\020\n\022\030\n\024DEPENDENCY_CAN" + "CELLED\020\013\022\027\n\023DEPENDENCY_RELEASED\020\014\" \n\036Ter" + "minationNotificationRequest\"\227\002\n\037Terminat" + "ionNotificationResponse\022\034\n\024abnormal_term" + "ination\030\001 \001(\010\022\016\n\006reason\030\002 \001(\t\022\"\n\032is_from" + "_uncaught_exception\030\003 \001(\010\022c\n\014stack_trace" + "s\030\004 \003(\0132M.io.deephaven.proto.backplane.g" + "rpc.TerminationNotificationResponse.Stac" + "kTrace\032=\n\nStackTrace\022\014\n\004type\030\001 \001(\t\022\017\n\007me" + "ssage\030\002 \001(\t\022\020\n\010elements\030\003 \003(\t2\271\010\n\016Sessio" + "nService\022|\n\nNewSession\0223.io.deephaven.pr" + "oto.backplane.grpc.HandshakeRequest\0324.io" + ".deephaven.proto.backplane.grpc.Handshak" + "eResponse\"\003\210\002\001\022\205\001\n\023RefreshSessionToken\0223" + ".io.deephaven.proto.backplane.grpc.Hands" + "hakeRequest\0324.io.deephaven.proto.backpla" + "ne.grpc.HandshakeResponse\"\003\210\002\001\022~\n\014CloseS" + "ession\0223.io.deephaven.proto.backplane.gr" + "pc.HandshakeRequest\0327.io.deephaven.proto" + ".backplane.grpc.CloseSessionResponse\"\000\022r" + "\n\007Release\0221.io.deephaven.proto.backplane" + ".grpc.ReleaseRequest\0322.io.deephaven.prot" + "o.backplane.grpc.ReleaseResponse\"\000\022y\n\020Ex" + "portFromTicket\0220.io.deephaven.proto.back" + "plane.grpc.ExportRequest\0321.io.deephaven." + "proto.backplane.grpc.ExportResponse\"\000\022|\n" + "\021PublishFromTicket\0221.io.deephaven.proto." + "backplane.grpc.PublishRequest\0322.io.deeph" + "aven.proto.backplane.grpc.PublishRespons" + "e\"\000\022\216\001\n\023ExportNotifications\022<.io.deephav" + "en.proto.backplane.grpc.ExportNotificati" + "onRequest\0325.io.deephaven.proto.backplane" + ".grpc.ExportNotification\"\0000\001\022\242\001\n\027Termina" + "tionNotification\022A.io.deephaven.proto.ba" + "ckplane.grpc.TerminationNotificationRequ" + "est\032B.io.deephaven.proto.backplane.grpc." + "TerminationNotificationResponse\"\000BCH\001P\001Z" + "=github.com/deephaven/deephaven-core/go/" + "internal/proto/sessionb\006proto3" ; static const ::_pbi::DescriptorTable* const descriptor_table_deephaven_2fproto_2fsession_2eproto_deps[1] = { &::descriptor_table_deephaven_2fproto_2fticket_2eproto, }; static ::_pbi::once_flag descriptor_table_deephaven_2fproto_2fsession_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_deephaven_2fproto_2fsession_2eproto = { - false, false, 2502, descriptor_table_protodef_deephaven_2fproto_2fsession_2eproto, + false, false, 2790, descriptor_table_protodef_deephaven_2fproto_2fsession_2eproto, "deephaven/proto/session.proto", - &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, descriptor_table_deephaven_2fproto_2fsession_2eproto_deps, 1, 13, + &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, descriptor_table_deephaven_2fproto_2fsession_2eproto_deps, 1, 15, schemas, file_default_instances, TableStruct_deephaven_2fproto_2fsession_2eproto::offsets, file_level_metadata_deephaven_2fproto_2fsession_2eproto, file_level_enum_descriptors_deephaven_2fproto_2fsession_2eproto, file_level_service_descriptors_deephaven_2fproto_2fsession_2eproto, @@ -1772,6 +1821,292 @@ ::PROTOBUF_NAMESPACE_ID::Metadata ExportResponse::GetMetadata() const { // =================================================================== +class PublishRequest::_Internal { + public: + static const ::io::deephaven::proto::backplane::grpc::Ticket& source_id(const PublishRequest* msg); + static const ::io::deephaven::proto::backplane::grpc::Ticket& result_id(const PublishRequest* msg); +}; + +const ::io::deephaven::proto::backplane::grpc::Ticket& +PublishRequest::_Internal::source_id(const PublishRequest* msg) { + return *msg->source_id_; +} +const ::io::deephaven::proto::backplane::grpc::Ticket& +PublishRequest::_Internal::result_id(const PublishRequest* msg) { + return *msg->result_id_; +} +void PublishRequest::clear_source_id() { + if (GetArenaForAllocation() == nullptr && source_id_ != nullptr) { + delete source_id_; + } + source_id_ = nullptr; +} +void PublishRequest::clear_result_id() { + if (GetArenaForAllocation() == nullptr && result_id_ != nullptr) { + delete result_id_; + } + result_id_ = nullptr; +} +PublishRequest::PublishRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:io.deephaven.proto.backplane.grpc.PublishRequest) +} +PublishRequest::PublishRequest(const PublishRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_source_id()) { + source_id_ = new ::io::deephaven::proto::backplane::grpc::Ticket(*from.source_id_); + } else { + source_id_ = nullptr; + } + if (from._internal_has_result_id()) { + result_id_ = new ::io::deephaven::proto::backplane::grpc::Ticket(*from.result_id_); + } else { + result_id_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:io.deephaven.proto.backplane.grpc.PublishRequest) +} + +inline void PublishRequest::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&source_id_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&result_id_) - + reinterpret_cast(&source_id_)) + sizeof(result_id_)); +} + +PublishRequest::~PublishRequest() { + // @@protoc_insertion_point(destructor:io.deephaven.proto.backplane.grpc.PublishRequest) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void PublishRequest::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete source_id_; + if (this != internal_default_instance()) delete result_id_; +} + +void PublishRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void PublishRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:io.deephaven.proto.backplane.grpc.PublishRequest) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + if (GetArenaForAllocation() == nullptr && source_id_ != nullptr) { + delete source_id_; + } + source_id_ = nullptr; + if (GetArenaForAllocation() == nullptr && result_id_ != nullptr) { + delete result_id_; + } + result_id_ = nullptr; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* PublishRequest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // .io.deephaven.proto.backplane.grpc.Ticket source_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_source_id(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .io.deephaven.proto.backplane.grpc.Ticket result_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_result_id(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* PublishRequest::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:io.deephaven.proto.backplane.grpc.PublishRequest) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // .io.deephaven.proto.backplane.grpc.Ticket source_id = 1; + if (this->_internal_has_source_id()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::source_id(this), + _Internal::source_id(this).GetCachedSize(), target, stream); + } + + // .io.deephaven.proto.backplane.grpc.Ticket result_id = 2; + if (this->_internal_has_result_id()) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::result_id(this), + _Internal::result_id(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:io.deephaven.proto.backplane.grpc.PublishRequest) + return target; +} + +size_t PublishRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:io.deephaven.proto.backplane.grpc.PublishRequest) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // .io.deephaven.proto.backplane.grpc.Ticket source_id = 1; + if (this->_internal_has_source_id()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *source_id_); + } + + // .io.deephaven.proto.backplane.grpc.Ticket result_id = 2; + if (this->_internal_has_result_id()) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *result_id_); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PublishRequest::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + PublishRequest::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PublishRequest::GetClassData() const { return &_class_data_; } + +void PublishRequest::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void PublishRequest::MergeFrom(const PublishRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:io.deephaven.proto.backplane.grpc.PublishRequest) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_source_id()) { + _internal_mutable_source_id()->::io::deephaven::proto::backplane::grpc::Ticket::MergeFrom(from._internal_source_id()); + } + if (from._internal_has_result_id()) { + _internal_mutable_result_id()->::io::deephaven::proto::backplane::grpc::Ticket::MergeFrom(from._internal_result_id()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void PublishRequest::CopyFrom(const PublishRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:io.deephaven.proto.backplane.grpc.PublishRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool PublishRequest::IsInitialized() const { + return true; +} + +void PublishRequest::InternalSwap(PublishRequest* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(PublishRequest, result_id_) + + sizeof(PublishRequest::result_id_) + - PROTOBUF_FIELD_OFFSET(PublishRequest, source_id_)>( + reinterpret_cast(&source_id_), + reinterpret_cast(&other->source_id_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata PublishRequest::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, + file_level_metadata_deephaven_2fproto_2fsession_2eproto[8]); +} + +// =================================================================== + +class PublishResponse::_Internal { + public: +}; + +PublishResponse::PublishResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase(arena, is_message_owned) { + // @@protoc_insertion_point(arena_constructor:io.deephaven.proto.backplane.grpc.PublishResponse) +} +PublishResponse::PublishResponse(const PublishResponse& from) + : ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + // @@protoc_insertion_point(copy_constructor:io.deephaven.proto.backplane.grpc.PublishResponse) +} + + + + + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData PublishResponse::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl, + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl, +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*PublishResponse::GetClassData() const { return &_class_data_; } + + + + + + + +::PROTOBUF_NAMESPACE_ID::Metadata PublishResponse::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, + file_level_metadata_deephaven_2fproto_2fsession_2eproto[9]); +} + +// =================================================================== + class ExportNotificationRequest::_Internal { public: }; @@ -1806,7 +2141,7 @@ const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ExportNotificationRequest::Get ::PROTOBUF_NAMESPACE_ID::Metadata ExportNotificationRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, - file_level_metadata_deephaven_2fproto_2fsession_2eproto[8]); + file_level_metadata_deephaven_2fproto_2fsession_2eproto[10]); } // =================================================================== @@ -2132,7 +2467,7 @@ void ExportNotification::InternalSwap(ExportNotification* other) { ::PROTOBUF_NAMESPACE_ID::Metadata ExportNotification::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, - file_level_metadata_deephaven_2fproto_2fsession_2eproto[9]); + file_level_metadata_deephaven_2fproto_2fsession_2eproto[11]); } // =================================================================== @@ -2171,7 +2506,7 @@ const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TerminationNotificationRequest ::PROTOBUF_NAMESPACE_ID::Metadata TerminationNotificationRequest::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, - file_level_metadata_deephaven_2fproto_2fsession_2eproto[10]); + file_level_metadata_deephaven_2fproto_2fsession_2eproto[12]); } // =================================================================== @@ -2452,7 +2787,7 @@ void TerminationNotificationResponse_StackTrace::InternalSwap(TerminationNotific ::PROTOBUF_NAMESPACE_ID::Metadata TerminationNotificationResponse_StackTrace::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, - file_level_metadata_deephaven_2fproto_2fsession_2eproto[11]); + file_level_metadata_deephaven_2fproto_2fsession_2eproto[13]); } // =================================================================== @@ -2740,7 +3075,7 @@ void TerminationNotificationResponse::InternalSwap(TerminationNotificationRespon ::PROTOBUF_NAMESPACE_ID::Metadata TerminationNotificationResponse::GetMetadata() const { return ::_pbi::AssignDescriptors( &descriptor_table_deephaven_2fproto_2fsession_2eproto_getter, &descriptor_table_deephaven_2fproto_2fsession_2eproto_once, - file_level_metadata_deephaven_2fproto_2fsession_2eproto[12]); + file_level_metadata_deephaven_2fproto_2fsession_2eproto[14]); } // @@protoc_insertion_point(namespace_scope) @@ -2782,6 +3117,14 @@ template<> PROTOBUF_NOINLINE ::io::deephaven::proto::backplane::grpc::ExportResp Arena::CreateMaybeMessage< ::io::deephaven::proto::backplane::grpc::ExportResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::io::deephaven::proto::backplane::grpc::ExportResponse >(arena); } +template<> PROTOBUF_NOINLINE ::io::deephaven::proto::backplane::grpc::PublishRequest* +Arena::CreateMaybeMessage< ::io::deephaven::proto::backplane::grpc::PublishRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::io::deephaven::proto::backplane::grpc::PublishRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::io::deephaven::proto::backplane::grpc::PublishResponse* +Arena::CreateMaybeMessage< ::io::deephaven::proto::backplane::grpc::PublishResponse >(Arena* arena) { + return Arena::CreateMessageInternal< ::io::deephaven::proto::backplane::grpc::PublishResponse >(arena); +} template<> PROTOBUF_NOINLINE ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest* Arena::CreateMaybeMessage< ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest >(Arena* arena) { return Arena::CreateMessageInternal< ::io::deephaven::proto::backplane::grpc::ExportNotificationRequest >(arena); diff --git a/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.h b/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.h index 51dfcde1001..201eda7fe1b 100644 --- a/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.h +++ b/cpp-client/deephaven/client/proto/deephaven/proto/session.pb.h @@ -73,6 +73,12 @@ extern HandshakeRequestDefaultTypeInternal _HandshakeRequest_default_instance_; class HandshakeResponse; struct HandshakeResponseDefaultTypeInternal; extern HandshakeResponseDefaultTypeInternal _HandshakeResponse_default_instance_; +class PublishRequest; +struct PublishRequestDefaultTypeInternal; +extern PublishRequestDefaultTypeInternal _PublishRequest_default_instance_; +class PublishResponse; +struct PublishResponseDefaultTypeInternal; +extern PublishResponseDefaultTypeInternal _PublishResponse_default_instance_; class ReleaseRequest; struct ReleaseRequestDefaultTypeInternal; extern ReleaseRequestDefaultTypeInternal _ReleaseRequest_default_instance_; @@ -104,6 +110,8 @@ template<> ::io::deephaven::proto::backplane::grpc::ExportRequest* Arena::Create template<> ::io::deephaven::proto::backplane::grpc::ExportResponse* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::ExportResponse>(Arena*); template<> ::io::deephaven::proto::backplane::grpc::HandshakeRequest* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::HandshakeRequest>(Arena*); template<> ::io::deephaven::proto::backplane::grpc::HandshakeResponse* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::HandshakeResponse>(Arena*); +template<> ::io::deephaven::proto::backplane::grpc::PublishRequest* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::PublishRequest>(Arena*); +template<> ::io::deephaven::proto::backplane::grpc::PublishResponse* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::PublishResponse>(Arena*); template<> ::io::deephaven::proto::backplane::grpc::ReleaseRequest* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::ReleaseRequest>(Arena*); template<> ::io::deephaven::proto::backplane::grpc::ReleaseResponse* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::ReleaseResponse>(Arena*); template<> ::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest* Arena::CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::TerminationNotificationRequest>(Arena*); @@ -1336,6 +1344,294 @@ class ExportResponse final : }; // ------------------------------------------------------------------- +class PublishRequest final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:io.deephaven.proto.backplane.grpc.PublishRequest) */ { + public: + inline PublishRequest() : PublishRequest(nullptr) {} + ~PublishRequest() override; + explicit PROTOBUF_CONSTEXPR PublishRequest(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PublishRequest(const PublishRequest& from); + PublishRequest(PublishRequest&& from) noexcept + : PublishRequest() { + *this = ::std::move(from); + } + + inline PublishRequest& operator=(const PublishRequest& from) { + CopyFrom(from); + return *this; + } + inline PublishRequest& operator=(PublishRequest&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PublishRequest& default_instance() { + return *internal_default_instance(); + } + static inline const PublishRequest* internal_default_instance() { + return reinterpret_cast( + &_PublishRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(PublishRequest& a, PublishRequest& b) { + a.Swap(&b); + } + inline void Swap(PublishRequest* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PublishRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PublishRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const PublishRequest& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const PublishRequest& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(PublishRequest* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "io.deephaven.proto.backplane.grpc.PublishRequest"; + } + protected: + explicit PublishRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSourceIdFieldNumber = 1, + kResultIdFieldNumber = 2, + }; + // .io.deephaven.proto.backplane.grpc.Ticket source_id = 1; + bool has_source_id() const; + private: + bool _internal_has_source_id() const; + public: + void clear_source_id(); + const ::io::deephaven::proto::backplane::grpc::Ticket& source_id() const; + PROTOBUF_NODISCARD ::io::deephaven::proto::backplane::grpc::Ticket* release_source_id(); + ::io::deephaven::proto::backplane::grpc::Ticket* mutable_source_id(); + void set_allocated_source_id(::io::deephaven::proto::backplane::grpc::Ticket* source_id); + private: + const ::io::deephaven::proto::backplane::grpc::Ticket& _internal_source_id() const; + ::io::deephaven::proto::backplane::grpc::Ticket* _internal_mutable_source_id(); + public: + void unsafe_arena_set_allocated_source_id( + ::io::deephaven::proto::backplane::grpc::Ticket* source_id); + ::io::deephaven::proto::backplane::grpc::Ticket* unsafe_arena_release_source_id(); + + // .io.deephaven.proto.backplane.grpc.Ticket result_id = 2; + bool has_result_id() const; + private: + bool _internal_has_result_id() const; + public: + void clear_result_id(); + const ::io::deephaven::proto::backplane::grpc::Ticket& result_id() const; + PROTOBUF_NODISCARD ::io::deephaven::proto::backplane::grpc::Ticket* release_result_id(); + ::io::deephaven::proto::backplane::grpc::Ticket* mutable_result_id(); + void set_allocated_result_id(::io::deephaven::proto::backplane::grpc::Ticket* result_id); + private: + const ::io::deephaven::proto::backplane::grpc::Ticket& _internal_result_id() const; + ::io::deephaven::proto::backplane::grpc::Ticket* _internal_mutable_result_id(); + public: + void unsafe_arena_set_allocated_result_id( + ::io::deephaven::proto::backplane::grpc::Ticket* result_id); + ::io::deephaven::proto::backplane::grpc::Ticket* unsafe_arena_release_result_id(); + + // @@protoc_insertion_point(class_scope:io.deephaven.proto.backplane.grpc.PublishRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::io::deephaven::proto::backplane::grpc::Ticket* source_id_; + ::io::deephaven::proto::backplane::grpc::Ticket* result_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_deephaven_2fproto_2fsession_2eproto; +}; +// ------------------------------------------------------------------- + +class PublishResponse final : + public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:io.deephaven.proto.backplane.grpc.PublishResponse) */ { + public: + inline PublishResponse() : PublishResponse(nullptr) {} + explicit PROTOBUF_CONSTEXPR PublishResponse(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + PublishResponse(const PublishResponse& from); + PublishResponse(PublishResponse&& from) noexcept + : PublishResponse() { + *this = ::std::move(from); + } + + inline PublishResponse& operator=(const PublishResponse& from) { + CopyFrom(from); + return *this; + } + inline PublishResponse& operator=(PublishResponse&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const PublishResponse& default_instance() { + return *internal_default_instance(); + } + static inline const PublishResponse* internal_default_instance() { + return reinterpret_cast( + &_PublishResponse_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(PublishResponse& a, PublishResponse& b) { + a.Swap(&b); + } + inline void Swap(PublishResponse* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(PublishResponse* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + PublishResponse* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyFrom; + inline void CopyFrom(const PublishResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::CopyImpl(this, from); + } + using ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeFrom; + void MergeFrom(const PublishResponse& from) { + ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase::MergeImpl(this, from); + } + public: + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "io.deephaven.proto.backplane.grpc.PublishResponse"; + } + protected: + explicit PublishResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:io.deephaven.proto.backplane.grpc.PublishResponse) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + friend struct ::TableStruct_deephaven_2fproto_2fsession_2eproto; +}; +// ------------------------------------------------------------------- + class ExportNotificationRequest final : public ::PROTOBUF_NAMESPACE_ID::internal::ZeroFieldsBase /* @@protoc_insertion_point(class_definition:io.deephaven.proto.backplane.grpc.ExportNotificationRequest) */ { public: @@ -1383,7 +1679,7 @@ class ExportNotificationRequest final : &_ExportNotificationRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 8; + 10; friend void swap(ExportNotificationRequest& a, ExportNotificationRequest& b) { a.Swap(&b); @@ -1500,7 +1796,7 @@ class ExportNotification final : &_ExportNotification_default_instance_); } static constexpr int kIndexInFileMessages = - 9; + 11; friend void swap(ExportNotification& a, ExportNotification& b) { a.Swap(&b); @@ -1746,7 +2042,7 @@ class TerminationNotificationRequest final : &_TerminationNotificationRequest_default_instance_); } static constexpr int kIndexInFileMessages = - 10; + 12; friend void swap(TerminationNotificationRequest& a, TerminationNotificationRequest& b) { a.Swap(&b); @@ -1863,7 +2159,7 @@ class TerminationNotificationResponse_StackTrace final : &_TerminationNotificationResponse_StackTrace_default_instance_); } static constexpr int kIndexInFileMessages = - 11; + 13; friend void swap(TerminationNotificationResponse_StackTrace& a, TerminationNotificationResponse_StackTrace& b) { a.Swap(&b); @@ -2053,7 +2349,7 @@ class TerminationNotificationResponse final : &_TerminationNotificationResponse_default_instance_); } static constexpr int kIndexInFileMessages = - 12; + 14; friend void swap(TerminationNotificationResponse& a, TerminationNotificationResponse& b) { a.Swap(&b); @@ -2801,6 +3097,184 @@ inline void ExportRequest::set_allocated_result_id(::io::deephaven::proto::backp // ------------------------------------------------------------------- +// PublishRequest + +// .io.deephaven.proto.backplane.grpc.Ticket source_id = 1; +inline bool PublishRequest::_internal_has_source_id() const { + return this != internal_default_instance() && source_id_ != nullptr; +} +inline bool PublishRequest::has_source_id() const { + return _internal_has_source_id(); +} +inline const ::io::deephaven::proto::backplane::grpc::Ticket& PublishRequest::_internal_source_id() const { + const ::io::deephaven::proto::backplane::grpc::Ticket* p = source_id_; + return p != nullptr ? *p : reinterpret_cast( + ::io::deephaven::proto::backplane::grpc::_Ticket_default_instance_); +} +inline const ::io::deephaven::proto::backplane::grpc::Ticket& PublishRequest::source_id() const { + // @@protoc_insertion_point(field_get:io.deephaven.proto.backplane.grpc.PublishRequest.source_id) + return _internal_source_id(); +} +inline void PublishRequest::unsafe_arena_set_allocated_source_id( + ::io::deephaven::proto::backplane::grpc::Ticket* source_id) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_id_); + } + source_id_ = source_id; + if (source_id) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:io.deephaven.proto.backplane.grpc.PublishRequest.source_id) +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::release_source_id() { + + ::io::deephaven::proto::backplane::grpc::Ticket* temp = source_id_; + source_id_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::unsafe_arena_release_source_id() { + // @@protoc_insertion_point(field_release:io.deephaven.proto.backplane.grpc.PublishRequest.source_id) + + ::io::deephaven::proto::backplane::grpc::Ticket* temp = source_id_; + source_id_ = nullptr; + return temp; +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::_internal_mutable_source_id() { + + if (source_id_ == nullptr) { + auto* p = CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::Ticket>(GetArenaForAllocation()); + source_id_ = p; + } + return source_id_; +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::mutable_source_id() { + ::io::deephaven::proto::backplane::grpc::Ticket* _msg = _internal_mutable_source_id(); + // @@protoc_insertion_point(field_mutable:io.deephaven.proto.backplane.grpc.PublishRequest.source_id) + return _msg; +} +inline void PublishRequest::set_allocated_source_id(::io::deephaven::proto::backplane::grpc::Ticket* source_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_id_); + } + if (source_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(source_id)); + if (message_arena != submessage_arena) { + source_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, source_id, submessage_arena); + } + + } else { + + } + source_id_ = source_id; + // @@protoc_insertion_point(field_set_allocated:io.deephaven.proto.backplane.grpc.PublishRequest.source_id) +} + +// .io.deephaven.proto.backplane.grpc.Ticket result_id = 2; +inline bool PublishRequest::_internal_has_result_id() const { + return this != internal_default_instance() && result_id_ != nullptr; +} +inline bool PublishRequest::has_result_id() const { + return _internal_has_result_id(); +} +inline const ::io::deephaven::proto::backplane::grpc::Ticket& PublishRequest::_internal_result_id() const { + const ::io::deephaven::proto::backplane::grpc::Ticket* p = result_id_; + return p != nullptr ? *p : reinterpret_cast( + ::io::deephaven::proto::backplane::grpc::_Ticket_default_instance_); +} +inline const ::io::deephaven::proto::backplane::grpc::Ticket& PublishRequest::result_id() const { + // @@protoc_insertion_point(field_get:io.deephaven.proto.backplane.grpc.PublishRequest.result_id) + return _internal_result_id(); +} +inline void PublishRequest::unsafe_arena_set_allocated_result_id( + ::io::deephaven::proto::backplane::grpc::Ticket* result_id) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(result_id_); + } + result_id_ = result_id; + if (result_id) { + + } else { + + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:io.deephaven.proto.backplane.grpc.PublishRequest.result_id) +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::release_result_id() { + + ::io::deephaven::proto::backplane::grpc::Ticket* temp = result_id_; + result_id_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::unsafe_arena_release_result_id() { + // @@protoc_insertion_point(field_release:io.deephaven.proto.backplane.grpc.PublishRequest.result_id) + + ::io::deephaven::proto::backplane::grpc::Ticket* temp = result_id_; + result_id_ = nullptr; + return temp; +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::_internal_mutable_result_id() { + + if (result_id_ == nullptr) { + auto* p = CreateMaybeMessage<::io::deephaven::proto::backplane::grpc::Ticket>(GetArenaForAllocation()); + result_id_ = p; + } + return result_id_; +} +inline ::io::deephaven::proto::backplane::grpc::Ticket* PublishRequest::mutable_result_id() { + ::io::deephaven::proto::backplane::grpc::Ticket* _msg = _internal_mutable_result_id(); + // @@protoc_insertion_point(field_mutable:io.deephaven.proto.backplane.grpc.PublishRequest.result_id) + return _msg; +} +inline void PublishRequest::set_allocated_result_id(::io::deephaven::proto::backplane::grpc::Ticket* result_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(result_id_); + } + if (result_id) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena( + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(result_id)); + if (message_arena != submessage_arena) { + result_id = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result_id, submessage_arena); + } + + } else { + + } + result_id_ = result_id; + // @@protoc_insertion_point(field_set_allocated:io.deephaven.proto.backplane.grpc.PublishRequest.result_id) +} + +// ------------------------------------------------------------------- + +// PublishResponse + +// ------------------------------------------------------------------- + // ExportNotificationRequest // ------------------------------------------------------------------- @@ -3356,6 +3830,10 @@ TerminationNotificationResponse::stack_traces() const { // ------------------------------------------------------------------- +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) diff --git a/go/internal/proto/session/session.pb.go b/go/internal/proto/session/session.pb.go index 19da93729c8..c6be93c7c05 100644 --- a/go/internal/proto/session/session.pb.go +++ b/go/internal/proto/session/session.pb.go @@ -100,7 +100,7 @@ func (x ExportNotification_State) Number() protoreflect.EnumNumber { // Deprecated: Use ExportNotification_State.Descriptor instead. func (ExportNotification_State) EnumDescriptor() ([]byte, []int) { - return file_deephaven_proto_session_proto_rawDescGZIP(), []int{9, 0} + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{11, 0} } type WrappedAuthenticationRequest struct { @@ -535,6 +535,99 @@ func (*ExportResponse) Descriptor() ([]byte, []int) { return file_deephaven_proto_session_proto_rawDescGZIP(), []int{7} } +type PublishRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceId *ticket.Ticket `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"` + ResultId *ticket.Ticket `protobuf:"bytes,2,opt,name=result_id,json=resultId,proto3" json:"result_id,omitempty"` +} + +func (x *PublishRequest) Reset() { + *x = PublishRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_deephaven_proto_session_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishRequest) ProtoMessage() {} + +func (x *PublishRequest) ProtoReflect() protoreflect.Message { + mi := &file_deephaven_proto_session_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishRequest.ProtoReflect.Descriptor instead. +func (*PublishRequest) Descriptor() ([]byte, []int) { + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{8} +} + +func (x *PublishRequest) GetSourceId() *ticket.Ticket { + if x != nil { + return x.SourceId + } + return nil +} + +func (x *PublishRequest) GetResultId() *ticket.Ticket { + if x != nil { + return x.ResultId + } + return nil +} + +type PublishResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PublishResponse) Reset() { + *x = PublishResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_deephaven_proto_session_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublishResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublishResponse) ProtoMessage() {} + +func (x *PublishResponse) ProtoReflect() protoreflect.Message { + mi := &file_deephaven_proto_session_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublishResponse.ProtoReflect.Descriptor instead. +func (*PublishResponse) Descriptor() ([]byte, []int) { + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{9} +} + type ExportNotificationRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -544,7 +637,7 @@ type ExportNotificationRequest struct { func (x *ExportNotificationRequest) Reset() { *x = ExportNotificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_deephaven_proto_session_proto_msgTypes[8] + mi := &file_deephaven_proto_session_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -557,7 +650,7 @@ func (x *ExportNotificationRequest) String() string { func (*ExportNotificationRequest) ProtoMessage() {} func (x *ExportNotificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_deephaven_proto_session_proto_msgTypes[8] + mi := &file_deephaven_proto_session_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -570,7 +663,7 @@ func (x *ExportNotificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportNotificationRequest.ProtoReflect.Descriptor instead. func (*ExportNotificationRequest) Descriptor() ([]byte, []int) { - return file_deephaven_proto_session_proto_rawDescGZIP(), []int{8} + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{10} } type ExportNotification struct { @@ -589,7 +682,7 @@ type ExportNotification struct { func (x *ExportNotification) Reset() { *x = ExportNotification{} if protoimpl.UnsafeEnabled { - mi := &file_deephaven_proto_session_proto_msgTypes[9] + mi := &file_deephaven_proto_session_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -602,7 +695,7 @@ func (x *ExportNotification) String() string { func (*ExportNotification) ProtoMessage() {} func (x *ExportNotification) ProtoReflect() protoreflect.Message { - mi := &file_deephaven_proto_session_proto_msgTypes[9] + mi := &file_deephaven_proto_session_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -615,7 +708,7 @@ func (x *ExportNotification) ProtoReflect() protoreflect.Message { // Deprecated: Use ExportNotification.ProtoReflect.Descriptor instead. func (*ExportNotification) Descriptor() ([]byte, []int) { - return file_deephaven_proto_session_proto_rawDescGZIP(), []int{9} + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{11} } func (x *ExportNotification) GetTicket() *ticket.Ticket { @@ -655,7 +748,7 @@ type TerminationNotificationRequest struct { func (x *TerminationNotificationRequest) Reset() { *x = TerminationNotificationRequest{} if protoimpl.UnsafeEnabled { - mi := &file_deephaven_proto_session_proto_msgTypes[10] + mi := &file_deephaven_proto_session_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -668,7 +761,7 @@ func (x *TerminationNotificationRequest) String() string { func (*TerminationNotificationRequest) ProtoMessage() {} func (x *TerminationNotificationRequest) ProtoReflect() protoreflect.Message { - mi := &file_deephaven_proto_session_proto_msgTypes[10] + mi := &file_deephaven_proto_session_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -681,7 +774,7 @@ func (x *TerminationNotificationRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TerminationNotificationRequest.ProtoReflect.Descriptor instead. func (*TerminationNotificationRequest) Descriptor() ([]byte, []int) { - return file_deephaven_proto_session_proto_rawDescGZIP(), []int{10} + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{12} } type TerminationNotificationResponse struct { @@ -702,7 +795,7 @@ type TerminationNotificationResponse struct { func (x *TerminationNotificationResponse) Reset() { *x = TerminationNotificationResponse{} if protoimpl.UnsafeEnabled { - mi := &file_deephaven_proto_session_proto_msgTypes[11] + mi := &file_deephaven_proto_session_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -715,7 +808,7 @@ func (x *TerminationNotificationResponse) String() string { func (*TerminationNotificationResponse) ProtoMessage() {} func (x *TerminationNotificationResponse) ProtoReflect() protoreflect.Message { - mi := &file_deephaven_proto_session_proto_msgTypes[11] + mi := &file_deephaven_proto_session_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -728,7 +821,7 @@ func (x *TerminationNotificationResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TerminationNotificationResponse.ProtoReflect.Descriptor instead. func (*TerminationNotificationResponse) Descriptor() ([]byte, []int) { - return file_deephaven_proto_session_proto_rawDescGZIP(), []int{11} + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{13} } func (x *TerminationNotificationResponse) GetAbnormalTermination() bool { @@ -772,7 +865,7 @@ type TerminationNotificationResponse_StackTrace struct { func (x *TerminationNotificationResponse_StackTrace) Reset() { *x = TerminationNotificationResponse_StackTrace{} if protoimpl.UnsafeEnabled { - mi := &file_deephaven_proto_session_proto_msgTypes[12] + mi := &file_deephaven_proto_session_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -785,7 +878,7 @@ func (x *TerminationNotificationResponse_StackTrace) String() string { func (*TerminationNotificationResponse_StackTrace) ProtoMessage() {} func (x *TerminationNotificationResponse_StackTrace) ProtoReflect() protoreflect.Message { - mi := &file_deephaven_proto_session_proto_msgTypes[12] + mi := &file_deephaven_proto_session_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -798,7 +891,7 @@ func (x *TerminationNotificationResponse_StackTrace) ProtoReflect() protoreflect // Deprecated: Use TerminationNotificationResponse_StackTrace.ProtoReflect.Descriptor instead. func (*TerminationNotificationResponse_StackTrace) Descriptor() ([]byte, []int) { - return file_deephaven_proto_session_proto_rawDescGZIP(), []int{11, 0} + return file_deephaven_proto_session_proto_rawDescGZIP(), []int{13, 0} } func (x *TerminationNotificationResponse_StackTrace) GetType() string { @@ -876,130 +969,149 @@ var file_deephaven_proto_session_proto_rawDesc = []byte{ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe6, 0x03, 0x0a, 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, - 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, - 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, - 0x12, 0x5e, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, - 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, - 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, - 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x48, - 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x55, 0x42, - 0x4c, 0x49, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x45, - 0x55, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, - 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4f, 0x52, 0x54, 0x45, 0x44, 0x10, 0x05, - 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, - 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x07, 0x12, 0x0a, 0x0a, - 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x45, 0x50, - 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, - 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x4e, - 0x45, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, - 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, - 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, - 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, 0x45, 0x44, 0x10, 0x0c, 0x22, - 0x20, 0x0a, 0x1e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x22, 0xf3, 0x02, 0x0a, 0x1f, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x61, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, - 0x6c, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x54, 0x65, 0x72, - 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x73, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x75, 0x6e, 0x63, 0x61, - 0x75, 0x67, 0x68, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, 0x73, 0x46, 0x72, 0x6f, 0x6d, 0x55, 0x6e, 0x63, 0x61, - 0x75, 0x67, 0x68, 0x74, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, - 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa0, 0x01, 0x0a, 0x0e, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46, 0x0a, 0x09, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x29, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, + 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x08, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x49, 0x64, 0x12, 0x46, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, + 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, + 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, + 0x65, 0x74, 0x52, 0x08, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x49, 0x64, 0x22, 0x11, 0x0a, 0x0f, + 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1b, 0x0a, 0x19, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xe6, 0x03, 0x0a, + 0x12, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x06, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, - 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, - 0x63, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x73, 0x1a, - 0x56, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x65, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xbb, 0x07, 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x0a, 0x4e, 0x65, - 0x77, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, - 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, - 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, - 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, - 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x85, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x66, - 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x33, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, - 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, - 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, - 0x12, 0x7e, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x33, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, - 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, - 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x72, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x12, 0x31, 0x2e, 0x69, 0x6f, + 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, + 0x74, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x5e, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3b, 0x2e, 0x69, + 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, + 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x65, + 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x22, 0xe7, 0x01, 0x0a, 0x05, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, + 0x0e, 0x0a, 0x0a, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x0a, 0x0a, 0x06, 0x51, 0x55, 0x45, 0x55, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0b, 0x0a, 0x07, 0x52, + 0x55, 0x4e, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x45, 0x58, 0x50, 0x4f, + 0x52, 0x54, 0x45, 0x44, 0x10, 0x05, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x4c, 0x45, 0x41, 0x53, + 0x45, 0x44, 0x10, 0x06, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, + 0x44, 0x10, 0x07, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, + 0x15, 0x0a, 0x11, 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, + 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x4e, 0x45, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, + 0x10, 0x0a, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x43, 0x59, + 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x4c, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x17, 0x0a, 0x13, + 0x44, 0x45, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x4c, 0x45, 0x41, + 0x53, 0x45, 0x44, 0x10, 0x0c, 0x22, 0x20, 0x0a, 0x1e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf3, 0x02, 0x0a, 0x1f, 0x54, 0x65, 0x72, 0x6d, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x14, 0x61, + 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x5f, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x62, 0x6e, 0x6f, 0x72, + 0x6d, 0x61, 0x6c, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x1a, 0x69, 0x73, 0x5f, 0x66, 0x72, 0x6f, + 0x6d, 0x5f, 0x75, 0x6e, 0x63, 0x61, 0x75, 0x67, 0x68, 0x74, 0x5f, 0x65, 0x78, 0x63, 0x65, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17, 0x69, 0x73, 0x46, 0x72, + 0x6f, 0x6d, 0x55, 0x6e, 0x63, 0x61, 0x75, 0x67, 0x68, 0x74, 0x45, 0x78, 0x63, 0x65, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x70, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5f, 0x74, 0x72, 0x61, + 0x63, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x4d, 0x2e, 0x69, 0x6f, 0x2e, 0x64, + 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, + 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, + 0x61, 0x63, 0x6b, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x73, 0x1a, 0x56, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x63, 0x6b, 0x54, 0x72, + 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xb9, 0x08, + 0x0a, 0x0e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x7c, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, + 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, + 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x85, + 0x01, 0x0a, 0x13, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x33, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, + 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, + 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, + 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x7e, 0x0a, 0x0c, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, + 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, + 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, + 0x68, 0x61, 0x6b, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x69, 0x6f, + 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x72, 0x0a, 0x07, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, + 0x65, 0x12, 0x31, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, + 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, + 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, + 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x10, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x10, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x46, 0x72, - 0x6f, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x30, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, - 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, - 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x69, 0x6f, 0x2e, + 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x31, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x7c, 0x0a, 0x11, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, + 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x69, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x31, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, - 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, - 0x78, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x8e, 0x01, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, - 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, - 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, - 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, - 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x00, 0x30, 0x01, - 0x12, 0xa2, 0x01, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x2e, 0x69, - 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, - 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x42, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, - 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x43, 0x48, 0x01, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, - 0x6e, 0x2f, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2d, 0x63, 0x6f, 0x72, 0x65, - 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, + 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, + 0x63, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x8e, 0x01, 0x0a, 0x13, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, + 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3c, 0x2e, 0x69, 0x6f, + 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, + 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x69, 0x6f, 0x2e, 0x64, + 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, + 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x22, 0x00, 0x30, 0x01, 0x12, 0xa2, 0x01, 0x0a, 0x17, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x41, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x69, 0x6f, 0x2e, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, + 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x62, 0x61, 0x63, 0x6b, 0x70, 0x6c, 0x61, + 0x6e, 0x65, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x43, 0x48, 0x01, 0x50, 0x01, 0x5a, + 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x64, 0x65, 0x65, 0x70, + 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2f, 0x64, 0x65, 0x65, 0x70, 0x68, 0x61, 0x76, 0x65, 0x6e, 0x2d, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x67, 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1015,7 +1127,7 @@ func file_deephaven_proto_session_proto_rawDescGZIP() []byte { } var file_deephaven_proto_session_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_deephaven_proto_session_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_deephaven_proto_session_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_deephaven_proto_session_proto_goTypes = []interface{}{ (ExportNotification_State)(0), // 0: io.deephaven.proto.backplane.grpc.ExportNotification.State (*WrappedAuthenticationRequest)(nil), // 1: io.deephaven.proto.backplane.grpc.WrappedAuthenticationRequest @@ -1026,39 +1138,45 @@ var file_deephaven_proto_session_proto_goTypes = []interface{}{ (*ReleaseResponse)(nil), // 6: io.deephaven.proto.backplane.grpc.ReleaseResponse (*ExportRequest)(nil), // 7: io.deephaven.proto.backplane.grpc.ExportRequest (*ExportResponse)(nil), // 8: io.deephaven.proto.backplane.grpc.ExportResponse - (*ExportNotificationRequest)(nil), // 9: io.deephaven.proto.backplane.grpc.ExportNotificationRequest - (*ExportNotification)(nil), // 10: io.deephaven.proto.backplane.grpc.ExportNotification - (*TerminationNotificationRequest)(nil), // 11: io.deephaven.proto.backplane.grpc.TerminationNotificationRequest - (*TerminationNotificationResponse)(nil), // 12: io.deephaven.proto.backplane.grpc.TerminationNotificationResponse - (*TerminationNotificationResponse_StackTrace)(nil), // 13: io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.StackTrace - (*ticket.Ticket)(nil), // 14: io.deephaven.proto.backplane.grpc.Ticket + (*PublishRequest)(nil), // 9: io.deephaven.proto.backplane.grpc.PublishRequest + (*PublishResponse)(nil), // 10: io.deephaven.proto.backplane.grpc.PublishResponse + (*ExportNotificationRequest)(nil), // 11: io.deephaven.proto.backplane.grpc.ExportNotificationRequest + (*ExportNotification)(nil), // 12: io.deephaven.proto.backplane.grpc.ExportNotification + (*TerminationNotificationRequest)(nil), // 13: io.deephaven.proto.backplane.grpc.TerminationNotificationRequest + (*TerminationNotificationResponse)(nil), // 14: io.deephaven.proto.backplane.grpc.TerminationNotificationResponse + (*TerminationNotificationResponse_StackTrace)(nil), // 15: io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.StackTrace + (*ticket.Ticket)(nil), // 16: io.deephaven.proto.backplane.grpc.Ticket } var file_deephaven_proto_session_proto_depIdxs = []int32{ - 14, // 0: io.deephaven.proto.backplane.grpc.ReleaseRequest.id:type_name -> io.deephaven.proto.backplane.grpc.Ticket - 14, // 1: io.deephaven.proto.backplane.grpc.ExportRequest.source_id:type_name -> io.deephaven.proto.backplane.grpc.Ticket - 14, // 2: io.deephaven.proto.backplane.grpc.ExportRequest.result_id:type_name -> io.deephaven.proto.backplane.grpc.Ticket - 14, // 3: io.deephaven.proto.backplane.grpc.ExportNotification.ticket:type_name -> io.deephaven.proto.backplane.grpc.Ticket - 0, // 4: io.deephaven.proto.backplane.grpc.ExportNotification.export_state:type_name -> io.deephaven.proto.backplane.grpc.ExportNotification.State - 13, // 5: io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.stack_traces:type_name -> io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.StackTrace - 2, // 6: io.deephaven.proto.backplane.grpc.SessionService.NewSession:input_type -> io.deephaven.proto.backplane.grpc.HandshakeRequest - 2, // 7: io.deephaven.proto.backplane.grpc.SessionService.RefreshSessionToken:input_type -> io.deephaven.proto.backplane.grpc.HandshakeRequest - 2, // 8: io.deephaven.proto.backplane.grpc.SessionService.CloseSession:input_type -> io.deephaven.proto.backplane.grpc.HandshakeRequest - 5, // 9: io.deephaven.proto.backplane.grpc.SessionService.Release:input_type -> io.deephaven.proto.backplane.grpc.ReleaseRequest - 7, // 10: io.deephaven.proto.backplane.grpc.SessionService.ExportFromTicket:input_type -> io.deephaven.proto.backplane.grpc.ExportRequest - 9, // 11: io.deephaven.proto.backplane.grpc.SessionService.ExportNotifications:input_type -> io.deephaven.proto.backplane.grpc.ExportNotificationRequest - 11, // 12: io.deephaven.proto.backplane.grpc.SessionService.TerminationNotification:input_type -> io.deephaven.proto.backplane.grpc.TerminationNotificationRequest - 3, // 13: io.deephaven.proto.backplane.grpc.SessionService.NewSession:output_type -> io.deephaven.proto.backplane.grpc.HandshakeResponse - 3, // 14: io.deephaven.proto.backplane.grpc.SessionService.RefreshSessionToken:output_type -> io.deephaven.proto.backplane.grpc.HandshakeResponse - 4, // 15: io.deephaven.proto.backplane.grpc.SessionService.CloseSession:output_type -> io.deephaven.proto.backplane.grpc.CloseSessionResponse - 6, // 16: io.deephaven.proto.backplane.grpc.SessionService.Release:output_type -> io.deephaven.proto.backplane.grpc.ReleaseResponse - 8, // 17: io.deephaven.proto.backplane.grpc.SessionService.ExportFromTicket:output_type -> io.deephaven.proto.backplane.grpc.ExportResponse - 10, // 18: io.deephaven.proto.backplane.grpc.SessionService.ExportNotifications:output_type -> io.deephaven.proto.backplane.grpc.ExportNotification - 12, // 19: io.deephaven.proto.backplane.grpc.SessionService.TerminationNotification:output_type -> io.deephaven.proto.backplane.grpc.TerminationNotificationResponse - 13, // [13:20] is the sub-list for method output_type - 6, // [6:13] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 16, // 0: io.deephaven.proto.backplane.grpc.ReleaseRequest.id:type_name -> io.deephaven.proto.backplane.grpc.Ticket + 16, // 1: io.deephaven.proto.backplane.grpc.ExportRequest.source_id:type_name -> io.deephaven.proto.backplane.grpc.Ticket + 16, // 2: io.deephaven.proto.backplane.grpc.ExportRequest.result_id:type_name -> io.deephaven.proto.backplane.grpc.Ticket + 16, // 3: io.deephaven.proto.backplane.grpc.PublishRequest.source_id:type_name -> io.deephaven.proto.backplane.grpc.Ticket + 16, // 4: io.deephaven.proto.backplane.grpc.PublishRequest.result_id:type_name -> io.deephaven.proto.backplane.grpc.Ticket + 16, // 5: io.deephaven.proto.backplane.grpc.ExportNotification.ticket:type_name -> io.deephaven.proto.backplane.grpc.Ticket + 0, // 6: io.deephaven.proto.backplane.grpc.ExportNotification.export_state:type_name -> io.deephaven.proto.backplane.grpc.ExportNotification.State + 15, // 7: io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.stack_traces:type_name -> io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.StackTrace + 2, // 8: io.deephaven.proto.backplane.grpc.SessionService.NewSession:input_type -> io.deephaven.proto.backplane.grpc.HandshakeRequest + 2, // 9: io.deephaven.proto.backplane.grpc.SessionService.RefreshSessionToken:input_type -> io.deephaven.proto.backplane.grpc.HandshakeRequest + 2, // 10: io.deephaven.proto.backplane.grpc.SessionService.CloseSession:input_type -> io.deephaven.proto.backplane.grpc.HandshakeRequest + 5, // 11: io.deephaven.proto.backplane.grpc.SessionService.Release:input_type -> io.deephaven.proto.backplane.grpc.ReleaseRequest + 7, // 12: io.deephaven.proto.backplane.grpc.SessionService.ExportFromTicket:input_type -> io.deephaven.proto.backplane.grpc.ExportRequest + 9, // 13: io.deephaven.proto.backplane.grpc.SessionService.PublishFromTicket:input_type -> io.deephaven.proto.backplane.grpc.PublishRequest + 11, // 14: io.deephaven.proto.backplane.grpc.SessionService.ExportNotifications:input_type -> io.deephaven.proto.backplane.grpc.ExportNotificationRequest + 13, // 15: io.deephaven.proto.backplane.grpc.SessionService.TerminationNotification:input_type -> io.deephaven.proto.backplane.grpc.TerminationNotificationRequest + 3, // 16: io.deephaven.proto.backplane.grpc.SessionService.NewSession:output_type -> io.deephaven.proto.backplane.grpc.HandshakeResponse + 3, // 17: io.deephaven.proto.backplane.grpc.SessionService.RefreshSessionToken:output_type -> io.deephaven.proto.backplane.grpc.HandshakeResponse + 4, // 18: io.deephaven.proto.backplane.grpc.SessionService.CloseSession:output_type -> io.deephaven.proto.backplane.grpc.CloseSessionResponse + 6, // 19: io.deephaven.proto.backplane.grpc.SessionService.Release:output_type -> io.deephaven.proto.backplane.grpc.ReleaseResponse + 8, // 20: io.deephaven.proto.backplane.grpc.SessionService.ExportFromTicket:output_type -> io.deephaven.proto.backplane.grpc.ExportResponse + 10, // 21: io.deephaven.proto.backplane.grpc.SessionService.PublishFromTicket:output_type -> io.deephaven.proto.backplane.grpc.PublishResponse + 12, // 22: io.deephaven.proto.backplane.grpc.SessionService.ExportNotifications:output_type -> io.deephaven.proto.backplane.grpc.ExportNotification + 14, // 23: io.deephaven.proto.backplane.grpc.SessionService.TerminationNotification:output_type -> io.deephaven.proto.backplane.grpc.TerminationNotificationResponse + 16, // [16:24] is the sub-list for method output_type + 8, // [8:16] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_deephaven_proto_session_proto_init() } @@ -1164,7 +1282,7 @@ func file_deephaven_proto_session_proto_init() { } } file_deephaven_proto_session_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportNotificationRequest); i { + switch v := v.(*PublishRequest); i { case 0: return &v.state case 1: @@ -1176,7 +1294,7 @@ func file_deephaven_proto_session_proto_init() { } } file_deephaven_proto_session_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExportNotification); i { + switch v := v.(*PublishResponse); i { case 0: return &v.state case 1: @@ -1188,7 +1306,7 @@ func file_deephaven_proto_session_proto_init() { } } file_deephaven_proto_session_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminationNotificationRequest); i { + switch v := v.(*ExportNotificationRequest); i { case 0: return &v.state case 1: @@ -1200,7 +1318,7 @@ func file_deephaven_proto_session_proto_init() { } } file_deephaven_proto_session_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TerminationNotificationResponse); i { + switch v := v.(*ExportNotification); i { case 0: return &v.state case 1: @@ -1212,6 +1330,30 @@ func file_deephaven_proto_session_proto_init() { } } file_deephaven_proto_session_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TerminationNotificationRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_deephaven_proto_session_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TerminationNotificationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_deephaven_proto_session_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TerminationNotificationResponse_StackTrace); i { case 0: return &v.state @@ -1230,7 +1372,7 @@ func file_deephaven_proto_session_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_deephaven_proto_session_proto_rawDesc, NumEnums: 1, - NumMessages: 13, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/go/internal/proto/session/session_grpc.pb.go b/go/internal/proto/session/session_grpc.pb.go index 2a3a1a8354d..dc8bef2418f 100644 --- a/go/internal/proto/session/session_grpc.pb.go +++ b/go/internal/proto/session/session_grpc.pb.go @@ -47,6 +47,9 @@ type SessionServiceClient interface { // Makes a copy from a source ticket to a client managed result ticket. The source ticket does not need to be // a client managed ticket. ExportFromTicket(ctx context.Context, in *ExportRequest, opts ...grpc.CallOption) (*ExportResponse, error) + // Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + // ticket, need to be a client managed ticket. + PublishFromTicket(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) // Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. // // New streams will flush notifications for all un-released exports, prior to seeing any new or updated exports @@ -113,6 +116,15 @@ func (c *sessionServiceClient) ExportFromTicket(ctx context.Context, in *ExportR return out, nil } +func (c *sessionServiceClient) PublishFromTicket(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) { + out := new(PublishResponse) + err := c.cc.Invoke(ctx, "/io.deephaven.proto.backplane.grpc.SessionService/PublishFromTicket", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *sessionServiceClient) ExportNotifications(ctx context.Context, in *ExportNotificationRequest, opts ...grpc.CallOption) (SessionService_ExportNotificationsClient, error) { stream, err := c.cc.NewStream(ctx, &SessionService_ServiceDesc.Streams[0], "/io.deephaven.proto.backplane.grpc.SessionService/ExportNotifications", opts...) if err != nil { @@ -183,6 +195,9 @@ type SessionServiceServer interface { // Makes a copy from a source ticket to a client managed result ticket. The source ticket does not need to be // a client managed ticket. ExportFromTicket(context.Context, *ExportRequest) (*ExportResponse, error) + // Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + // ticket, need to be a client managed ticket. + PublishFromTicket(context.Context, *PublishRequest) (*PublishResponse, error) // Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. // // New streams will flush notifications for all un-released exports, prior to seeing any new or updated exports @@ -214,6 +229,9 @@ func (UnimplementedSessionServiceServer) Release(context.Context, *ReleaseReques func (UnimplementedSessionServiceServer) ExportFromTicket(context.Context, *ExportRequest) (*ExportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExportFromTicket not implemented") } +func (UnimplementedSessionServiceServer) PublishFromTicket(context.Context, *PublishRequest) (*PublishResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PublishFromTicket not implemented") +} func (UnimplementedSessionServiceServer) ExportNotifications(*ExportNotificationRequest, SessionService_ExportNotificationsServer) error { return status.Errorf(codes.Unimplemented, "method ExportNotifications not implemented") } @@ -323,6 +341,24 @@ func _SessionService_ExportFromTicket_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } +func _SessionService_PublishFromTicket_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PublishRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SessionServiceServer).PublishFromTicket(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/io.deephaven.proto.backplane.grpc.SessionService/PublishFromTicket", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SessionServiceServer).PublishFromTicket(ctx, req.(*PublishRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SessionService_ExportNotifications_Handler(srv interface{}, stream grpc.ServerStream) error { m := new(ExportNotificationRequest) if err := stream.RecvMsg(m); err != nil { @@ -389,6 +425,10 @@ var SessionService_ServiceDesc = grpc.ServiceDesc{ MethodName: "ExportFromTicket", Handler: _SessionService_ExportFromTicket_Handler, }, + { + MethodName: "PublishFromTicket", + Handler: _SessionService_PublishFromTicket_Handler, + }, { MethodName: "TerminationNotification", Handler: _SessionService_TerminationNotification_Handler, diff --git a/java-client/example-utilities/src/main/java/io/deephaven/client/examples/Ticket.java b/java-client/example-utilities/src/main/java/io/deephaven/client/examples/Ticket.java index dca732eba76..a21771f04ff 100644 --- a/java-client/example-utilities/src/main/java/io/deephaven/client/examples/Ticket.java +++ b/java-client/example-utilities/src/main/java/io/deephaven/client/examples/Ticket.java @@ -3,6 +3,7 @@ */ package io.deephaven.client.examples; +import io.deephaven.client.impl.HasPathId; import io.deephaven.client.impl.HasTicketId; import io.deephaven.client.impl.TicketId; import picocli.CommandLine.ArgGroup; @@ -30,4 +31,19 @@ public TicketId ticketId() { } throw new IllegalStateException(); } + + public HasPathId asHasPathId() { + return () -> { + if (scopeField != null) { + return scopeField.pathId(); + } + if (applicationField != null) { + return applicationField.pathId(); + } + if (rawTicket != null) { + throw new IllegalArgumentException("Unable to get a path from a raw ticket"); + } + throw new IllegalStateException(); + }; + } } diff --git a/java-client/flight-examples/src/main/java/io/deephaven/client/examples/DoPutTable.java b/java-client/flight-examples/src/main/java/io/deephaven/client/examples/DoPutTable.java index bbef7e27741..33254c905e5 100644 --- a/java-client/flight-examples/src/main/java/io/deephaven/client/examples/DoPutTable.java +++ b/java-client/flight-examples/src/main/java/io/deephaven/client/examples/DoPutTable.java @@ -6,14 +6,13 @@ import io.deephaven.client.impl.ExportId; import io.deephaven.client.impl.FlightSession; import io.deephaven.client.impl.HasTicketId; -import io.deephaven.client.impl.ScopeId; import io.deephaven.client.impl.TableHandle; import io.deephaven.qst.column.header.ColumnHeader; import io.deephaven.qst.table.NewTable; import picocli.CommandLine; +import picocli.CommandLine.ArgGroup; import picocli.CommandLine.Command; import picocli.CommandLine.Option; -import picocli.CommandLine.Parameters; import java.time.Instant; import java.util.concurrent.ExecutionException; @@ -30,8 +29,8 @@ enum Method { defaultValue = "HANDLE") Method method; - @Parameters(arity = "1", paramLabel = "VAR", description = "Variable name to publish.") - String variableName; + @ArgGroup(exclusive = true, multiplicity = "1") + Ticket ticket; @Override protected void execute(FlightSession flight) throws Exception { @@ -72,7 +71,7 @@ private NewTable newTable() { } private void publish(FlightSession flight, HasTicketId ticketId) throws InterruptedException, ExecutionException { - flight.session().publish(variableName, ticketId).get(); + flight.session().publish(ticket, ticketId).get(); } private void handle(FlightSession flight) throws Exception { @@ -94,7 +93,7 @@ private void ticket(FlightSession flight) throws Exception { private void direct(FlightSession flight) { // This version is most efficient, but the RHS is ephemeral and can't be re-referenced - flight.put(new ScopeId(variableName), newTable(), bufferAllocator); + flight.put(ticket.asHasPathId(), newTable(), bufferAllocator); } public static void main(String[] args) { diff --git a/java-client/session-examples/build.gradle b/java-client/session-examples/build.gradle index a0b8d5c36c7..6f89c9d767e 100644 --- a/java-client/session-examples/build.gradle +++ b/java-client/session-examples/build.gradle @@ -45,6 +45,7 @@ applicationDistribution.into('bin') { from(createApplication('connect-check', 'io.deephaven.client.examples.ConnectCheck')) from(createApplication('fetch-object', 'io.deephaven.client.examples.FetchObject')) from(createApplication('subscribe-to-logs', 'io.deephaven.client.examples.SubscribeToLogs')) + from(createApplication('publish', 'io.deephaven.client.examples.Publish')) fileMode = 0755 } diff --git a/java-client/session-examples/src/main/java/io/deephaven/client/examples/Publish.java b/java-client/session-examples/src/main/java/io/deephaven/client/examples/Publish.java new file mode 100644 index 00000000000..4daa800c610 --- /dev/null +++ b/java-client/session-examples/src/main/java/io/deephaven/client/examples/Publish.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2016-2022 Deephaven Data Labs and Patent Pending + */ +package io.deephaven.client.examples; + +import io.deephaven.client.impl.Session; +import picocli.CommandLine; +import picocli.CommandLine.ArgGroup; +import picocli.CommandLine.Command; + +import java.util.List; + +@Command(name = "publish", mixinStandardHelpOptions = true, + description = "Publish", version = "0.1.0") +class Publish extends SingleSessionExampleBase { + + // Note: this is not perfect, and will need to look into picocli usage to better support this in the future. + // Right now, the two ticket types need to be the same, even though that's not a technical requirement. + @ArgGroup(exclusive = false, multiplicity = "2") + List tickets; + + @Override + protected void execute(Session session) throws Exception { + session.publish(tickets.get(0), tickets.get(1)).get(); + } + + public static void main(String[] args) { + int execute = new CommandLine(new Publish()).execute(args); + System.exit(execute); + } +} diff --git a/java-client/session/src/main/java/io/deephaven/client/impl/Session.java b/java-client/session/src/main/java/io/deephaven/client/impl/Session.java index 4a1dbaa2ade..839b50f3bd5 100644 --- a/java-client/session/src/main/java/io/deephaven/client/impl/Session.java +++ b/java-client/session/src/main/java/io/deephaven/client/impl/Session.java @@ -54,6 +54,18 @@ public interface Session // ---------------------------------------------------------- + /** + * Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the + * destination ticket, need to be a client managed ticket. + * + * @param resultId the result id + * @param sourceId the source id + * @return the future + */ + CompletableFuture publish(HasTicketId resultId, HasTicketId sourceId); + + // ---------------------------------------------------------- + /** * The authenticated channel. * diff --git a/java-client/session/src/main/java/io/deephaven/client/impl/SessionImpl.java b/java-client/session/src/main/java/io/deephaven/client/impl/SessionImpl.java index 7378c00cde6..2f931e4cac0 100644 --- a/java-client/session/src/main/java/io/deephaven/client/impl/SessionImpl.java +++ b/java-client/session/src/main/java/io/deephaven/client/impl/SessionImpl.java @@ -17,6 +17,7 @@ import io.deephaven.proto.backplane.grpc.FieldsChangeUpdate; import io.deephaven.proto.backplane.grpc.HandshakeRequest; import io.deephaven.proto.backplane.grpc.ListFieldsRequest; +import io.deephaven.proto.backplane.grpc.PublishRequest; import io.deephaven.proto.backplane.grpc.ReleaseRequest; import io.deephaven.proto.backplane.grpc.Ticket; import io.deephaven.proto.backplane.grpc.TypedTicket; @@ -158,6 +159,15 @@ public CompletableFuture publish(String name, HasTicketId ticketId) { return UnaryGrpcFuture.ignoreResponse(request, channel().console()::bindTableToVariable); } + @Override + public CompletableFuture publish(HasTicketId resultId, HasTicketId sourceId) { + final PublishRequest request = PublishRequest.newBuilder() + .setSourceId(sourceId.ticketId().ticket()) + .setResultId(resultId.ticketId().ticket()) + .build(); + return UnaryGrpcFuture.ignoreResponse(request, channel().session()::publishFromTicket); + } + @Override public CompletableFuture fetchObject(String type, HasTicketId ticketId) { final FetchObjectRequest request = FetchObjectRequest.newBuilder() diff --git a/proto/proto-backplane-grpc/src/main/proto/deephaven/proto/session.proto b/proto/proto-backplane-grpc/src/main/proto/deephaven/proto/session.proto index 78b9759613f..d31ee230825 100644 --- a/proto/proto-backplane-grpc/src/main/proto/deephaven/proto/session.proto +++ b/proto/proto-backplane-grpc/src/main/proto/deephaven/proto/session.proto @@ -68,6 +68,12 @@ service SessionService { */ rpc ExportFromTicket(ExportRequest) returns (ExportResponse) {} + /* + * Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + * ticket, need to be a client managed ticket. + */ + rpc PublishFromTicket(PublishRequest) returns (PublishResponse) {} + /* * Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. * @@ -170,6 +176,15 @@ message ExportResponse { // Intentionally empty and is here for backwards compatibility should this API change. } +message PublishRequest { + Ticket source_id = 1; + Ticket result_id = 2; +} + +message PublishResponse { + // Intentionally empty and is here for backwards compatibility should this API change. +} + message ExportNotificationRequest { // Intentionally empty and is here for backwards compatibility should this API change. } diff --git a/py/client/pydeephaven/proto/session_pb2.py b/py/client/pydeephaven/proto/session_pb2.py index 531c13a69fc..e3943ff23d9 100644 --- a/py/client/pydeephaven/proto/session_pb2.py +++ b/py/client/pydeephaven/proto/session_pb2.py @@ -14,7 +14,7 @@ from pydeephaven.proto import ticket_pb2 as deephaven_dot_proto_dot_ticket__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x64\x65\x65phaven/proto/session.proto\x12!io.deephaven.proto.backplane.grpc\x1a\x1c\x64\x65\x65phaven/proto/ticket.proto\"I\n\x1cWrappedAuthenticationRequest\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x0f\n\x07payload\x18\x05 \x01(\x0cJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\"B\n\x10HandshakeRequest\x12\x19\n\rauth_protocol\x18\x01 \x01(\x11\x42\x02\x18\x01\x12\x13\n\x07payload\x18\x02 \x01(\x0c\x42\x02\x18\x01\"\xa2\x01\n\x11HandshakeResponse\x12\x1b\n\x0fmetadata_header\x18\x01 \x01(\x0c\x42\x02\x18\x01\x12\x19\n\rsession_token\x18\x02 \x01(\x0c\x42\x02\x18\x01\x12(\n\x1atoken_deadline_time_millis\x18\x03 \x01(\x12\x42\x04\x18\x01\x30\x01\x12+\n\x1dtoken_expiration_delay_millis\x18\x04 \x01(\x12\x42\x04\x18\x01\x30\x01\"\x16\n\x14\x43loseSessionResponse\"G\n\x0eReleaseRequest\x12\x35\n\x02id\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\"\x11\n\x0fReleaseResponse\"\x8b\x01\n\rExportRequest\x12<\n\tsource_id\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\x12<\n\tresult_id\x18\x02 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\"\x10\n\x0e\x45xportResponse\"\x1b\n\x19\x45xportNotificationRequest\"\xb7\x03\n\x12\x45xportNotification\x12\x39\n\x06ticket\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\x12Q\n\x0c\x65xport_state\x18\x02 \x01(\x0e\x32;.io.deephaven.proto.backplane.grpc.ExportNotification.State\x12\x0f\n\x07\x63ontext\x18\x03 \x01(\t\x12\x18\n\x10\x64\x65pendent_handle\x18\x04 \x01(\t\"\xe7\x01\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0e\n\nPUBLISHING\x10\x02\x12\n\n\x06QUEUED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\x12\x0c\n\x08\x45XPORTED\x10\x05\x12\x0c\n\x08RELEASED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\n\n\x06\x46\x41ILED\x10\x08\x12\x15\n\x11\x44\x45PENDENCY_FAILED\x10\t\x12\x1a\n\x16\x44\x45PENDENCY_NEVER_FOUND\x10\n\x12\x18\n\x14\x44\x45PENDENCY_CANCELLED\x10\x0b\x12\x17\n\x13\x44\x45PENDENCY_RELEASED\x10\x0c\" \n\x1eTerminationNotificationRequest\"\x97\x02\n\x1fTerminationNotificationResponse\x12\x1c\n\x14\x61\x62normal_termination\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\"\n\x1ais_from_uncaught_exception\x18\x03 \x01(\x08\x12\x63\n\x0cstack_traces\x18\x04 \x03(\x0b\x32M.io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.StackTrace\x1a=\n\nStackTrace\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x10\n\x08\x65lements\x18\x03 \x03(\t2\xbb\x07\n\x0eSessionService\x12|\n\nNewSession\x12\x33.io.deephaven.proto.backplane.grpc.HandshakeRequest\x1a\x34.io.deephaven.proto.backplane.grpc.HandshakeResponse\"\x03\x88\x02\x01\x12\x85\x01\n\x13RefreshSessionToken\x12\x33.io.deephaven.proto.backplane.grpc.HandshakeRequest\x1a\x34.io.deephaven.proto.backplane.grpc.HandshakeResponse\"\x03\x88\x02\x01\x12~\n\x0c\x43loseSession\x12\x33.io.deephaven.proto.backplane.grpc.HandshakeRequest\x1a\x37.io.deephaven.proto.backplane.grpc.CloseSessionResponse\"\x00\x12r\n\x07Release\x12\x31.io.deephaven.proto.backplane.grpc.ReleaseRequest\x1a\x32.io.deephaven.proto.backplane.grpc.ReleaseResponse\"\x00\x12y\n\x10\x45xportFromTicket\x12\x30.io.deephaven.proto.backplane.grpc.ExportRequest\x1a\x31.io.deephaven.proto.backplane.grpc.ExportResponse\"\x00\x12\x8e\x01\n\x13\x45xportNotifications\x12<.io.deephaven.proto.backplane.grpc.ExportNotificationRequest\x1a\x35.io.deephaven.proto.backplane.grpc.ExportNotification\"\x00\x30\x01\x12\xa2\x01\n\x17TerminationNotification\x12\x41.io.deephaven.proto.backplane.grpc.TerminationNotificationRequest\x1a\x42.io.deephaven.proto.backplane.grpc.TerminationNotificationResponse\"\x00\x42\x43H\x01P\x01Z=github.com/deephaven/deephaven-core/go/internal/proto/sessionb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1d\x64\x65\x65phaven/proto/session.proto\x12!io.deephaven.proto.backplane.grpc\x1a\x1c\x64\x65\x65phaven/proto/ticket.proto\"I\n\x1cWrappedAuthenticationRequest\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x0f\n\x07payload\x18\x05 \x01(\x0cJ\x04\x08\x02\x10\x03J\x04\x08\x03\x10\x04\"B\n\x10HandshakeRequest\x12\x19\n\rauth_protocol\x18\x01 \x01(\x11\x42\x02\x18\x01\x12\x13\n\x07payload\x18\x02 \x01(\x0c\x42\x02\x18\x01\"\xa2\x01\n\x11HandshakeResponse\x12\x1b\n\x0fmetadata_header\x18\x01 \x01(\x0c\x42\x02\x18\x01\x12\x19\n\rsession_token\x18\x02 \x01(\x0c\x42\x02\x18\x01\x12(\n\x1atoken_deadline_time_millis\x18\x03 \x01(\x12\x42\x04\x18\x01\x30\x01\x12+\n\x1dtoken_expiration_delay_millis\x18\x04 \x01(\x12\x42\x04\x18\x01\x30\x01\"\x16\n\x14\x43loseSessionResponse\"G\n\x0eReleaseRequest\x12\x35\n\x02id\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\"\x11\n\x0fReleaseResponse\"\x8b\x01\n\rExportRequest\x12<\n\tsource_id\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\x12<\n\tresult_id\x18\x02 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\"\x10\n\x0e\x45xportResponse\"\x8c\x01\n\x0ePublishRequest\x12<\n\tsource_id\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\x12<\n\tresult_id\x18\x02 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\"\x11\n\x0fPublishResponse\"\x1b\n\x19\x45xportNotificationRequest\"\xb7\x03\n\x12\x45xportNotification\x12\x39\n\x06ticket\x18\x01 \x01(\x0b\x32).io.deephaven.proto.backplane.grpc.Ticket\x12Q\n\x0c\x65xport_state\x18\x02 \x01(\x0e\x32;.io.deephaven.proto.backplane.grpc.ExportNotification.State\x12\x0f\n\x07\x63ontext\x18\x03 \x01(\t\x12\x18\n\x10\x64\x65pendent_handle\x18\x04 \x01(\t\"\xe7\x01\n\x05State\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\x0e\n\nPUBLISHING\x10\x02\x12\n\n\x06QUEUED\x10\x03\x12\x0b\n\x07RUNNING\x10\x04\x12\x0c\n\x08\x45XPORTED\x10\x05\x12\x0c\n\x08RELEASED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x12\n\n\x06\x46\x41ILED\x10\x08\x12\x15\n\x11\x44\x45PENDENCY_FAILED\x10\t\x12\x1a\n\x16\x44\x45PENDENCY_NEVER_FOUND\x10\n\x12\x18\n\x14\x44\x45PENDENCY_CANCELLED\x10\x0b\x12\x17\n\x13\x44\x45PENDENCY_RELEASED\x10\x0c\" \n\x1eTerminationNotificationRequest\"\x97\x02\n\x1fTerminationNotificationResponse\x12\x1c\n\x14\x61\x62normal_termination\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\"\n\x1ais_from_uncaught_exception\x18\x03 \x01(\x08\x12\x63\n\x0cstack_traces\x18\x04 \x03(\x0b\x32M.io.deephaven.proto.backplane.grpc.TerminationNotificationResponse.StackTrace\x1a=\n\nStackTrace\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x10\n\x08\x65lements\x18\x03 \x03(\t2\xb9\x08\n\x0eSessionService\x12|\n\nNewSession\x12\x33.io.deephaven.proto.backplane.grpc.HandshakeRequest\x1a\x34.io.deephaven.proto.backplane.grpc.HandshakeResponse\"\x03\x88\x02\x01\x12\x85\x01\n\x13RefreshSessionToken\x12\x33.io.deephaven.proto.backplane.grpc.HandshakeRequest\x1a\x34.io.deephaven.proto.backplane.grpc.HandshakeResponse\"\x03\x88\x02\x01\x12~\n\x0c\x43loseSession\x12\x33.io.deephaven.proto.backplane.grpc.HandshakeRequest\x1a\x37.io.deephaven.proto.backplane.grpc.CloseSessionResponse\"\x00\x12r\n\x07Release\x12\x31.io.deephaven.proto.backplane.grpc.ReleaseRequest\x1a\x32.io.deephaven.proto.backplane.grpc.ReleaseResponse\"\x00\x12y\n\x10\x45xportFromTicket\x12\x30.io.deephaven.proto.backplane.grpc.ExportRequest\x1a\x31.io.deephaven.proto.backplane.grpc.ExportResponse\"\x00\x12|\n\x11PublishFromTicket\x12\x31.io.deephaven.proto.backplane.grpc.PublishRequest\x1a\x32.io.deephaven.proto.backplane.grpc.PublishResponse\"\x00\x12\x8e\x01\n\x13\x45xportNotifications\x12<.io.deephaven.proto.backplane.grpc.ExportNotificationRequest\x1a\x35.io.deephaven.proto.backplane.grpc.ExportNotification\"\x00\x30\x01\x12\xa2\x01\n\x17TerminationNotification\x12\x41.io.deephaven.proto.backplane.grpc.TerminationNotificationRequest\x1a\x42.io.deephaven.proto.backplane.grpc.TerminationNotificationResponse\"\x00\x42\x43H\x01P\x01Z=github.com/deephaven/deephaven-core/go/internal/proto/sessionb\x06proto3') _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'deephaven.proto.session_pb2', globals()) @@ -54,18 +54,22 @@ _EXPORTREQUEST._serialized_end=662 _EXPORTRESPONSE._serialized_start=664 _EXPORTRESPONSE._serialized_end=680 - _EXPORTNOTIFICATIONREQUEST._serialized_start=682 - _EXPORTNOTIFICATIONREQUEST._serialized_end=709 - _EXPORTNOTIFICATION._serialized_start=712 - _EXPORTNOTIFICATION._serialized_end=1151 - _EXPORTNOTIFICATION_STATE._serialized_start=920 - _EXPORTNOTIFICATION_STATE._serialized_end=1151 - _TERMINATIONNOTIFICATIONREQUEST._serialized_start=1153 - _TERMINATIONNOTIFICATIONREQUEST._serialized_end=1185 - _TERMINATIONNOTIFICATIONRESPONSE._serialized_start=1188 - _TERMINATIONNOTIFICATIONRESPONSE._serialized_end=1467 - _TERMINATIONNOTIFICATIONRESPONSE_STACKTRACE._serialized_start=1406 - _TERMINATIONNOTIFICATIONRESPONSE_STACKTRACE._serialized_end=1467 - _SESSIONSERVICE._serialized_start=1470 - _SESSIONSERVICE._serialized_end=2425 + _PUBLISHREQUEST._serialized_start=683 + _PUBLISHREQUEST._serialized_end=823 + _PUBLISHRESPONSE._serialized_start=825 + _PUBLISHRESPONSE._serialized_end=842 + _EXPORTNOTIFICATIONREQUEST._serialized_start=844 + _EXPORTNOTIFICATIONREQUEST._serialized_end=871 + _EXPORTNOTIFICATION._serialized_start=874 + _EXPORTNOTIFICATION._serialized_end=1313 + _EXPORTNOTIFICATION_STATE._serialized_start=1082 + _EXPORTNOTIFICATION_STATE._serialized_end=1313 + _TERMINATIONNOTIFICATIONREQUEST._serialized_start=1315 + _TERMINATIONNOTIFICATIONREQUEST._serialized_end=1347 + _TERMINATIONNOTIFICATIONRESPONSE._serialized_start=1350 + _TERMINATIONNOTIFICATIONRESPONSE._serialized_end=1629 + _TERMINATIONNOTIFICATIONRESPONSE_STACKTRACE._serialized_start=1568 + _TERMINATIONNOTIFICATIONRESPONSE_STACKTRACE._serialized_end=1629 + _SESSIONSERVICE._serialized_start=1632 + _SESSIONSERVICE._serialized_end=2713 # @@protoc_insertion_point(module_scope) diff --git a/py/client/pydeephaven/proto/session_pb2_grpc.py b/py/client/pydeephaven/proto/session_pb2_grpc.py index 929823e9cd7..d28aca2f134 100644 --- a/py/client/pydeephaven/proto/session_pb2_grpc.py +++ b/py/client/pydeephaven/proto/session_pb2_grpc.py @@ -53,6 +53,11 @@ def __init__(self, channel): request_serializer=deephaven_dot_proto_dot_session__pb2.ExportRequest.SerializeToString, response_deserializer=deephaven_dot_proto_dot_session__pb2.ExportResponse.FromString, ) + self.PublishFromTicket = channel.unary_unary( + '/io.deephaven.proto.backplane.grpc.SessionService/PublishFromTicket', + request_serializer=deephaven_dot_proto_dot_session__pb2.PublishRequest.SerializeToString, + response_deserializer=deephaven_dot_proto_dot_session__pb2.PublishResponse.FromString, + ) self.ExportNotifications = channel.unary_stream( '/io.deephaven.proto.backplane.grpc.SessionService/ExportNotifications', request_serializer=deephaven_dot_proto_dot_session__pb2.ExportNotificationRequest.SerializeToString, @@ -133,6 +138,15 @@ def ExportFromTicket(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def PublishFromTicket(self, request, context): + """ + Makes a copy from a source ticket and publishes to a result ticket. Neither the source ticket, nor the destination + ticket, need to be a client managed ticket. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def ExportNotifications(self, request, context): """ Establish a stream to manage all session exports, including those lost due to partially complete rpc calls. @@ -182,6 +196,11 @@ def add_SessionServiceServicer_to_server(servicer, server): request_deserializer=deephaven_dot_proto_dot_session__pb2.ExportRequest.FromString, response_serializer=deephaven_dot_proto_dot_session__pb2.ExportResponse.SerializeToString, ), + 'PublishFromTicket': grpc.unary_unary_rpc_method_handler( + servicer.PublishFromTicket, + request_deserializer=deephaven_dot_proto_dot_session__pb2.PublishRequest.FromString, + response_serializer=deephaven_dot_proto_dot_session__pb2.PublishResponse.SerializeToString, + ), 'ExportNotifications': grpc.unary_stream_rpc_method_handler( servicer.ExportNotifications, request_deserializer=deephaven_dot_proto_dot_session__pb2.ExportNotificationRequest.FromString, @@ -301,6 +320,23 @@ def ExportFromTicket(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def PublishFromTicket(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/io.deephaven.proto.backplane.grpc.SessionService/PublishFromTicket', + deephaven_dot_proto_dot_session__pb2.PublishRequest.SerializeToString, + deephaven_dot_proto_dot_session__pb2.PublishResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def ExportNotifications(request, target, diff --git a/server/src/main/java/io/deephaven/server/appmode/ApplicationTicketResolver.java b/server/src/main/java/io/deephaven/server/appmode/ApplicationTicketResolver.java index 7e87dc8fa4c..d9c10ed635c 100644 --- a/server/src/main/java/io/deephaven/server/appmode/ApplicationTicketResolver.java +++ b/server/src/main/java/io/deephaven/server/appmode/ApplicationTicketResolver.java @@ -82,7 +82,7 @@ private SessionState.ExportObject resolve(final AppFieldId id, final Stri throw Exceptions.statusRuntimeException(Code.NOT_FOUND, "Could not resolve '" + logId + "': field '" + getLogNameFor(id) + "' not found"); } - Object value = authTransformation.transform(field.value()); + Object value = authorization.transform(field.value()); // noinspection unchecked return SessionState.wrapAsExport((T) value); } @@ -105,7 +105,7 @@ public SessionState.ExportObject flightInfoFor( } Object value = field.value(); if (value instanceof Table) { - value = authTransformation.transform(value); + value = authorization.transform(value); info = TicketRouter.getFlightInfo((Table) value, descriptor, flightTicketForName(id.app, id.fieldName)); } else { throw Exceptions.statusRuntimeException(Code.NOT_FOUND, @@ -118,14 +118,20 @@ public SessionState.ExportObject flightInfoFor( @Override public SessionState.ExportBuilder publish( - SessionState session, ByteBuffer ticket, final String logId) { + final SessionState session, + final ByteBuffer ticket, + final String logId, + final Runnable onPublish) { throw Exceptions.statusRuntimeException(Code.FAILED_PRECONDITION, "Could not publish '" + logId + "': application tickets cannot be published to"); } @Override public SessionState.ExportBuilder publish( - final SessionState session, final Flight.FlightDescriptor descriptor, final String logId) { + final SessionState session, + final Flight.FlightDescriptor descriptor, + final String logId, + final Runnable onPublish) { throw Exceptions.statusRuntimeException(Code.FAILED_PRECONDITION, "Could not publish '" + logId + "': application flight descriptors cannot be published to"); } @@ -145,7 +151,7 @@ public void forAllFlightInfo(@Nullable SessionState session, Consumer { Object value = field.value(); if (value instanceof Table) { - value = authTransformation.transform(value); + value = authorization.transform(value); final Flight.FlightInfo info = TicketRouter.getFlightInfo((Table) value, descriptorForName(app, field.name()), flightTicketForName(app, field.name())); visitor.accept(info); diff --git a/server/src/main/java/io/deephaven/server/arrow/ArrowFlightUtil.java b/server/src/main/java/io/deephaven/server/arrow/ArrowFlightUtil.java index f0c4cfa07f3..3b33ad46e57 100644 --- a/server/src/main/java/io/deephaven/server/arrow/ArrowFlightUtil.java +++ b/server/src/main/java/io/deephaven/server/arrow/ArrowFlightUtil.java @@ -153,7 +153,7 @@ public void onNext(final InputStream request) { } else { flightDescriptor = mi.descriptor; resultExportBuilder = ticketRouter - .publish(session, mi.descriptor, "Flight.Descriptor") + .
publish(session, mi.descriptor, "Flight.Descriptor", null) .onError(observer); } } diff --git a/server/src/main/java/io/deephaven/server/auth/AllowAllAuthorizationProvider.java b/server/src/main/java/io/deephaven/server/auth/AllowAllAuthorizationProvider.java index aacce4a77e3..cd50daaf4c8 100644 --- a/server/src/main/java/io/deephaven/server/auth/AllowAllAuthorizationProvider.java +++ b/server/src/main/java/io/deephaven/server/auth/AllowAllAuthorizationProvider.java @@ -15,7 +15,8 @@ import io.deephaven.auth.codegen.impl.SessionServiceAuthWiring; import io.deephaven.auth.codegen.impl.StorageServiceAuthWiring; import io.deephaven.auth.codegen.impl.TableServiceContextualAuthWiring; -import io.deephaven.server.session.TicketResolverBase; +import io.deephaven.server.session.NoopTicketResolverAuthorization; +import io.deephaven.server.session.TicketResolver; import javax.inject.Inject; @@ -83,8 +84,8 @@ public HierarchicalTableServiceContextualAuthWiring getHierarchicalTableServiceC } @Override - public TicketResolverBase.AuthTransformation getTicketTransformation() { - return TicketResolverBase.identityTransformation(); + public TicketResolver.Authorization getTicketResolverAuthorization() { + return new NoopTicketResolverAuthorization(); } @Override diff --git a/server/src/main/java/io/deephaven/server/auth/AuthorizationProvider.java b/server/src/main/java/io/deephaven/server/auth/AuthorizationProvider.java index 52ca62f1320..82823cb09cd 100644 --- a/server/src/main/java/io/deephaven/server/auth/AuthorizationProvider.java +++ b/server/src/main/java/io/deephaven/server/auth/AuthorizationProvider.java @@ -2,7 +2,7 @@ import io.deephaven.auth.AuthContext; import io.deephaven.auth.codegen.impl.*; -import io.deephaven.server.session.TicketResolverBase; +import io.deephaven.server.session.TicketResolver; public interface AuthorizationProvider { /** @@ -61,9 +61,9 @@ public interface AuthorizationProvider { HierarchicalTableServiceContextualAuthWiring getHierarchicalTableServiceContextualAuthWiring(); /** - * @return the authorization transformation used when resolving tickets + * @return the authorization provider for TicketResolvers; used when resolving from, and publishing to, tickets */ - TicketResolverBase.AuthTransformation getTicketTransformation(); + TicketResolver.Authorization getTicketResolverAuthorization(); /** * @return the default auth context to use during start-up and in other non-interactive contexts diff --git a/server/src/main/java/io/deephaven/server/console/ScopeTicketResolver.java b/server/src/main/java/io/deephaven/server/console/ScopeTicketResolver.java index b8594dc28f2..585b5534b67 100644 --- a/server/src/main/java/io/deephaven/server/console/ScopeTicketResolver.java +++ b/server/src/main/java/io/deephaven/server/console/ScopeTicketResolver.java @@ -67,7 +67,7 @@ public SessionState.ExportObject flightInfoFor( "Could not resolve '" + logId + ": no variable exists with name '" + scopeName + "'"); } if (scopeVar instanceof Table) { - scopeVar = authTransformation.transform(scopeVar); + scopeVar = authorization.transform(scopeVar); return TicketRouter.getFlightInfo((Table) scopeVar, descriptor, flightTicketForName(scopeName)); } @@ -114,7 +114,7 @@ private SessionState.ExportObject resolve( return scopeVar; }); - export = authTransformation.transform(export); + export = authorization.transform(export); if (export == null) { return SessionState.wrapAsFailedExport(Exceptions.statusRuntimeException(Code.FAILED_PRECONDITION, @@ -126,18 +126,27 @@ private SessionState.ExportObject resolve( @Override public SessionState.ExportBuilder publish( - final SessionState session, final ByteBuffer ticket, final String logId) { - return publish(session, nameForTicket(ticket, logId), logId); + final SessionState session, + final ByteBuffer ticket, + final String logId, + @Nullable final Runnable onPublish) { + return publish(session, nameForTicket(ticket, logId), logId, onPublish); } @Override public SessionState.ExportBuilder publish( - final SessionState session, final Flight.FlightDescriptor descriptor, final String logId) { - return publish(session, nameForDescriptor(descriptor, logId), logId); + final SessionState session, + final Flight.FlightDescriptor descriptor, + final String logId, + @Nullable final Runnable onPublish) { + return publish(session, nameForDescriptor(descriptor, logId), logId, onPublish); } private SessionState.ExportBuilder publish( - final SessionState session, final String varName, final String logId) { + final SessionState session, + final String varName, + final String logId, + @Nullable final Runnable onPublish) { // We publish to the query scope after the client finishes publishing their result. We accomplish this by // directly depending on the result of this export builder. final SessionState.ExportBuilder resultBuilder = session.nonExport(); @@ -154,6 +163,9 @@ private SessionState.ExportBuilder publish( gss.manage((LivenessReferent) value); } gss.setVariable(varName, value); + if (onPublish != null) { + onPublish.run(); + } }); return resultBuilder; diff --git a/server/src/main/java/io/deephaven/server/hierarchicaltable/HierarchicalTableServiceGrpcImpl.java b/server/src/main/java/io/deephaven/server/hierarchicaltable/HierarchicalTableServiceGrpcImpl.java index 4fce40014bd..2c545a40417 100644 --- a/server/src/main/java/io/deephaven/server/hierarchicaltable/HierarchicalTableServiceGrpcImpl.java +++ b/server/src/main/java/io/deephaven/server/hierarchicaltable/HierarchicalTableServiceGrpcImpl.java @@ -27,10 +27,7 @@ import io.deephaven.server.auth.AuthorizationProvider; import io.deephaven.server.grpc.Common; import io.deephaven.server.grpc.GrpcErrorHelper; -import io.deephaven.server.session.SessionService; -import io.deephaven.server.session.SessionState; -import io.deephaven.server.session.TicketResolverBase; -import io.deephaven.server.session.TicketRouter; +import io.deephaven.server.session.*; import io.deephaven.server.table.ops.AggregationAdapter; import io.deephaven.server.table.ops.FilterTableGrpcImpl; import io.deephaven.server.table.ops.filter.FilterFactory; @@ -55,7 +52,7 @@ public class HierarchicalTableServiceGrpcImpl extends HierarchicalTableServiceGr private final TicketRouter ticketRouter; private final SessionService sessionService; private final HierarchicalTableServiceContextualAuthWiring authWiring; - private final TicketResolverBase.AuthTransformation authTransformation; + private final TicketResolver.Authorization authTransformation; @Inject public HierarchicalTableServiceGrpcImpl( @@ -65,7 +62,7 @@ public HierarchicalTableServiceGrpcImpl( this.ticketRouter = ticketRouter; this.sessionService = sessionService; this.authWiring = authorizationProvider.getHierarchicalTableServiceContextualAuthWiring(); - this.authTransformation = authorizationProvider.getTicketTransformation(); + this.authTransformation = authorizationProvider.getTicketResolverAuthorization(); } @Override diff --git a/server/src/main/java/io/deephaven/server/partitionedtable/PartitionedTableServiceGrpcImpl.java b/server/src/main/java/io/deephaven/server/partitionedtable/PartitionedTableServiceGrpcImpl.java index 8cc9b6011f0..91effc96849 100644 --- a/server/src/main/java/io/deephaven/server/partitionedtable/PartitionedTableServiceGrpcImpl.java +++ b/server/src/main/java/io/deephaven/server/partitionedtable/PartitionedTableServiceGrpcImpl.java @@ -17,10 +17,7 @@ import io.deephaven.proto.backplane.grpc.PartitionedTableServiceGrpc; import io.deephaven.proto.util.Exceptions; import io.deephaven.server.auth.AuthorizationProvider; -import io.deephaven.server.session.SessionService; -import io.deephaven.server.session.SessionState; -import io.deephaven.server.session.TicketResolverBase; -import io.deephaven.server.session.TicketRouter; +import io.deephaven.server.session.*; import io.grpc.stub.StreamObserver; import org.jetbrains.annotations.NotNull; @@ -38,7 +35,7 @@ public class PartitionedTableServiceGrpcImpl extends PartitionedTableServiceGrpc private final TicketRouter ticketRouter; private final SessionService sessionService; private final PartitionedTableServiceContextualAuthWiring authWiring; - private final TicketResolverBase.AuthTransformation authorizationTransformation; + private final TicketResolver.Authorization authorizationTransformation; @Inject public PartitionedTableServiceGrpcImpl( @@ -49,7 +46,7 @@ public PartitionedTableServiceGrpcImpl( this.ticketRouter = ticketRouter; this.sessionService = sessionService; this.authWiring = authWiring; - this.authorizationTransformation = authorizationProvider.getTicketTransformation(); + this.authorizationTransformation = authorizationProvider.getTicketResolverAuthorization(); } @Override diff --git a/server/src/main/java/io/deephaven/server/session/ExportTicketResolver.java b/server/src/main/java/io/deephaven/server/session/ExportTicketResolver.java index 6214b36cab0..126d1fba760 100644 --- a/server/src/main/java/io/deephaven/server/session/ExportTicketResolver.java +++ b/server/src/main/java/io/deephaven/server/session/ExportTicketResolver.java @@ -88,13 +88,33 @@ public SessionState.ExportObject resolve( @Override public SessionState.ExportBuilder publish( - final SessionState session, final ByteBuffer ticket, final String logId) { - return session.newExport(ExportTicketHelper.ticketToExportId(ticket, logId)); + final SessionState session, + final ByteBuffer ticket, + final String logId, + @Nullable final Runnable onPublish) { + final SessionState.ExportBuilder toPublish = + session.newExport(ExportTicketHelper.ticketToExportId(ticket, logId)); + if (onPublish != null) { + session.nonExport() + .require(toPublish.getExport()) + .submit(onPublish); + } + return toPublish; } @Override public SessionState.ExportBuilder publish( - final SessionState session, final Flight.FlightDescriptor descriptor, final String logId) { - return session.newExport(FlightExportTicketHelper.descriptorToExportId(descriptor, logId)); + final SessionState session, + final Flight.FlightDescriptor descriptor, + final String logId, + @Nullable final Runnable onPublish) { + final SessionState.ExportBuilder toPublish = + session.newExport(FlightExportTicketHelper.descriptorToExportId(descriptor, logId)); + if (onPublish != null) { + session.nonExport() + .require(toPublish.getExport()) + .submit(onPublish); + } + return toPublish; } } diff --git a/server/src/main/java/io/deephaven/server/session/NoopTicketResolverAuthorization.java b/server/src/main/java/io/deephaven/server/session/NoopTicketResolverAuthorization.java new file mode 100644 index 00000000000..81c67c47656 --- /dev/null +++ b/server/src/main/java/io/deephaven/server/session/NoopTicketResolverAuthorization.java @@ -0,0 +1,22 @@ +package io.deephaven.server.session; + +import org.apache.arrow.flight.impl.Flight; + +import java.nio.ByteBuffer; + +public class NoopTicketResolverAuthorization implements TicketResolver.Authorization { + @Override + public T transform(T source) { + return source; + } + + @Override + public void authorizePublishRequest(TicketResolver ticketResolver, ByteBuffer ticket) { + // always allowed + } + + @Override + public void authorizePublishRequest(TicketResolver ticketResolver, Flight.FlightDescriptor descriptor) { + // always allowed + } +} diff --git a/server/src/main/java/io/deephaven/server/session/SessionServiceGrpcImpl.java b/server/src/main/java/io/deephaven/server/session/SessionServiceGrpcImpl.java index 7e0dc6e8d3c..cd4ce627a59 100644 --- a/server/src/main/java/io/deephaven/server/session/SessionServiceGrpcImpl.java +++ b/server/src/main/java/io/deephaven/server/session/SessionServiceGrpcImpl.java @@ -171,11 +171,43 @@ public void exportFromTicket( .require(source) .onError(responseObserver) .submit(() -> { + final Object o = source.get(); GrpcUtil.safelyComplete(responseObserver, ExportResponse.getDefaultInstance()); - return source.get(); + return o; }); } + @Override + public void publishFromTicket( + @NotNull final PublishRequest request, + @NotNull final StreamObserver responseObserver) { + final SessionState session = service.getCurrentSession(); + + if (!request.hasSourceId()) { + responseObserver + .onError(Exceptions.statusRuntimeException(Code.INVALID_ARGUMENT, "Source ticket not supplied")); + return; + } + if (!request.hasResultId()) { + responseObserver + .onError(Exceptions.statusRuntimeException(Code.INVALID_ARGUMENT, "Result ticket not supplied")); + return; + } + + final SessionState.ExportObject source = ticketRouter.resolve( + session, request.getSourceId(), "sourceId"); + Ticket resultId = request.getResultId(); + + final SessionState.ExportBuilder publisher = ticketRouter.publish( + session, resultId, "resultId", () -> { + // when publish is complete, complete the gRPC request + GrpcUtil.safelyComplete(responseObserver, PublishResponse.getDefaultInstance()); + }); + publisher.require(source) + .onError(responseObserver) + .submit(source::get); + } + @Override public void exportNotifications( @NotNull final ExportNotificationRequest request, diff --git a/server/src/main/java/io/deephaven/server/session/TicketResolver.java b/server/src/main/java/io/deephaven/server/session/TicketResolver.java index 9e12ee608e2..bb6d757d845 100644 --- a/server/src/main/java/io/deephaven/server/session/TicketResolver.java +++ b/server/src/main/java/io/deephaven/server/session/TicketResolver.java @@ -3,6 +3,9 @@ */ package io.deephaven.server.session; +import io.deephaven.engine.context.ExecutionContext; +import io.deephaven.engine.table.PartitionedTable; +import io.deephaven.engine.table.Table; import org.apache.arrow.flight.impl.Flight; import org.jetbrains.annotations.Nullable; @@ -10,6 +13,48 @@ import java.util.function.Consumer; public interface TicketResolver { + interface Authorization { + /** + * Implementations must type check the provided source as any type of object can be stored in an export. + *

+ * + * @apiNote Types typically encountered are {@link Table} and {@link PartitionedTable}. Perform an identity + * mapping for any types that you do not wish to transform. This method should not error. + * Implementations may wish to query {@link ExecutionContext#getAuthContext()} to apply user-specific + * transformations to requested resources. + * + * @param source the object to transform (such as by applying ACLs) + * @return an object that has been sanitized to be used by the current user + */ + T transform(T source); + + /** + * Implementations must validate that the provided ticket is authorized for the current user. + *

+ * + * @apiNote Implementations may wish to query {@link ExecutionContext#getAuthContext()} to apply user-specific + * transformations to requested resources. + * + * @param ticketResolver the ticket resolver + * @param ticket the ticket to publish to as a byte buffer; note that the first byte is the route + * @throws io.grpc.StatusRuntimeException if the user is not authorized + */ + void authorizePublishRequest(TicketResolver ticketResolver, ByteBuffer ticket); + + /** + * Implementations must validate that the provided ticket is authorized for the current user. + *

+ * + * @apiNote Implementations may wish to query {@link ExecutionContext#getAuthContext()} to apply user-specific + * transformations to requested resources. + * + * @param ticketResolver the ticket resolver + * @param descriptor the flight descriptor to publish to; note that the first path element is the route + * @throws io.grpc.StatusRuntimeException if the user is not authorized + */ + void authorizePublishRequest(TicketResolver ticketResolver, Flight.FlightDescriptor descriptor); + } + /** * @return the single byte prefix used as a route on the ticket */ @@ -49,29 +94,34 @@ SessionState.ExportObject resolve(@Nullable SessionState session, Flight. /** * Publish a new result as a flight ticket to an export object future. * + *

* The user must call {@link SessionState.ExportBuilder#submit} to publish the result value. * * @param session the user session context * @param ticket (as ByteByffer) the ticket to publish to * @param logId an end-user friendly identification of the ticket should an error occur + * @param onPublish an optional callback to invoke when the result is published * @param the type of the result the export will publish * @return an export object; see {@link SessionState} for lifecycle propagation details */ - SessionState.ExportBuilder publish(SessionState session, ByteBuffer ticket, final String logId); + SessionState.ExportBuilder publish( + SessionState session, ByteBuffer ticket, final String logId, @Nullable Runnable onPublish); /** * Publish a new result as a flight descriptor to an export object future. * + *

* The user must call {@link SessionState.ExportBuilder#submit} to publish the result value. * * @param session the user session context * @param descriptor (as Flight.Descriptor) the descriptor to publish to * @param logId an end-user friendly identification of the ticket should an error occur + * @param onPublish an optional callback to invoke when the result is published * @param the type of the result the export will publish * @return an export object; see {@link SessionState} for lifecycle propagation details */ - SessionState.ExportBuilder publish(SessionState session, Flight.FlightDescriptor descriptor, - final String logId); + SessionState.ExportBuilder publish( + SessionState session, Flight.FlightDescriptor descriptor, final String logId, @Nullable Runnable onPublish); /** * Retrieve a FlightInfo for a given FlightDescriptor. diff --git a/server/src/main/java/io/deephaven/server/session/TicketResolverBase.java b/server/src/main/java/io/deephaven/server/session/TicketResolverBase.java index aa42308dc09..0e0fb54d65a 100644 --- a/server/src/main/java/io/deephaven/server/session/TicketResolverBase.java +++ b/server/src/main/java/io/deephaven/server/session/TicketResolverBase.java @@ -3,51 +3,18 @@ */ package io.deephaven.server.session; -import io.deephaven.engine.context.ExecutionContext; -import io.deephaven.engine.table.Table; -import io.deephaven.engine.table.PartitionedTable; import io.deephaven.server.auth.AuthorizationProvider; public abstract class TicketResolverBase implements TicketResolver { - @FunctionalInterface - public interface AuthTransformation { - /** - * Implementations must type check the provided source as any type of object can be stored in an export. - *

- * - * @apiNote Types typically encountered are {@link Table} and {@link PartitionedTable}. Perform an identity - * mapping for any types that you do not wish to transform. This method should not error. - * Implementations may wish to query {@link ExecutionContext#getAuthContext()} to apply user-specific - * transformations to requested resources. - * - * @param source the object to transform (such as by applying ACLs) - * @return an object that has been sanitized to be used by the current user - */ - T transform(T source); - } - - public enum IdentityTransformation implements AuthTransformation { - INSTANCE; - - @Override - public T transform(T source) { - return source; - } - } - - public static AuthTransformation identityTransformation() { - return IdentityTransformation.INSTANCE; - } - - protected final AuthTransformation authTransformation; + protected final Authorization authorization; private final byte ticketPrefix; private final String flightDescriptorRoute; public TicketResolverBase( final AuthorizationProvider authProvider, final byte ticketPrefix, final String flightDescriptorRoute) { - this.authTransformation = authProvider.getTicketTransformation(); + this.authorization = authProvider.getTicketResolverAuthorization(); this.ticketPrefix = ticketPrefix; this.flightDescriptorRoute = flightDescriptorRoute; } diff --git a/server/src/main/java/io/deephaven/server/session/TicketRouter.java b/server/src/main/java/io/deephaven/server/session/TicketRouter.java index 4e5c4e7a617..b867ca67504 100644 --- a/server/src/main/java/io/deephaven/server/session/TicketRouter.java +++ b/server/src/main/java/io/deephaven/server/session/TicketRouter.java @@ -12,6 +12,7 @@ import io.deephaven.hash.KeyedObjectKey; import io.deephaven.proto.backplane.grpc.Ticket; import io.deephaven.proto.util.Exceptions; +import io.deephaven.server.auth.AuthorizationProvider; import org.apache.arrow.flight.impl.Flight; import org.jetbrains.annotations.Nullable; @@ -28,11 +29,22 @@ public class TicketRouter { private final KeyedObjectHashMap descriptorResolverMap = new KeyedObjectHashMap<>(RESOLVER_OBJECT_DESCRIPTOR_ID); + private final TicketResolver.Authorization authorization; + @Inject - public TicketRouter(final Set resolvers) { + public TicketRouter( + final AuthorizationProvider authorizationProvider, + final Set resolvers) { + this.authorization = authorizationProvider.getTicketResolverAuthorization(); resolvers.forEach(resolver -> { - byteResolverMap.add(resolver); - descriptorResolverMap.add(resolver); + if (!byteResolverMap.add(resolver)) { + throw new IllegalArgumentException("Duplicate ticket resolver for ticket route " + + resolver.ticketRoute()); + } + if (!descriptorResolverMap.add(resolver)) { + throw new IllegalArgumentException("Duplicate ticket resolver for descriptor route " + + resolver.flightDescriptorRoute()); + } }); } @@ -107,55 +119,91 @@ public SessionState.ExportObject resolve( /** * Publish a new result as a flight ticket to an export object future. * + *

* The user must call {@link SessionState.ExportBuilder#submit} to publish the result value. * * @param session the user session context * @param ticket (as ByteByffer) the ticket to publish to * @param logId an end-user friendly identification of the ticket should an error occur + * @param onPublish an optional callback to invoke when the result is published * @param the type of the result the export will publish * @return an export object; see {@link SessionState} for lifecycle propagation details */ public SessionState.ExportBuilder publish( final SessionState session, final ByteBuffer ticket, - final String logId) { - return getResolver(ticket.get(ticket.position()), logId).publish(session, ticket, logId); + final String logId, + @Nullable final Runnable onPublish) { + final TicketResolver resolver = getResolver(ticket.get(ticket.position()), logId); + authorization.authorizePublishRequest(resolver, ticket); + return resolver.publish(session, ticket, logId, onPublish); } /** * Publish a new result as a flight ticket to an export object future. * + *

* The user must call {@link SessionState.ExportBuilder#submit} to publish the result value. * * @param session the user session context * @param ticket (as Flight.Ticket) the ticket to publish to * @param logId an end-user friendly identification of the ticket should an error occur + * @param onPublish an optional callback to invoke when the result is published * @param the type of the result the export will publish * @return an export object; see {@link SessionState} for lifecycle propagation details */ public SessionState.ExportBuilder publish( final SessionState session, final Flight.Ticket ticket, - final String logId) { - return publish(session, ticket.getTicket().asReadOnlyByteBuffer(), logId); + final String logId, + @Nullable final Runnable onPublish) { + // note this impl is an internal delegation; defer the authorization check, too + return publish(session, ticket.getTicket().asReadOnlyByteBuffer(), logId, onPublish); + } + + /** + * Publish a new result as a flight ticket to an export object future. + * + *

+ * The user must call {@link SessionState.ExportBuilder#submit} to publish the result value. + * + * @param session the user session context + * @param ticket the ticket to publish to + * @param logId an end-user friendly identification of the ticket should an error occur + * @param onPublish an optional callback to invoke when the result is published + * @param the type of the result the export will publish + * @return an export object; see {@link SessionState} for lifecycle propagation details + */ + public SessionState.ExportBuilder publish( + final SessionState session, + final Ticket ticket, + final String logId, + @Nullable final Runnable onPublish) { + // note this impl is an internal delegation; defer the authorization check, too + return publish(session, ticket.getTicket().asReadOnlyByteBuffer(), logId, onPublish); } /** * Publish a new result as a flight descriptor to an export object future. * + *

* The user must call {@link SessionState.ExportBuilder#submit} to publish the result value. * * @param session the user session context * @param descriptor (as Flight.Descriptor) the descriptor to publish to * @param logId an end-user friendly identification of the ticket should an error occur + * @param onPublish an optional callback to invoke when the result is published * @param the type of the result the export will publish * @return an export object; see {@link SessionState} for lifecycle propagation details */ public SessionState.ExportBuilder publish( final SessionState session, final Flight.FlightDescriptor descriptor, - final String logId) { - return getResolver(descriptor, logId).publish(session, descriptor, logId); + final String logId, + @Nullable final Runnable onPublish) { + final TicketResolver resolver = getResolver(descriptor, logId); + authorization.authorizePublishRequest(resolver, descriptor); + return resolver.publish(session, descriptor, logId, onPublish); } /** diff --git a/server/test/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java b/server/test/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java index a4a373abbdb..7e5afd9bda0 100644 --- a/server/test/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java +++ b/server/test/src/main/java/io/deephaven/server/test/FlightMessageRoundTripTest.java @@ -49,11 +49,7 @@ import io.deephaven.server.auth.AuthorizationProvider; import io.deephaven.server.console.ScopeTicketResolver; import io.deephaven.server.runner.GrpcServer; -import io.deephaven.server.session.SessionService; -import io.deephaven.server.session.SessionServiceGrpcImpl; -import io.deephaven.server.session.SessionState; -import io.deephaven.server.session.TicketResolver; -import io.deephaven.server.session.TicketResolverBase; +import io.deephaven.server.session.*; import io.deephaven.server.test.TestAuthModule.FakeBearer; import io.deephaven.server.util.Scheduler; import io.deephaven.util.SafeCloseable; @@ -68,10 +64,8 @@ import org.apache.arrow.flight.impl.Flight; import org.apache.arrow.memory.ArrowBuf; import org.apache.arrow.memory.RootAllocator; -import org.apache.arrow.vector.FieldVector; import org.apache.arrow.vector.VectorSchemaRoot; import org.apache.arrow.vector.complex.ListVector; -import org.apache.arrow.vector.types.Types; import org.apache.arrow.vector.types.pojo.ArrowType; import org.apache.arrow.vector.types.pojo.Field; import org.apache.arrow.vector.types.pojo.Schema; @@ -804,7 +798,7 @@ public void testAuthTicketTransformer() throws Exception { final String resultTableName = tableName + "Result"; final Table table = TableTools.emptyTable(10).update("I = i", "J = i + 0.01"); final MutableInt numTransforms = new MutableInt(); - component.authorizationProvider().delegateTicketTransformation = new TicketResolverBase.AuthTransformation() { + component.authorizationProvider().delegateTicketTransformation = new NoopTicketResolverAuthorization() { @Override public T transform(T source) { numTransforms.increment(); diff --git a/server/test/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java b/server/test/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java index 868e6012686..224a44c150c 100644 --- a/server/test/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java +++ b/server/test/src/main/java/io/deephaven/server/test/TestAuthorizationProvider.java @@ -3,7 +3,10 @@ import io.deephaven.auth.AuthContext; import io.deephaven.auth.codegen.impl.*; import io.deephaven.server.auth.AuthorizationProvider; -import io.deephaven.server.session.TicketResolverBase; +import io.deephaven.server.session.TicketResolver; +import org.apache.arrow.flight.impl.Flight; + +import java.nio.ByteBuffer; public class TestAuthorizationProvider implements AuthorizationProvider { private final ApplicationServiceAuthWiring.TestUseOnly applicationServiceAuthWiring = @@ -29,7 +32,7 @@ public class TestAuthorizationProvider implements AuthorizationProvider { private final HierarchicalTableServiceContextualAuthWiring.TestUseOnly hierarchicalTableServiceContextualAuthWiring = new HierarchicalTableServiceContextualAuthWiring.TestUseOnly(); - public TicketResolverBase.AuthTransformation delegateTicketTransformation; + public TicketResolver.Authorization delegateTicketTransformation; @Override public ApplicationServiceAuthWiring.TestUseOnly getApplicationServiceAuthWiring() { @@ -87,15 +90,30 @@ public HierarchicalTableServiceContextualAuthWiring.TestUseOnly getHierarchicalT } @Override - public TicketResolverBase.AuthTransformation getTicketTransformation() { - return new TicketResolverBase.AuthTransformation() { + public TicketResolver.Authorization getTicketResolverAuthorization() { + return new TicketResolver.Authorization() { @Override - public T transform(T source) { + public T transform(final T source) { if (delegateTicketTransformation != null) { return delegateTicketTransformation.transform(source); } return source; } + + @Override + public void authorizePublishRequest(final TicketResolver ticketResolver, final ByteBuffer ticket) { + if (delegateTicketTransformation != null) { + delegateTicketTransformation.authorizePublishRequest(ticketResolver, ticket); + } + } + + @Override + public void authorizePublishRequest(final TicketResolver ticketResolver, + final Flight.FlightDescriptor descriptor) { + if (delegateTicketTransformation != null) { + delegateTicketTransformation.authorizePublishRequest(ticketResolver, descriptor); + } + } }; } diff --git a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishRequest.java b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishRequest.java new file mode 100644 index 00000000000..976ab550f4d --- /dev/null +++ b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishRequest.java @@ -0,0 +1,206 @@ +package io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb; + +import elemental2.core.Uint8Array; +import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.ticket_pb.Ticket; +import jsinterop.annotations.JsOverlay; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsProperty; +import jsinterop.annotations.JsType; +import jsinterop.base.Js; +import jsinterop.base.JsPropertyMap; + +@JsType( + isNative = true, + name = "dhinternal.io.deephaven.proto.session_pb.PublishRequest", + namespace = JsPackage.GLOBAL) +public class PublishRequest { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface ToObjectReturnType { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface SourceIdFieldType { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface GetTicketUnionType { + @JsOverlay + static PublishRequest.ToObjectReturnType.SourceIdFieldType.GetTicketUnionType of(Object o) { + return Js.cast(o); + } + + @JsOverlay + default String asString() { + return Js.asString(this); + } + + @JsOverlay + default Uint8Array asUint8Array() { + return Js.cast(this); + } + + @JsOverlay + default boolean isString() { + return (Object) this instanceof String; + } + + @JsOverlay + default boolean isUint8Array() { + return (Object) this instanceof Uint8Array; + } + } + + @JsOverlay + static PublishRequest.ToObjectReturnType.SourceIdFieldType create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + PublishRequest.ToObjectReturnType.SourceIdFieldType.GetTicketUnionType getTicket(); + + @JsProperty + void setTicket(PublishRequest.ToObjectReturnType.SourceIdFieldType.GetTicketUnionType ticket); + + @JsOverlay + default void setTicket(String ticket) { + setTicket( + Js.uncheckedCast( + ticket)); + } + + @JsOverlay + default void setTicket(Uint8Array ticket) { + setTicket( + Js.uncheckedCast( + ticket)); + } + } + + @JsOverlay + static PublishRequest.ToObjectReturnType create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + Object getResultId(); + + @JsProperty + PublishRequest.ToObjectReturnType.SourceIdFieldType getSourceId(); + + @JsProperty + void setResultId(Object resultId); + + @JsProperty + void setSourceId(PublishRequest.ToObjectReturnType.SourceIdFieldType sourceId); + } + + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface ToObjectReturnType0 { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface SourceIdFieldType { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface GetTicketUnionType { + @JsOverlay + static PublishRequest.ToObjectReturnType0.SourceIdFieldType.GetTicketUnionType of( + Object o) { + return Js.cast(o); + } + + @JsOverlay + default String asString() { + return Js.asString(this); + } + + @JsOverlay + default Uint8Array asUint8Array() { + return Js.cast(this); + } + + @JsOverlay + default boolean isString() { + return (Object) this instanceof String; + } + + @JsOverlay + default boolean isUint8Array() { + return (Object) this instanceof Uint8Array; + } + } + + @JsOverlay + static PublishRequest.ToObjectReturnType0.SourceIdFieldType create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + PublishRequest.ToObjectReturnType0.SourceIdFieldType.GetTicketUnionType getTicket(); + + @JsProperty + void setTicket( + PublishRequest.ToObjectReturnType0.SourceIdFieldType.GetTicketUnionType ticket); + + @JsOverlay + default void setTicket(String ticket) { + setTicket( + Js.uncheckedCast( + ticket)); + } + + @JsOverlay + default void setTicket(Uint8Array ticket) { + setTicket( + Js.uncheckedCast( + ticket)); + } + } + + @JsOverlay + static PublishRequest.ToObjectReturnType0 create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + Object getResultId(); + + @JsProperty + PublishRequest.ToObjectReturnType0.SourceIdFieldType getSourceId(); + + @JsProperty + void setResultId(Object resultId); + + @JsProperty + void setSourceId(PublishRequest.ToObjectReturnType0.SourceIdFieldType sourceId); + } + + public static native PublishRequest deserializeBinary(Uint8Array bytes); + + public static native PublishRequest deserializeBinaryFromReader( + PublishRequest message, Object reader); + + public static native void serializeBinaryToWriter(PublishRequest message, Object writer); + + public static native PublishRequest.ToObjectReturnType toObject( + boolean includeInstance, PublishRequest msg); + + public native void clearResultId(); + + public native void clearSourceId(); + + public native Ticket getResultId(); + + public native Ticket getSourceId(); + + public native boolean hasResultId(); + + public native boolean hasSourceId(); + + public native Uint8Array serializeBinary(); + + public native void setResultId(); + + public native void setResultId(Ticket value); + + public native void setSourceId(); + + public native void setSourceId(Ticket value); + + public native PublishRequest.ToObjectReturnType0 toObject(); + + public native PublishRequest.ToObjectReturnType0 toObject(boolean includeInstance); +} diff --git a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishResponse.java b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishResponse.java new file mode 100644 index 00000000000..c3958f59916 --- /dev/null +++ b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb/PublishResponse.java @@ -0,0 +1,26 @@ +package io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb; + +import elemental2.core.Uint8Array; +import jsinterop.annotations.JsPackage; +import jsinterop.annotations.JsType; + +@JsType( + isNative = true, + name = "dhinternal.io.deephaven.proto.session_pb.PublishResponse", + namespace = JsPackage.GLOBAL) +public class PublishResponse { + public static native PublishResponse deserializeBinary(Uint8Array bytes); + + public static native PublishResponse deserializeBinaryFromReader( + PublishResponse message, Object reader); + + public static native void serializeBinaryToWriter(PublishResponse message, Object writer); + + public static native Object toObject(boolean includeInstance, PublishResponse msg); + + public native Uint8Array serializeBinary(); + + public native Object toObject(); + + public native Object toObject(boolean includeInstance); +} diff --git a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionService.java b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionService.java index 8ce938a79e1..b14e5308668 100644 --- a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionService.java +++ b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionService.java @@ -191,6 +191,50 @@ static SessionService.NewSessionType create() { void setService(Object service); } + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface PublishFromTicketType { + @JsOverlay + static SessionService.PublishFromTicketType create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + String getMethodName(); + + @JsProperty + Object getRequestType(); + + @JsProperty + Object getResponseType(); + + @JsProperty + Object getService(); + + @JsProperty + boolean isRequestStream(); + + @JsProperty + boolean isResponseStream(); + + @JsProperty + void setMethodName(String methodName); + + @JsProperty + void setRequestStream(boolean requestStream); + + @JsProperty + void setRequestType(Object requestType); + + @JsProperty + void setResponseStream(boolean responseStream); + + @JsProperty + void setResponseType(Object responseType); + + @JsProperty + void setService(Object service); + } + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) public interface RefreshSessionTokenType { @JsOverlay @@ -327,6 +371,7 @@ static SessionService.TerminationNotificationType create() { public static SessionService.ExportFromTicketType ExportFromTicket; public static SessionService.ExportNotificationsType ExportNotifications; public static SessionService.NewSessionType NewSession; + public static SessionService.PublishFromTicketType PublishFromTicket; public static SessionService.RefreshSessionTokenType RefreshSessionToken; public static SessionService.ReleaseType Release; public static SessionService.TerminationNotificationType TerminationNotification; diff --git a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionServiceClient.java b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionServiceClient.java index edbf26870d6..06840fee9c7 100644 --- a/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionServiceClient.java +++ b/web/client-backplane/src/main/java/io/deephaven/javascript/proto/dhinternal/io/deephaven/proto/session_pb_service/SessionServiceClient.java @@ -11,6 +11,8 @@ import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.ExportResponse; import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.HandshakeRequest; import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.HandshakeResponse; +import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.PublishRequest; +import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.PublishResponse; import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.ReleaseRequest; import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.ReleaseResponse; import io.deephaven.javascript.proto.dhinternal.io.deephaven.proto.session_pb.TerminationNotificationRequest; @@ -301,6 +303,97 @@ default boolean isNewSessionMetadata_or_callbackFn() { } } + @JsFunction + public interface PublishFromTicketCallbackFn { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface P0Type { + @JsOverlay + static SessionServiceClient.PublishFromTicketCallbackFn.P0Type create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + double getCode(); + + @JsProperty + String getMessage(); + + @JsProperty + BrowserHeaders getMetadata(); + + @JsProperty + void setCode(double code); + + @JsProperty + void setMessage(String message); + + @JsProperty + void setMetadata(BrowserHeaders metadata); + } + + void onInvoke(SessionServiceClient.PublishFromTicketCallbackFn.P0Type p0, PublishResponse p1); + } + + @JsFunction + public interface PublishFromTicketMetadata_or_callbackFn { + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface P0Type { + @JsOverlay + static SessionServiceClient.PublishFromTicketMetadata_or_callbackFn.P0Type create() { + return Js.uncheckedCast(JsPropertyMap.of()); + } + + @JsProperty + double getCode(); + + @JsProperty + String getMessage(); + + @JsProperty + BrowserHeaders getMetadata(); + + @JsProperty + void setCode(double code); + + @JsProperty + void setMessage(String message); + + @JsProperty + void setMetadata(BrowserHeaders metadata); + } + + void onInvoke( + SessionServiceClient.PublishFromTicketMetadata_or_callbackFn.P0Type p0, PublishResponse p1); + } + + @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) + public interface PublishFromTicketMetadata_or_callbackUnionType { + @JsOverlay + static SessionServiceClient.PublishFromTicketMetadata_or_callbackUnionType of(Object o) { + return Js.cast(o); + } + + @JsOverlay + default BrowserHeaders asBrowserHeaders() { + return Js.cast(this); + } + + @JsOverlay + default SessionServiceClient.PublishFromTicketMetadata_or_callbackFn asPublishFromTicketMetadata_or_callbackFn() { + return Js.cast(this); + } + + @JsOverlay + default boolean isBrowserHeaders() { + return (Object) this instanceof BrowserHeaders; + } + + @JsOverlay + default boolean isPublishFromTicketMetadata_or_callbackFn() { + return (Object) this instanceof SessionServiceClient.PublishFromTicketMetadata_or_callbackFn; + } + } + @JsFunction public interface RefreshSessionTokenCallbackFn { @JsType(isNative = true, name = "?", namespace = JsPackage.GLOBAL) @@ -746,6 +839,58 @@ public native UnaryResponse newSession( HandshakeRequest requestMessage, SessionServiceClient.NewSessionMetadata_or_callbackUnionType metadata_or_callback); + @JsOverlay + public final UnaryResponse publishFromTicket( + PublishRequest requestMessage, + BrowserHeaders metadata_or_callback, + SessionServiceClient.PublishFromTicketCallbackFn callback) { + return publishFromTicket( + requestMessage, + Js.uncheckedCast( + metadata_or_callback), + callback); + } + + @JsOverlay + public final UnaryResponse publishFromTicket( + PublishRequest requestMessage, BrowserHeaders metadata_or_callback) { + return publishFromTicket( + requestMessage, + Js.uncheckedCast( + metadata_or_callback)); + } + + @JsOverlay + public final UnaryResponse publishFromTicket( + PublishRequest requestMessage, + SessionServiceClient.PublishFromTicketMetadata_or_callbackFn metadata_or_callback, + SessionServiceClient.PublishFromTicketCallbackFn callback) { + return publishFromTicket( + requestMessage, + Js.uncheckedCast( + metadata_or_callback), + callback); + } + + @JsOverlay + public final UnaryResponse publishFromTicket( + PublishRequest requestMessage, + SessionServiceClient.PublishFromTicketMetadata_or_callbackFn metadata_or_callback) { + return publishFromTicket( + requestMessage, + Js.uncheckedCast( + metadata_or_callback)); + } + + public native UnaryResponse publishFromTicket( + PublishRequest requestMessage, + SessionServiceClient.PublishFromTicketMetadata_or_callbackUnionType metadata_or_callback, + SessionServiceClient.PublishFromTicketCallbackFn callback); + + public native UnaryResponse publishFromTicket( + PublishRequest requestMessage, + SessionServiceClient.PublishFromTicketMetadata_or_callbackUnionType metadata_or_callback); + @JsOverlay public final UnaryResponse refreshSessionToken( HandshakeRequest requestMessage,