Giter Club home page Giter Club logo

Comments (1)

MiniPlayer avatar MiniPlayer commented on August 27, 2024

Related to #22 and #10
A way of implementing compaction would be to use two différent storage.

  • A heavy storage which could store historical data (called S0)
  • A light storage that would store more recent data (called S1)

In this configuration we would guarantee that :

  • all data in S0 are compacted efficiently without any intersection between chunks of a specific metric.
  • whereas data in S1 are chunk of undefined size (may be one point), furthermore several chunk may be intersecting each others.
  • The only process that writes data in S0 is the compaction job. All others process writes to S1.

A compaction job should then consist of those steps :

  1. Get all data in S1.
  2. Get all data in S0 which are intersecting with S1 data.
  3. Recalculate chunks with an algorithm to define.
  4. Replace all old chunks with new calculated ones.

The historian server would return data from request using both S0 and S1.
In this case the response would be guranteed to be accurate except during between step 4, during step 4 there may be some duplicate points in new compressed chunks and not yet deleted old unoptimized chunk in S1.

That's why in this case I would recommend to offer at least two modes for requests to users.

  • A mode where we only query data on S0 to be sure of the accuracy of the data, but in this case we may not have more recent updates. (called for example ACCURACY)
  • A real time mode where we may return duplicates but we got recent updates. (called REAL_TIME)

I think for a first implementation, this a good compromise between accuracy and dev effort.

But this design would impact features that update or create data.
For exemple issues #37 would probably writes into S1.
While issue #29 may writes directly on S0 ? Anyway this should be thought carefully when implementing feature that modify timeseries.

from historian.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.