'recurring salient thematic element...'
Motif is the support library for a filtering language called Motif, meant to provide a simple universal common filter-query semantic across various external and internal subsystems. For instance the default SampleStore uses Motif to describe how datasets are sampled, time-boxed, and content-filtered. Other systems that want to use this have only to create an execution engine for their Sample Source to match.
This module consists of the Motif language definition (as Antlr4 grammars) along with a parser for that language, a runtime support library (as a fat jar) for internal and external Motif users as well as (this) documentation. The deployed artifact is a single shaded uber jar designed to support authoring, validation, and error-checking of Motif filters as well as a pre processor for various and sundry back ends performing direct execution of Motif queries or translation of Motif semantics to external query systems.
-
Motif Schema: Motif makes use of a simple Motif schema IDL which fully describes a nested recursive object-tree model.
-
Data Model: Motif is used to manipulate datasets in a data-model
D
, defined to be of a set of one or more tuplesT<K, V>
whereK
is a unique key, andV
is a nested recursive object-tree conforming to a provided Motif schemaS
. -
Language: Motif provides a simple and consistent combinatorial predicate calculus language that can be used to specify a filter query
Qf
that specifies the inclusion or exclusion of tree elements across all tuples in a data-modelD
. -
Reduction: Motif is designed to support the transformation of an input dataset in schema
S
to a reduction of that dataset also in schemaS
. This reduction takes two forms; pruning and subsetting. -
Pruning: The pruning reduction is where a tuple
T1<K1, V1>
in the input dataset is transformed to another tupleT2<K2, V2>
in the output dataset where the object-treeV2
is object-treeV1
with zero or more object-tree elements removed. Note that this operation is schema-invariant. -
Subsetting: The subsetting reduction is where the specified pruning of
T1
would result in the removal of the root of the object tree inT2
. In this case the entire tupleT1
is removed from the dataset. -
Optimized Subsetting: Though conceptually reduction leads to subsetting via pruning, it is a possible optimization to short circuit pruning and go directly to subsetting based on inherent knowledge of the underlying execution model. e.g. a time based pruning at the root of the object tree may be optimized to be reduction in the number of tuples read from the disk or deserialized.
- View Examples
- Language Specification
- Java Runtime Support (including schema discovery)
- JSON Runtime Support
------ HOME --------------------------------------------