barrage_session
The barrage_session function creates a new Deephaven gRPC session (BarrageSession) to a remote server. Each call opens its own connection. Use the session's subscribe and snapshot methods to retrieve remote tables, and close it when you are done.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| host | str | The host name or IP address of the Deephaven server. |
| port optional | int | The port number that the remote Deephaven server is listening on. The default value is |
| auth_type optional | str | The authentication type string. Can be |
| auth_token optional | str | The authentication token string. When |
| use_tls optional | bool | If |
| tls_root_certs optional | bytes | The PEM-encoded root certificates to use for TLS connection, or |
| extra_headers optional | dict[str, str] | Extra headers to set when configuring the gRPC channel. Defaults to |
| accept_compression optional | Union[str, Sequence[str]] | The compression type, or types, that the session accepts, such as |
Returns
Examples
The following example creates a BarrageSession on a Deephaven server running on localhost at port 10000. Every example except the pre-shared-key one uses the default anonymous authentication, so the target server must allow anonymous authentication (-DAuthHandlers=io.deephaven.auth.AnonymousAuthenticationHandler); the default server configuration uses pre-shared key authentication.
The following example connects to a BarrageSession on a Deephaven server running on localhost at port 9999. This example will fail unless there is already a Deephaven server running on localhost at port 9999.
The following example connects to a Deephaven server running on a remote host at IP address 192.0.2.1 and port 10000. This example will fail unless there is already a Deephaven server running at the specified IP address and port.
The following example connects to a Deephaven server running on localhost at port 9999, with pre-shared-key (PSK) authentication. This example will fail unless there is already a Deephaven server running on localhost at port 9999, with matching PSK authentication.
The following example creates a session that accepts only zstd compression from the remote server. Tables that do not allow zstd still arrive uncompressed.