Application user guide

TimeBase Administrator web application allows managing and monitoring of all the data stored in TimeBase streams:

  • View stream data.
  • Delete streams.
  • Monitor live data.
  • Describe/view stream schema.
  • Query data using QQL (Quick Query Language).
  • Modify streams including: truncation, purging, changing of stream name.
  • Export/Import data.
  • Visualize data in charts.
  • Send/create instrument message.
  • Export stream data to QSMSG file.

Deployment

As a TimeBase Server management tool, Web Admin can be deployed and run as a standalone web application or embedded into TimeBase Server. Use Docker Compose to deploy more than one instance of the Web Admin application.

Supported web browsers:

  • Chrome 72+
  • Firefox 65+
  • Safari

Docker

  1. Install Docker
  2. Run container with TimeBase WS Server image timebase-ws-server
docker run --rm --detach --name timebase-server -p 8011:8011 timebase-ws-server:latest
docker run --rm --detach --name timebase-server -p 8011:8011 packages.deltixhub.com/quantserver.docker/timebase/ws-server:1.0.5

Docker Compose

# Example of running TimeBase Admin in Docker Compose 

docker-compose.yml:

  timebase-admin:
    image: "packages.deltixhub.com/quantserver.docker/timebase/ws-server:0.3.45"
    network_mode: host

docker-compose.override.yml:

  timebase-admin:
    environment:
      - JAVA_OPTS=-Dserver.port=8099 -Dtimebase.url=dxtick://localhost:8011
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8099/ping"]

TimeBase Server Web Gateway

In addition to being a TimeBase Web Administrator GUI, TimeBase Web Admin also serves as a REST/WS gateway for TimeBase Server. Refer to REST/WS API reference.

Configuration

Provide this configuration with Web Admin application.yaml.

# application.yaml example

server:
  port: 8099 # http port of Timebase Gateway
  compression:
    enabled: true
    mime-types: text/html,text/css,application/javascript,application/json
timebase: # timebase settings definition
  url: dxtick://localhost:8011 # connection URL
  user: # user name, if UAC is enabled
  password: # user password, if UAC is enabled
  streams: # stream filter
    include: # a regular expression to include stream keys
             # for example: GRAX|BITMEX - include only GDAX and BITMEX streams
             # for example: ticks*
    exclude: # a regular expression to exclude stream keys                 
             # for example: \#$ - exclude all streams ends with #
             # for example: ticks* - exclude all streams starts with 'ticks'
  readonly: true # enables 'readonly' mode for timebase to prevent any modifications

Authentication

Web Admin provides two types of authentication: built-in OAuth2 & SSO.

One of those types must be enabled to run the application.

Client Web Application Authentication Flow

  1. Authentication service provider identification check is made upon each application start.
  2. Browser local storage is checked to have a Refresh Token for the current user.
  3. If Refresh Token exists, Silent Token Update is performed to obtain a new Access Token.
  4. If Silent Token Update fails for any reason, the user will be logged out and redirected to a Login page.

OAuth2

To enable built-in authentication, you need to add the following security block to your application.yaml configuration file. We recommend using this authentication method for test purposes.

security:
  oauth2:
    provider:
    providerType: BUILT_IN_OAUTH
    clientId: web
    tokenEndpoint: /oauth/token
    clientId: web
    secret: <BCrypt_encoded_secret>
    authorizedGrantTypes:
    - password
    - refresh_token
    users: # list of users with its authorities
    - username: <username>
      password: <BCrypt_encoded_password>
      authorities: [TB_ALLOW_READ, TB_ALLOW_WRITE]
    scopes:
    - trust
    accessTokenValiditySeconds: 300 # 5 min
    refreshTokenValiditySeconds: 86400 # one day
    privateKey: |
    -----BEGIN RSA PRIVATE KEY-----
    <RSA private key>
    -----END RSA PRIVATE KEY----- |
    publicKey: |
    <RSA public key>

ORY Hydra

To enable SSO with ORY Hydra add the following blocks to your application.yaml configuration file.


spring:
  security:
    oauth2:
      resourceserver:
        jwt:
          issuer-uri:  # Issuer URI

...

security:
  oauth2:
    provider:
      providerType: SSO
      name: hydra
      clientId: <client_id> # Your client ID
      validateIssuer: false
      userInfo:
        enable: true

Auth0

In this section we describe how to configure TimeBase Web Admin Authentication with Auth0 authentication service provider.

Auth0 Settings

  1. In Applications create Single Page Application
  2. For the application you have just created configure the following settings:
    • Allowed Callback URLs: /assets/sign-in.html, /assets/silent-auth.html
    • Allowed Logout URLs: //assets/sign-in.html
    • Allowed Web Origins:
    • Allowed Origins (CORS):
    • Disable Refresh Token Rotation
    • Disable Absolute Expiration in Refresh Token Expiration
    • Disable Inactivity Expiration in Refresh Token Expiration
  3. In Applications go to APIs and create a new API
    • Set your application Client ID as API_Audience value
  4. In User Management under Users create a new user
  5. In Tenant Settings under Advanced Settings disable Refresh Token Revocation Deletes Grant
TimeBase Web Admin Settings

Add the following variables to timebase chart in TimeBase Web Admin section:

  SPRING_SECURITY_OAUTH2_RESOURCESERVER_JWT_ISSUER-URI: https://<your_domain>.auth0.com/
  SECURITY_OAUTH2_PROVIDER_VALIDATEISSUER: true
  SECURITY_OAUTH2_PROVIDER_USERINFO_ENABLE: true
  SECURITY_OAUTH2_PROVIDER_CLIENTID: <client_id>
  SECURITY_OAUTH2_PROVIDER_CLIENTSECRET: <secret>
  SECURITY_OAUTH2_PROVIDER_PROVIDERTYPE: SSO
  SECURITY_OAUTH2_PROVIDER_NAME: auth0
  SECURITY_OAUTH2_PROVIDER_AUDIENCE: <api_audience>
  SECURITY_OAUTH2_PROVIDER_CONFIGURL: https://<your_domain>.auth0.com/.well-known/openid-configuration
  SECURITY_OAUTH2_PROVIDER_LOGOUTURL: https://<your_domain>.auth0.com/logout
  SECURITY_OAUTH2_USERS_0_USERNAME: "<username>"

Streams List

TimeBase records time series data in streams. See Basic Concepts for details. Vertical panel on the left displays all streams available in your specific TimeBase instance. You can expand each stream by selecting the up or down carrot to view stream instruments (symbols). A context menu is available using your right mouse button and actions vary deepening on whether a stream name or instrument is highlighted.

General Controls

Search text box is located at the top of the streams list and allows to quickly locate the required stream(s)/symbols.

Collapse Stream List

  • Click the Collapse icon next to the TimeBase title to hide the streams list.
  • Click the Expand icon next to the TimeBase title to show the streams list.

Expand/Collapse Symbols

Click the Down Arrow icon to expand and collapse symbols that belong to a specific stream.

Collapse All

Click the Collapse All icon located at the bottom right of the TimeBase panel to quickly collapse all expanded streams.

Open In New Tab

Enable the Open in new tab checkbox located in the bottom left corner of the TimeBase Streams panel to open stream data in unique tabs in the main TimeBase Monitoring Window.

Create New Stream

You can create new stream right from the TimeBase Web Admin application.

  1. Click Create new stream next to the Search bar.
  2. Enter Stream Key in the dialog window and click Start Creating to open a stream schema editor.

TimeBase is designed to work with records of different types, we call them messages. In object-oriented programing languages messages can be seen as classes, each with a specific set of fields. Messages are arranged chronologically in streams.

Each stream has a unique stream schema, which declares what types of messages (including their hierarchy) a specific stream may store. This differs TimeBase from traditional relational databases with flat structure. Uniqueness of stream schema means, that identical classes defined by different stream schemas are in fact independent classes and are not treated as identical on a TimeBase level. Stream schema may as well include applicable enumerations.

  1. Click New Class in schema editor
  2. In the dialog window specify:
    • Parent Class - as we have mentioned earlier, classes can form hierarchies on the schema level. Here you can specify a parent class if applicable.
    • Name - give your class a unique name.
    • Used - this flag indicates that the current class will be used in stream schema.
    • Title - optional parameter. You can specify class title along with class name.
  3. Click Add to submit the form and create a new class. New class is automatically added to the schema editor.
  4. Click class to add fields
    • Static - applies across all class instances. For a static field you will have to specify a static value.
    • Non Static - applies to only one instance of a class.

  1. Click New Enum in schema editor
  2. In the dialog window specify:
    • Name - give your enum a unique name.
    • Title - optional parameter. You can specify a title for the enum along with the enum name.
  3. Click Add to submit the form and create a new enum. New enum is automatically added to the schema editor.

To add a new filed just click either New Non Static Field or New Static Field. You will be able to change this field type later on.

  • Click Next in schema editor to proceed to the schema review step. Here you can take another glance at your class fields. You can go back to add/edit or remove any of them at this point. You will also be able to get back to schema editor any time later to edit your stream schema.
  • Click Finish to submit changes.

Now, you can right-click your stream and select Edit Schema to make changes or Schema to view your stream schema classes.

Practical Example

For demonstration purposes lets take a MyBarMessage class from deltix.samples.timebase.basics sample package. In this example we will create a new stream with a sample class, create loader to write some demo data into the stream and view recorded data in Web Admin application.

  1. Click Create new stream next to the Search bar
  2. Enter Demo Stream Key in the dialog window and click Start Creating to open a stream schema editor
  3. Click New Class in schema editor and create MyBarMessage class
  4. Add new fields:
    • closePrice, NON STATIC FLOAT IEEE64
    • openPrice, NON STATIC FLOAT IEEE64
    • highPrice, NON STATIC FLOAT IEEE64
    • lowPrice, NON STATIC FLOAT IEEE64
    • volume, NON STATIC FLOAT IEEE64
    • exchange, NON STATIC CHAR
  5. Create a Loader to write data into a sample stream. Make sure to use your new stream name.
  6. Click View to see recorded messages.

You can also add messages manually. Refer to Send Message to learn more. Refer to client’s APIs samples for more information.

Stream Actions

Right Click any stream to display available actions in the context menu.

View

Select View mode to view stream data for a particular stream and time period. Select the Properties icon in the upper right corner of the main window to view the stream’s properties. While viewing the data within the main window, you can double click on stream package Entry (message) to open entry details in a pop-up window and in JSON format.

Refer to Dashboard for more information on the actions available in the View dashboard.

Reverse View

Select Reverse View to display all of the stream’s data starting with the latest timestamp at the top of the window.

Monitor

Use monitor mode to view latest records for each symbol in the selected stream in real time.

Inspector

Use inspector mode to view updates for the latest 100 records in the selected stream in real time. The latest messages are displayed on top of the list.

Schema

Use this mode to display stream schema details. Select each schema element to display its properties in the Properties Area. Enabled Use check boxes indicate message classes that are enabled for a particular stream schema.

Edit Schema

You can edit an existing stream schema using Schema Editor.

  • Right-click any of your streams and select Edit Schema
  • Editing schema is similar to creating it. Please review Create Stream chapter to learn more.
Export Schema

Right click the schema grid and select one of the Export options:

  • CSV
  • Excel Export (.xlsx)
  • Excel Export (.xml)

Exported file will contain all schema parameters in the selected format. See Describe to learn how to export schema settings.

Query

Use Query to run data queries.

Truncate

Truncating a stream will remove all data after a specified time.

  1. Highlight a stream, right-click to open a context menu, select Truncate.
  2. Select all or individual symbols that you wish to be truncated.
  3. The stream’s time range will be displayed in the time slider. You can either use the slider to specify the truncate to time or you can define the time and date within the Date input area.
  4. Specify a Time Zone and select OK.
  5. Select OK for confirmation.

Purge

Purging a stream removes all data that is older than a specified start date.

  1. Highlight a stream, right-click to open a context menu, select Purge.
  2. The stream’s time range will be displayed in the time slider.
  3. You can either use the slider to specify the purge from time or you can define the time and date within the Date input area.
  4. Specify a Time Zone and select OK.
  5. Select OK for confirmation.

Delete

Use Delete to remove a specific stream from the system.

  1. Highlight a stream, right-click to open a context menu, select Delete.
  2. Click Delete in the dialog window to confirm or Cancel to abort

Change Name

Use Change Name to rename a specific stream.

  1. Highlight a stream, right-click to open a context menu, select Change name.
  2. Enter a new name in the text area and click Rename to confirm

Describe

Use Describe to display a QQL code with stream schema description. You can use this as a template to create new streams or modify existing streams.

Send Message

Use this to manually add new messages to the selected stream. Stream schema determines what classes of messages can be recorded to a specific stream. Each message class has an individual set of fields. See Basic Concepts for more information.

  1. Highlight a stream, right-click to open a context menu, select Send message.
  2. Specify parameters values using either the UI or in a Json format
  3. Click Send to submit

Export to QMSG

You can export the entire stream data, including all stream messages, to a file of a proprietary QS format. You can use this file to easily import stream data to another TimeBase instance.

Symbol Actions

Unfold any stream to view symbols and Right Click any symbol to display available actions in the context menu:

View

Select View mode to view data for a particular symbol and time period. While viewing the data within the main window you can double click any Entry (message) to open message details in a pop-up window and in JSON format.

See Dashboard for more information on action available in the View dashboard. View mode to view all data for a particular symbol and time period.

Reverse View

Select Reverse View to display a particular symbol data within the stream starting with the latest timestamp at the top of the window.

Monitor

Monitor allows viewing real-time updates for a specific symbol. Double click to open message details in a pop-up window and in JSON format.

Inspector

Use inspector to view updates for the latest 100 records for the selected symbol in real time. The latest messages are displayed on top of the list.

Chart

TimeBase Web Administrator can chart Level1/Level2 Market Data for a single contract per panel.

This feature is designed to provide the user insight into the incoming market data to verify the aggregator process is consuming and storing data properly. TimeBase Web Administrator charts are not designed to be used as a financial research tool.

The No chart data message notifies the user that charting is not supported for a particular selection.

Time Range

Use the Time Range drop-down to select one of the preset time intervals for the chart or Custom Time Range to manually set the time interval. Use the Left and Right controls to pan the chart forwards of backwards along the stream’s time range.

Chart Modes

You can switch chart modes in the upper-right corner of the screen.

  • Pan Mode - when enabled, click-hold-drag chart to move chart left and right along the stream’s time range.
  • Zoom Mode - when enabled, click-hold-drag chart to zoom-in a specific time period on the chart. In the case where zoom-in is no longer possible, the chart mode will automatically go to Pan Mode.
Chart Zooming

Use zoom-in and zoom-out icons located in the upper-right corner of the screen to zoom in/out the chart.

Use Zoom Mode to select a specific time range within the chart.

Query

Use Query Mode to run data queries.

Change Name

Use Change Name to rename a specific symbol.

  1. Highlight a symbol, right-click to open a context menu, select Change name.
  2. Enter a new name in the text area and click Rename to confirm.

Main Monitoring Window

Stream and Message Details

In the main monitoring area you can preview both stream and message details. Please note, that you cannot display both at the same time. Selecting one disables the other.

To Display Message Details

  • Select any stream to view stream data in the main monitoring area.
  • Double-click any message in the selected stream to show Message Details in the additional window.
  • You can switch between Show Json View and Show Simple View.

To Display Stream Properties

  • Click Stream Properties in the upper-right corner of the window to display stream details.

Working With Dashboard

  • Use the column context menu to:
    • Pin, Unpin, or Reset Grid to default state.
    • Autosize All or a Specific column to the default size.
      • Choose columns to be displayed in the grid.
  • Use grid context menu to
    • Copy a specific field in JSON format.
    • Export to CSV, MS Excel, XML.
    • Send Message
  • Additional information is available for selected grid fields when double clicking a row (e.g. Entries)
  • Use mouse scroll to move up and down the displayed time range.
  • Use Timebar to navigate within the entire available time range.

Working With Tabs

When Open in a new tab checkbox is enabled in the Stream List, each new selection will be displayed within a separate tab within the main window.

All open tabs are displayed in the top pane of the main window.

Use Tabs List located next to the Settings in the upper-right corner to:

  • View all open tabs.
  • Navigate between tabs.
  • Close all open tabs at once .

Working With Filter

Select the Filter button to filter out stream data:

  • Filter by Symbol
  • Filter by Message Type

Working With Time Box

Use the Time Box input field and/or calendar icon to set the displayed Start From date.

  • Use Apply to apply selection .
  • Use Clean to reset the selection to the initial state.

Settings

  • Tabs List - use to view, navigate, and hide open tabs.
  • Stream’s Properties - click to display Properties window for a particular stream.
  • Use Global Settings to set:
    • Date Format.
    • Time Format.
    • Time Zone (local time zone is detected and populated automatically).
  • Sign out