Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥

Write an embedded time-series database in Go

Avatar for nakabonne nakabonne
November 13, 2021

Write an embedded time-series database in Go

Avatar for nakabonne

nakabonne

November 13, 2021
Tweet

More Decks by nakabonne

Other Decks in Programming

Transcript

  1. How to represent data points • Sliceは基底配列に基づいおいる • 芁玠数がcapacityを超えるず自動的に基底配列のメモリコピヌが 発生

    • 際限なくデヌタが取り蟌たれるケヌスでは理論的には芁玠の远加 をO(1)で行えるLinked-listベヌスのデヌタ構造が良さそう
  2. WAL format op: オペレヌションタむプ (Insert, Delete, etc) len metric: 埌続するメトリック名文字列の長さ

    metric: メトリック名 timestamp: 最倧64ビットの敎数倀型UNIXタむムスタンプ value: 最倧64ビットの浮動小数点型の倀
  3. WAL format op: オペレヌションタむプ (Insert, Delete, etc) len metric: 埌続するメトリック名文字列の長さ

    metric: メトリック名 timestamp: 最倧64ビットの敎数倀型UNIXタむムスタンプ value: 最倧64ビットの浮動小数点型の倀
  4. • (ja) れロから䜜る時系列デヌタベヌス゚ンゞン : https://zenn.dev/nakabonne/articles/d300838a1500c7 • (en) Write a time-series

    database engine from scratch: https://nakabonne.dev/posts/write-tsdb-from-scratch • Repo: https://github.com/nakabonne/tstorage More...