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

Add "meta" property to event data and associated Reactors #40

Merged
merged 4 commits into from Mar 14, 2013

Conversation

indexzero
Copy link
Member

This adds a relatively simple new field to all events:

{ ... meta: "Freeform set of key:value pairs e.g. { 'ewma': 12345 }", ... }

I came across this problem when working on a relatively simple use-case:

Emit data when the metric is one (or more) standard deviations above
(or below) the EWMA of the same metric.

To make this decision you need to know the metric, the ewma and the stdDev. Before adding meta I was having the ewma stream simply attach tags:

  {
    // ...
    "tags": ["ewma:12345.67", "stdDev:234.5"],
    // ...
  }

This is all well and good, but it felt wrong to be serializing and deserializing these values later on in the stream processing pipeline. With meta I end up with:

  {
    // ...
    "meta": {
      "ewma": 12345.67, 
      "stdDev": 234.5
    }
    // ...
  }

and don't have to deserialize again.

indexzero added a commit that referenced this pull request Mar 14, 2013
Add "meta" property to event data and associated Reactors
@indexzero indexzero merged commit 8c92a04 into master Mar 14, 2013
@indexzero indexzero deleted the feature-meta branch March 14, 2013 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant