Skip to content

Data Model

mavam edited this page Oct 8, 2014 · 2 revisions

VAST has four first-class abstractions to represent information: data, types, values, and events. The fundamental concept to represent raw information is data, which can have one of VAST's types. A value binds type and data together, offering a type-safe mechanism to describe information. An event is-a value with a special type, one that has an explicit name, plus additional meta data (an identifier and a timestamp). VAST uses the term schema to refer to a set of named types.

For example, let data d be -42 and type t be int. Then, the value v is (d,t). Now consider a new type named foo which is just an alias for int. w = (d,foo) is also a valid value because the type foo is congruent to data -42. Further, we can construct an event from v because foo is a named type and not anonymous (such as builtin types like integer or string).

Data & Types

A type defines the representation of a data. The following types exist:

Basic

  • invalid: an uninitialized or invalid value
  • nil: an optional/null value
  • bool: a boolean value
  • integer: a 64-bit signed integer
  • count: a 64-bit unsigned integer
  • real: a 64-bit double (IEEE 754)
  • time_duration: a time duration (nanoseconds granularity)
  • time_point: a time point (nanoseconds granularity)
  • string: a fixed-length string optimized for short strings
  • regex: a regular expression
  • address: an IPv4 or IPv6 address
  • prefix: an IPv4 or IPv6 subnet
  • port: a transport-layer port

Container

  • vector: a sequence of values
  • set: a set of (unique) values
  • table: an associate array which maps a key to a value

Compound

  • record: a heterogenous structure holding arbitrary named values

Values

A value binds type and data.

For example, let d be data (T, +42, 4.2) and r be the type record { a: bool, b: int, c: real }. The value v = (d,r) would be a valid value.

Events

An event is a value with a named type, plus additional meta data of a 64-bit identifier and a timestamp with nanosecond granularity.

You can’t perform that action at this time.