SlideShare une entreprise Scribd logo
1  sur  22
annalist,
an Erlang stats aggregator
  Florian Odronitz @ Berlin Erlounge July 2012
Motivation
• Application Statistics in Erlang
• Count things (e.g. new users/day)
• Record stats (e.g. 95 percentile of response
  time)
• Pretty graphs
• CSV for the Excel-folks
Concept

• Store stuff in two granularities
• Time and hierarchical tags
• so count([<<“read”>>, <<“book”>>])
 increments the counter in 14 keys
read/total

read/year/2012

read/month/2012/07

read/day/2012/07/24

read/hour/2012/07/24/23

read/minute/2012/07/24/23/01

read/second/2012/07/24/23/01/22

read/total

read/book/year/2012

read/book/month/2012/07

read/book/day/2012/07/24

read/book/hour/2012/07/24/23

read/book/minute/2012/07/24/23/01

read/book/second/2012/07/24/23/01/22
Components
• LevelDB stores data
• eleveldb interfaces with LevelDB
• uplevel provides bucket/key semantics and
  range queries
• Cowboy for JSON API
• sparks.js and Highstocks for graphs
LevelDB

• Local, persistent key-value store
• Ordered by key, iterations
• Atomic writes and snapshots
• Variable Cache Size
Features: Counting


annalist:count([<<"create">>, <<"opinion">>])
Features: Counting
Features: Counting
Features: Recording


annalist:record([<<"time">>, <<"get_user">>], 62.3)
Features: Recording
Features: Recording
• Store distributions of values in a space efficient
  manner with accuracy guaranties.
• Targeted Quantiles:
f_targeted([{0.05, 0.005}, {0.5, 0.02}, {0.95, 0.005}])

Allow a maximum error of 0,5% for 5th and 95th
percentile and 2% error for median. Errors are
errors in rank.
Features: Recording
Features: Recording
         1x107




         1x106




        100000




         10000
Value




          1000




           100




            10




             1


                 0    2000   4000   6000             8000   10000   12000   14000
                                           Inserts
Features: Recording
         1x107




         1x106




        100000




         10000
Value




          1000




           100




            10




             1


                 0    2000   4000   6000             8000   10000   12000   14000
                                           Inserts
Features: Recording
                                           80
Compressed size (comp. every 10 inserts)




                                           60




                                           40




                                           20




                                            0
                                                0    2000   4000   6000             8000   10000   12000   14000
                                                                          Inserts
Features: API
                              /annalist/hour_counts/
                              update%20user_location/
                                 2011/7/30/21/8640
                                ?callback=jQuery123

jQuery123([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0...0,0,0,19,81,73,96,139,205,120,79,25,0,0,0,0,0,0
,0,0,0,0,52,86,76,0,25,89,93,97,80,56,38,0,13,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,80,80,117,80,80,80
,80,80,79,80,80,12,0,0,0,0,0,0,0,0,0,0,0,0,72,80,80,79,79,80,80,80,80,80,80,80,80,80,196,208,240,249,236,160,160
,138,196,160,159,162,93,80,78,81,79,80,80,80,81,49,81,81,62,3,41,84,82,100,134,80,79,14,80,80,80,80,80,80,80,80,
79,80,80,67,60,68,158,79,77,211,242,231,209,80,105,161,206,240,240,238,240,237,239,239,239,239,241,148,80,80,80,
80,80,80,80,80,134,108,80,90,205,222,85,79,80,80,79,81,77,80,81,79,82,84,79,175,293,239,116,80,78,79,186,232,126
,142,22,163,177,175,176,164,168,167,166,180,177,173,168,34,0,0,109,179,180,176,178,162,180,174,173,163,175,166,1
73,173,178,179,164,130,0,0,0,0,21,11,0,0,0,17,44,141,145,162,73,0,0,0,0,5,118,0,6,0,197,232,0,69,80,80,80,78,28,
24,0,49,80,72,75,70,2,0,0,0,0,0,0,0,24,166,373,290,309,260,275,232,123,138,132,80,79,95,79,125,132,80,79,80,79,8
1,80,79,113,99,101,92,139,204,244,250,224,194,166,80,223,188,80,80,78,73,80,79,35,0,0,9,148,169,301,300,304,263,
109,251,272,171,138,114,183,184,12,0,0,0,0,0,0,0,0,0,189,299,145,114,184,174,196,225,241,264,231,52,85,163,166,5
0,3,11,15,9,29,55,19,84,149,132,115,90,68,56,97,112,235,315,301,289,274,223,242,273,260,260,293,308,294,189,180,
187,242,198,178,225,248,248,244,433,359,227,180,223,206,180,179,180,180,180,179,181,179,184,241,131,227,322,310,
  286,260,271,327,348,319,187,161,108,79,80,0,0,0,0,0,0,0,44,166,149,148,13,0,41,81,25,0,166,49,4,113,107,0]);
Characteristic
Characteristic

• Sparse counting
• No backpressure
• 1 gen_server, 1 CPU
• eventually consistent
Performance

• Counting:
  ~ 4k ops/sec with ([<<“a”>>, <<“b”>>])
  equals ~ 56k increments/sec
• Stats:
  ~ 690 ops/sec with ([<<“a”>>, <<“b”>>], 1)
  equals ~ 9.66k recordings/sec
Future

• HTTP API for stats
• CSV Export
• Purging
• Variable Timeslots
• Multiple Workers (CAS with locks in ets?)
Thanks
• leveldb.googlecode.com
• https://github.com/basho/eleveldb
• https://github.com/odo/uplevel
• https://github.com/odo/annalist
• https://github.com/extend/cowboy/
• http://omnipotent.net/jquery.sparkline/
• highcharts.com

Contenu connexe

En vedette

Ruby goes to hollywood
Ruby goes to hollywoodRuby goes to hollywood
Ruby goes to hollywoodehuard
 
Maple leaf foods
Maple leaf foodsMaple leaf foods
Maple leaf foodsjonholt523
 
Boost your-oop-with-fp
Boost your-oop-with-fpBoost your-oop-with-fp
Boost your-oop-with-fpUberto Barbini
 
Types of food and beverage services
Types of food and beverage servicesTypes of food and beverage services
Types of food and beverage servicesAmaresh Kumar
 

En vedette (6)

Google Docs
Google DocsGoogle Docs
Google Docs
 
Ruby goes to hollywood
Ruby goes to hollywoodRuby goes to hollywood
Ruby goes to hollywood
 
Maple leaf foods
Maple leaf foodsMaple leaf foods
Maple leaf foods
 
Boost your-oop-with-fp
Boost your-oop-with-fpBoost your-oop-with-fp
Boost your-oop-with-fp
 
Examples 2.0
Examples 2.0Examples 2.0
Examples 2.0
 
Types of food and beverage services
Types of food and beverage servicesTypes of food and beverage services
Types of food and beverage services
 

Similaire à annalist - a statistics aggregator written in erlang

Lj kitty scheme...
Lj kitty scheme...Lj kitty scheme...
Lj kitty scheme...yaddu420
 
An Integer Programming Representation for Data Center Power-Aware Management ...
An Integer Programming Representation for Data Center Power-Aware Management ...An Integer Programming Representation for Data Center Power-Aware Management ...
An Integer Programming Representation for Data Center Power-Aware Management ...Arinto Murdopo
 
MongoDB and Apache HBase: Benchmarking
MongoDB and Apache HBase: BenchmarkingMongoDB and Apache HBase: Benchmarking
MongoDB and Apache HBase: BenchmarkingOlga Lavrentieva
 
Lean principles and practices
Lean principles and practicesLean principles and practices
Lean principles and practicesJelle Bens
 
Bass Diffusion Model
Bass Diffusion ModelBass Diffusion Model
Bass Diffusion ModelJoe Estephan
 
SPICE MODEL of FE126E in SPICE PARK
SPICE MODEL of FE126E in SPICE PARKSPICE MODEL of FE126E in SPICE PARK
SPICE MODEL of FE126E in SPICE PARKTsuyoshi Horigome
 
SPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARKSPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARKTsuyoshi Horigome
 
A Function by Any Other Name is a Function
A Function by Any Other Name is a FunctionA Function by Any Other Name is a Function
A Function by Any Other Name is a FunctionJason Strate
 
Vertical format for trading account, profit and loss account & balance sheet
Vertical format for trading account, profit and loss account & balance sheetVertical format for trading account, profit and loss account & balance sheet
Vertical format for trading account, profit and loss account & balance sheetSAITO College Sdn Bhd
 
Analisis time series
Analisis time seriesAnalisis time series
Analisis time seriesXYZ Williams
 
SPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARKSPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARKTsuyoshi Horigome
 
ツィータースピーカーのスパイスモデル
ツィータースピーカーのスパイスモデルツィータースピーカーのスパイスモデル
ツィータースピーカーのスパイスモデルTsuyoshi Horigome
 
SPICE MODEL of FT48D in SPICE PARK
SPICE MODEL of FT48D in SPICE PARKSPICE MODEL of FT48D in SPICE PARK
SPICE MODEL of FT48D in SPICE PARKTsuyoshi Horigome
 
SSI Event monetization method and Startups
SSI Event monetization method and StartupsSSI Event monetization method and Startups
SSI Event monetization method and Startups01Booster
 
Wikipedia ws
Wikipedia wsWikipedia ws
Wikipedia wsYu Suzuki
 
Ditt actionplan
Ditt actionplanDitt actionplan
Ditt actionplandittjapan
 

Similaire à annalist - a statistics aggregator written in erlang (20)

Lj kitty scheme...
Lj kitty scheme...Lj kitty scheme...
Lj kitty scheme...
 
An Integer Programming Representation for Data Center Power-Aware Management ...
An Integer Programming Representation for Data Center Power-Aware Management ...An Integer Programming Representation for Data Center Power-Aware Management ...
An Integer Programming Representation for Data Center Power-Aware Management ...
 
MongoDB and Apache HBase: Benchmarking
MongoDB and Apache HBase: BenchmarkingMongoDB and Apache HBase: Benchmarking
MongoDB and Apache HBase: Benchmarking
 
Extending Io Scalability
Extending Io ScalabilityExtending Io Scalability
Extending Io Scalability
 
Lean principles and practices
Lean principles and practicesLean principles and practices
Lean principles and practices
 
Bass Diffusion Model
Bass Diffusion ModelBass Diffusion Model
Bass Diffusion Model
 
SPICE MODEL of FE126E in SPICE PARK
SPICE MODEL of FE126E in SPICE PARKSPICE MODEL of FE126E in SPICE PARK
SPICE MODEL of FE126E in SPICE PARK
 
SPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARKSPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=8.2(Ohm) in SPICE PARK
 
A Function by Any Other Name is a Function
A Function by Any Other Name is a FunctionA Function by Any Other Name is a Function
A Function by Any Other Name is a Function
 
Vertical format for trading account, profit and loss account & balance sheet
Vertical format for trading account, profit and loss account & balance sheetVertical format for trading account, profit and loss account & balance sheet
Vertical format for trading account, profit and loss account & balance sheet
 
Analisis time series
Analisis time seriesAnalisis time series
Analisis time series
 
SPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARKSPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARK
SPICE MODEL of ZR6_RL=4.7(Ohm) in SPICE PARK
 
SDS Amazon RDS
SDS Amazon RDSSDS Amazon RDS
SDS Amazon RDS
 
Design Project
Design ProjectDesign Project
Design Project
 
Navneet accounts
Navneet accountsNavneet accounts
Navneet accounts
 
ツィータースピーカーのスパイスモデル
ツィータースピーカーのスパイスモデルツィータースピーカーのスパイスモデル
ツィータースピーカーのスパイスモデル
 
SPICE MODEL of FT48D in SPICE PARK
SPICE MODEL of FT48D in SPICE PARKSPICE MODEL of FT48D in SPICE PARK
SPICE MODEL of FT48D in SPICE PARK
 
SSI Event monetization method and Startups
SSI Event monetization method and StartupsSSI Event monetization method and Startups
SSI Event monetization method and Startups
 
Wikipedia ws
Wikipedia wsWikipedia ws
Wikipedia ws
 
Ditt actionplan
Ditt actionplanDitt actionplan
Ditt actionplan
 

Dernier

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 

Dernier (20)

"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 

annalist - a statistics aggregator written in erlang

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n