indigophox commented on code in PR #34817:
URL: https://github.com/apache/arrow/pull/34817#discussion_r1417793255
##########
format/Flight.proto:
##########
@@ -525,3 +525,108 @@ message FlightData {
message PutResult {
bytes app_metadata = 1;
}
+
+/*
+ * EXPERIMENTAL: Union of possible value types for a Session Option to be set
to.
+ */
+message SessionOptionValue {
+ message StringListValue {
+ repeated string values = 1;
+ }
+
+ oneof option_value {
+ string string_value = 1;
+ bool bool_value = 2;
+ sfixed32 int32_value = 3;
+ sfixed64 int64_value = 4;
+ float float_value = 5;
+ double double_value = 6;
+ StringListValue string_list_value = 7;
+ }
+}
+
+/*
+ * EXPERIMENTAL: A request to set session options for an existing or new
(implicit)
+ * server session.
+ *
+ * Sessions are persisted and referenced via RFC 6265 HTTP cookies, canonically
+ * 'arrow_flight_session_id', although implementations may freely choose their
own name.
+ */
+message SetSessionOptionsRequest {
+ map<string, SessionOptionValue> session_options = 1;
+}
+
+/*
+ * EXPERIMENTAL: The results (individually) of setting a set of session
options.
+ */
+message SetSessionOptionsResult {
+ enum Status {
+ // The status of setting the option is unknown. Servers should avoid using
+ // this value (send a NOT_FOUND error if the requested query is
+ // not known). Clients can retry the request.
+ UNSPECIFIED = 0;
+ // The session option setting completed successfully.
+ OK = 1;
+ // The given session option name was an alias for another option name.
+ OK_MAPPED = 2;
+ // The given session option name is invalid.
+ INVALID_NAME = 3;
+ // The session option value is invalid.
+ INVALID_VALUE = 4;
+ // The session option cannot be set.
+ ERROR = 5;
+ }
+
+ message Result {
+ Status status = 1;
+ }
+
+ map<string, Result> results = 1;
+}
+
+/*
+ * EXPERIMENTAL: A request to access the session options for the current
server session.
+ *
+ * The existing session is referenced via a cookie header; it is an error to
make this
+ * request with a missing, invalid, or expired session cookie header.
+ */
+message GetSessionOptionsRequest {
+}
+
+/*
+ * EXPERIMENTAL: The result containing the current server session options.
+ */
+message GetSessionOptionsResult {
+ map<string, SessionOptionValue> session_options = 1;
+}
+
+/*
+ * Request message for the "Close Session" action.
+ *
+ * The exiting session is referenced via a cookie header.
+ */
+message CloseSessionRequest {
+}
Review Comment:
> should there be a corresponding `CreateSessionRequest`?
This is implicit in SetSessionOptions, OR the server may go ahead and create
a session for its own purposes which would then also be tied into the same
session. E.g. @kou has discussed tying AuthN into the session state as well,
where SetSessionOptions calls (if any) would be subsequent to the session
creation.
> More to the point, should there be a default TTL on sessions (modifiable
via options) for the case of a client which doesn't close their session?
Seems like a server implementation detail? The client can infer this (not
robustly) by looking at the cookies emitted by the server, particularly those
included in a SetSessionOptions response.
##########
format/Flight.proto:
##########
@@ -525,3 +525,108 @@ message FlightData {
message PutResult {
bytes app_metadata = 1;
}
+
+/*
+ * EXPERIMENTAL: Union of possible value types for a Session Option to be set
to.
+ */
+message SessionOptionValue {
+ message StringListValue {
+ repeated string values = 1;
+ }
+
+ oneof option_value {
+ string string_value = 1;
+ bool bool_value = 2;
+ sfixed32 int32_value = 3;
+ sfixed64 int64_value = 4;
+ float float_value = 5;
+ double double_value = 6;
+ StringListValue string_list_value = 7;
+ }
+}
+
+/*
+ * EXPERIMENTAL: A request to set session options for an existing or new
(implicit)
+ * server session.
+ *
+ * Sessions are persisted and referenced via RFC 6265 HTTP cookies, canonically
+ * 'arrow_flight_session_id', although implementations may freely choose their
own name.
+ */
+message SetSessionOptionsRequest {
+ map<string, SessionOptionValue> session_options = 1;
+}
+
+/*
+ * EXPERIMENTAL: The results (individually) of setting a set of session
options.
+ */
+message SetSessionOptionsResult {
+ enum Status {
+ // The status of setting the option is unknown. Servers should avoid using
+ // this value (send a NOT_FOUND error if the requested query is
+ // not known). Clients can retry the request.
+ UNSPECIFIED = 0;
+ // The session option setting completed successfully.
+ OK = 1;
+ // The given session option name was an alias for another option name.
+ OK_MAPPED = 2;
+ // The given session option name is invalid.
+ INVALID_NAME = 3;
+ // The session option value is invalid.
+ INVALID_VALUE = 4;
+ // The session option cannot be set.
+ ERROR = 5;
+ }
+
+ message Result {
+ Status status = 1;
+ }
+
+ map<string, Result> results = 1;
+}
+
+/*
+ * EXPERIMENTAL: A request to access the session options for the current
server session.
+ *
+ * The existing session is referenced via a cookie header; it is an error to
make this
+ * request with a missing, invalid, or expired session cookie header.
+ */
+message GetSessionOptionsRequest {
+}
+
+/*
+ * EXPERIMENTAL: The result containing the current server session options.
+ */
+message GetSessionOptionsResult {
+ map<string, SessionOptionValue> session_options = 1;
+}
+
+/*
+ * Request message for the "Close Session" action.
+ *
+ * The exiting session is referenced via a cookie header.
+ */
+message CloseSessionRequest {
+}
Review Comment:
> should there be a corresponding `CreateSessionRequest`?
This is implicit in SetSessionOptions, OR the server may go ahead and create
a session for its own purposes which would then also be tied into the same
session. E.g. @kou has discussed tying AuthN into the session state as well,
where SetSessionOptions calls (if any) would be subsequent to the session
creation.
> More to the point, should there be a default TTL on sessions (modifiable
via options) for the case of a client which doesn't close their session?
Seems like a server implementation detail? The client can infer this (not
robustly) by looking at the cookies emitted by the server, particularly those
included in a SetSessionOptions response.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]