SlideShare a Scribd company logo
Statim
time series interface for Perl

        Thiago Rondon
       YAPC::Brasil 2011
“Science progresses
throught observation”
-- Isaac Newton
“The greatest value of a picture
is that is forces us to notice what
we never expected to see”
-- John Tukey
Where ?
•   Astronomy          •   Apps

•   Medicine           •   Operating System

•   Stock Market       •   Networks

•   Meteorology        •   Robotics

•   Biometrics         •   Events

•   Geology            •   ....
Wait! let’s see
Chart::Cliker examples.
Line
StackedLine
Bar
StackedBar
Area
StackedArea
Bubble
CandleStick
Pie
PolarArea
What ?

• time series is a sequence of data points,
  measured typically at successive times
  spaced at uniform time intervals.
• interface define a set of methods and
  conventions that provides a consistent time
  series interface.
Why ?
• real time statistics.
• simple way to deploy.
• support openstandards
• distributed input
• provides default methods, functions, tools
  and etc.
Motivation
• independent
• many writers
• abstract layer on top of other databases to
  map and reduce.
• Portability
• easy integration
But, we need more.
• 3D,Visualizing data.
• Euclidean distance
 • Find similar patterns
 • Anomaly detection
 • Rule discovery
 • Frequent pattern discovery
Architecture

                         TCP     TCP
                        Server   Client

                                           Perl
storage schema engine
                                          Client

                         REST    REST
                        Server   Client
Conventions

• data collection
• period (time units)
• step and timestamp.
• type of aggregation
• fields
Engine

• AnyEvent
 • TCP
 • REST
Storage
•   Key Interface

    •   Redis

    •   Memcached

•   Table Interface

    •   DBI

    •   File

•   RRD Interface

    •   RRD
Schema
{
    "collection" : {
      "period" : "84600",
      "aggregate" : "sum",
      "fields" : {
         "foo" : "count",
         "bar" : "enum",
         "jaz" : "enum"
       }
    }
}
Command

• add, get and set
• period, step
• version, quit
Commands
•   add collection foo:jaz bar:1
•   OK 1
•   add collection foo:jaz bar:1
•   OK 2
•   add collection foo:wow bar:10
•   OK 10
•   get collection foo:jaz bar
•   OK 2
•   get collection bar
•   OK 12
•   set collection foo:jaz bar:2
•   OK 2
Commands with “ts”

•   You can pass timestamp with “ts”.

•   add collection foo:bar ts:123467890 bar:1

•   You can get a new series with “ts”

•   get collection foo:bar ts:1234567880-1234567890
    bar
Commands with step

•   You can pass step with “step”.

•   add collection foo:bar step:-10 bar:1

•   You can get a new series with “step”

•   get collection foo:bar step:-10..-20 bar
step vs timestamp

• You can get the step in server by:
• step 1234567890
• Or make the calc in the client.
timestamp vs step


• Timestamp make easy life to insert data
• Step make easy life to get data
New time series by
       periods.
• get collection bar:jaz ts:$ts1-$ts2 foo:max
• get collection bar:* ts:$ts1-$ts2 foo:max
• get collection bar:jaz ts:$ts1-$ts3 foo:min
• get collection ts:$ts1-$ts3 foo:sum
• get collection ts:$ts1-$ts3 foo:avg
• get collection ts:$ts1-$ts3 foo:distinct
New time series by
       periods.
• get collection ts:$ts1-$ts2
  foo:trend(5)
• get collection ts:$ts1-$ts2
  foo:anomaly(100)
• get collection ts:$ts1-$ts3
  foo:frequency(200)
Chart !

• You can use any lib to do that.
• Server-side, eg. Chart::Cliker.
• Client-site, eg. html5 and javascript libs.
REST


• You can extend to any protocol.
• statim-rest : /method/[args]
Thanks.

• http://github.com/maluco/Statim
• http://search.cpan.org/dist/Statim

• @thiagorondon

More Related Content

KEY
証明駆動開発のたのしみ@名古屋reject会議
PDF
"Metrics: Where and How", Vsevolod Polyakov
PDF
Kronos : A DSL for scheduled tasks based on textX
PPTX
MongoDB Chicago - MapReduce, Geospatial, & Other Cool Features
PDF
Some Tricks in Using Terminal - KienDT
PPTX
Developing High Performance Application with Aerospike & Go
PPTX
Monitoring MySQL with OpenTSDB
PDF
A Fast and Efficient Time Series Storage Based on Apache Solr
証明駆動開発のたのしみ@名古屋reject会議
"Metrics: Where and How", Vsevolod Polyakov
Kronos : A DSL for scheduled tasks based on textX
MongoDB Chicago - MapReduce, Geospatial, & Other Cool Features
Some Tricks in Using Terminal - KienDT
Developing High Performance Application with Aerospike & Go
Monitoring MySQL with OpenTSDB
A Fast and Efficient Time Series Storage Based on Apache Solr

What's hot (20)

PPT
JVM performance options. How it works
PDF
Handling 20 billion requests a month
PDF
Tweaking performance on high-load projects
PDF
Linux-Permission
PPTX
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
PDF
Hash Functions FTW
PDF
Chronix: Long Term Storage and Retrieval Technology for Anomaly Detection in ...
ODP
To Infinity & Beyond: Protocols & sequences in Node - Part 2
PDF
Chronix Poster for the Poster Session FAST 2017
PDF
PyCon KR 2019 sprint - RustPython by example
PDF
Intro to Apache Storm
PDF
Openstack 簡介
PPTX
Deep dumpster diving 2010
PDF
Nodejs - Should Ruby Developers Care?
PDF
Aaron Mildenstein - Using Logstash with Zabbix
PDF
Tuga IT 2017 - Redis
PPT
PDF
CQL: SQL In Cassandra
PDF
Devoxx france 2015 influx db
JVM performance options. How it works
Handling 20 billion requests a month
Tweaking performance on high-load projects
Linux-Permission
RedisConf17 - Internet Archive - Preventing Cache Stampede with Redis and XFetch
Hash Functions FTW
Chronix: Long Term Storage and Retrieval Technology for Anomaly Detection in ...
To Infinity & Beyond: Protocols & sequences in Node - Part 2
Chronix Poster for the Poster Session FAST 2017
PyCon KR 2019 sprint - RustPython by example
Intro to Apache Storm
Openstack 簡介
Deep dumpster diving 2010
Nodejs - Should Ruby Developers Care?
Aaron Mildenstein - Using Logstash with Zabbix
Tuga IT 2017 - Redis
CQL: SQL In Cassandra
Devoxx france 2015 influx db
Ad

Viewers also liked (9)

PDF
OGP: You, Me and Opendata
PDF
YAPC::Brasil 2009, POE
PDF
PDF
You, me and Opendata - v2
PPTX
OGP: You, Me and Opendata
YAPC::Brasil 2009, POE
You, me and Opendata - v2
Ad

Similar to Statim, time series interface for Perl. (20)

PPTX
MongoDB Use Cases: Healthcare, CMS, Analytics
PDF
Kineograph
PDF
20170504 - Warp 10 Tour, 42 USA
PPTX
OneTick and the R mathematical language, a presentation from R in Finance
PDF
Fluentd meetup #3
PDF
March 29, 2016 Dr. Josiah Carlson talks about using Redis as a Time Series DB
PPTX
Realtime Analytics with MongoDB Counters (mongonyc 2012)
PDF
Redis TimeSeries: Danni Moiseyev, Pieter Cailliau
PDF
Time Series Analysis by JavaScript LL matsuri 2013
PDF
Target Holding - Big Dikes and Big Data
PDF
Processing and analysing streaming data with Python. Pycon Italy 2022
PDF
Cassandra NYC 2011 Data Modeling
PDF
Sensor Data Management
PDF
Scalable Data Storage Getting You Down? To The Cloud!
PDF
Scalable Data Storage Getting you Down? To the Cloud!
PDF
Bringing back the excitement to data analysis
PDF
spChains: A Declarative Framework for Data Stream Processing in Pervasive App...
PPTX
MongoDB for Time Series Data: Setting the Stage for Sensor Management
PDF
STING: Spatio-Temporal Interaction Networks and Graphs for Intel Platforms
MongoDB Use Cases: Healthcare, CMS, Analytics
Kineograph
20170504 - Warp 10 Tour, 42 USA
OneTick and the R mathematical language, a presentation from R in Finance
Fluentd meetup #3
March 29, 2016 Dr. Josiah Carlson talks about using Redis as a Time Series DB
Realtime Analytics with MongoDB Counters (mongonyc 2012)
Redis TimeSeries: Danni Moiseyev, Pieter Cailliau
Time Series Analysis by JavaScript LL matsuri 2013
Target Holding - Big Dikes and Big Data
Processing and analysing streaming data with Python. Pycon Italy 2022
Cassandra NYC 2011 Data Modeling
Sensor Data Management
Scalable Data Storage Getting You Down? To The Cloud!
Scalable Data Storage Getting you Down? To the Cloud!
Bringing back the excitement to data analysis
spChains: A Declarative Framework for Data Stream Processing in Pervasive App...
MongoDB for Time Series Data: Setting the Stage for Sensor Management
STING: Spatio-Temporal Interaction Networks and Graphs for Intel Platforms

More from Thiago Rondon (20)

PDF
AppCívico - Tecnologias cívicas estão impactando políticas públicas
PDF
Democracia nas eleições
PDF
IOTA - Open Indicators of Transparency and Accountability
PDF
Dados abertos é inovação
PDF
YAPC::2014 Accountability
PDF
PDF
Auto Scaling AWS
PDF
Provisionamento orquestrado nas nuvens com Juju
PDF
introducción a la Red Latinoamericana
PDF
PDF
TDC 2012 - You, Me and Opendata
PDF
Onde Acontece ?
PDF
Opendata - Não posso fazer tijolos sem barro !
PDF
Dados abertos do wikipedia ao governo
PDF
Para onde foi o meu dinheiro ?
PDF
Datos abiertos, Gobierno y la sociedad en conjunto.
PDF
OpenData-BR, [Captando] Dados públicos brasileiros
PDF
Net::RabbitMQ(::Simple)
PDF
Cache, Concorrência e Sincronização.
PDF
HTTP, Requisição e Resposta
AppCívico - Tecnologias cívicas estão impactando políticas públicas
Democracia nas eleições
IOTA - Open Indicators of Transparency and Accountability
Dados abertos é inovação
YAPC::2014 Accountability
Auto Scaling AWS
Provisionamento orquestrado nas nuvens com Juju
introducción a la Red Latinoamericana
TDC 2012 - You, Me and Opendata
Onde Acontece ?
Opendata - Não posso fazer tijolos sem barro !
Dados abertos do wikipedia ao governo
Para onde foi o meu dinheiro ?
Datos abiertos, Gobierno y la sociedad en conjunto.
OpenData-BR, [Captando] Dados públicos brasileiros
Net::RabbitMQ(::Simple)
Cache, Concorrência e Sincronização.
HTTP, Requisição e Resposta

Recently uploaded (20)

PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
KodekX | Application Modernization Development
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Encapsulation theory and applications.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Modernizing your data center with Dell and AMD
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Big Data Technologies - Introduction.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Machine learning based COVID-19 study performance prediction
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
NewMind AI Monthly Chronicles - July 2025
Spectral efficient network and resource selection model in 5G networks
KodekX | Application Modernization Development
Advanced methodologies resolving dimensionality complications for autism neur...
Digital-Transformation-Roadmap-for-Companies.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Encapsulation theory and applications.pdf
Network Security Unit 5.pdf for BCA BBA.
Modernizing your data center with Dell and AMD
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
“AI and Expert System Decision Support & Business Intelligence Systems”
Diabetes mellitus diagnosis method based random forest with bat algorithm
Big Data Technologies - Introduction.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
Machine learning based COVID-19 study performance prediction

Statim, time series interface for Perl.

  • 1. Statim time series interface for Perl Thiago Rondon YAPC::Brasil 2011
  • 3. “The greatest value of a picture is that is forces us to notice what we never expected to see” -- John Tukey
  • 4. Where ? • Astronomy • Apps • Medicine • Operating System • Stock Market • Networks • Meteorology • Robotics • Biometrics • Events • Geology • ....
  • 8. Bar
  • 10. Area
  • 14. Pie
  • 16. What ? • time series is a sequence of data points, measured typically at successive times spaced at uniform time intervals. • interface define a set of methods and conventions that provides a consistent time series interface.
  • 17. Why ? • real time statistics. • simple way to deploy. • support openstandards • distributed input • provides default methods, functions, tools and etc.
  • 18. Motivation • independent • many writers • abstract layer on top of other databases to map and reduce. • Portability • easy integration
  • 19. But, we need more. • 3D,Visualizing data. • Euclidean distance • Find similar patterns • Anomaly detection • Rule discovery • Frequent pattern discovery
  • 20. Architecture TCP TCP Server Client Perl storage schema engine Client REST REST Server Client
  • 21. Conventions • data collection • period (time units) • step and timestamp. • type of aggregation • fields
  • 22. Engine • AnyEvent • TCP • REST
  • 23. Storage • Key Interface • Redis • Memcached • Table Interface • DBI • File • RRD Interface • RRD
  • 24. Schema { "collection" : { "period" : "84600", "aggregate" : "sum", "fields" : { "foo" : "count", "bar" : "enum", "jaz" : "enum" } } }
  • 25. Command • add, get and set • period, step • version, quit
  • 26. Commands • add collection foo:jaz bar:1 • OK 1 • add collection foo:jaz bar:1 • OK 2 • add collection foo:wow bar:10 • OK 10 • get collection foo:jaz bar • OK 2 • get collection bar • OK 12 • set collection foo:jaz bar:2 • OK 2
  • 27. Commands with “ts” • You can pass timestamp with “ts”. • add collection foo:bar ts:123467890 bar:1 • You can get a new series with “ts” • get collection foo:bar ts:1234567880-1234567890 bar
  • 28. Commands with step • You can pass step with “step”. • add collection foo:bar step:-10 bar:1 • You can get a new series with “step” • get collection foo:bar step:-10..-20 bar
  • 29. step vs timestamp • You can get the step in server by: • step 1234567890 • Or make the calc in the client.
  • 30. timestamp vs step • Timestamp make easy life to insert data • Step make easy life to get data
  • 31. New time series by periods. • get collection bar:jaz ts:$ts1-$ts2 foo:max • get collection bar:* ts:$ts1-$ts2 foo:max • get collection bar:jaz ts:$ts1-$ts3 foo:min • get collection ts:$ts1-$ts3 foo:sum • get collection ts:$ts1-$ts3 foo:avg • get collection ts:$ts1-$ts3 foo:distinct
  • 32. New time series by periods. • get collection ts:$ts1-$ts2 foo:trend(5) • get collection ts:$ts1-$ts2 foo:anomaly(100) • get collection ts:$ts1-$ts3 foo:frequency(200)
  • 33. Chart ! • You can use any lib to do that. • Server-side, eg. Chart::Cliker. • Client-site, eg. html5 and javascript libs.
  • 34. REST • You can extend to any protocol. • statim-rest : /method/[args]