Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a condition naming scheme #16

Open
gubser opened this issue Jun 27, 2016 · 0 comments
Open

Define a condition naming scheme #16

gubser opened this issue Jun 27, 2016 · 0 comments

Comments

@gubser
Copy link
Collaborator

gubser commented Jun 27, 2016

An analyzer can observe multiple conditions on a path at the same time. The question is how to name and organise all the different conditions and, almost more importantly, how the value field should look like depending on the condition.

Variant A: one condition per observation

Variant B: each condition combination is a condition

  • not really useful if only a string concat and no logic relation to 'basic' conditions.
  • results in exploding number of conditions

Variant C: multiple conditions per observation

the field condition is an array: condition: ['cond1', 'cond2', 'cond3']
searching for observations given a single condition is easy because of mongodb's special behavior when operating on arrays. (see link above).

In addition, let's introduce that each condition has defined a mandatory set of keys in the values field. in practice this means for each condition we define a json-schema.

TODO: think about a clever way how to populate the value field associated with multiple conditions without key collisions and too much copies. (mplane registry?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant