Use Javascript
In this section, we provide a high-level overview of how a JavaScript client might interact with a Deephaven installation.
This will be done with pseudo-code and simple explanations to give a complete picture of how the system can be used, and a brief introduction into Deephaven terminology.
A more technical specification, complete with glossary and important implementation details follows.
Example 1: Logging In
In Example 1 above, we are sending the username, the token, and the type of auth to use. You can configure your own auth handler to integrate with any external system, and Deephaven will simply check with your server to verify user identities.
The underlying network transport mechanism is not yet available to clients as we will manage web socket connections and the auth token refreshes automatically; all the client needs to do is add callbacks to Promises as needed
Example 2: Discovering Database Tables
In Example 2 above, we are retrieving and subscribing to changes in Persistent Queries, which include collections of tables and the configuration for running those tables; you can read more about Persistent Query settings in the technical specification.
Example 3: Selecting a Table
In Example 3 above, we are loading the actual table data for rendering; metadata such as table size, columns, sorts and filters will be kept up to date for you, but the actual table data will not load until you call table.setViewport(), and receive updated events to trigger drawing.
This allows both the client and the server to decide to trigger a redraw, without burdening the client with extra state or callback management.
Example 4: Sorting and Filtering
Note
See: For more details and information, see our full documentation on Javascript.