SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
Monitoring a Large-Scale Infrastructure with Clojure
Who am I?

          Dennis Rowe
    Senior Software Developer
    Dell MessageOne - DevOps
2                               Oracle OpenWorld 2011
MessageOne

    E-Mail Continuity
     E-Mail Archive
      E-Mail Search

3                       Oracle OpenWorld 2011
The Basics
      2646 Servers
      3 Countries
    3 Billion E-Mail
    5 Million Users
    12 Tired People
4                      Oracle OpenWorld 2011
We got to have a
    way to monitor all
       that stuff…
     Maybe not the people

5                           Oracle OpenWorld 2011
So, we came up with a solution…


6                                Oracle OpenWorld 2011
“Kneel before Zod”
         -- General Zod


7                         Oracle OpenWorld 2011
A Bit of History
             Initially written in Python
            Utilized Twisted framework
    Historical Data stored in relational database

         It worked, but it did not perform
8                                              Oracle OpenWorld 2011
Why?
     Global Interpreter Lock (GIL)
     caused performance problems

    Relational Database not efficient
           for time-series data
9                                       Oracle OpenWorld 2011
So…
                 Why switch to Clojure?
                         It is hip
     It was designed with multi-threading in mind
               It is a functional language
                     It uses the JVM
     We can use all the Java libraries lying around
                       Homoiconic
10                                                Oracle OpenWorld 2011
“And there was much rejoicing”
            -- Monty Python and the Holy Grail




11                                               Oracle OpenWorld 2011
So, this is how we did it




12                               Oracle OpenWorld 2011
Loader
     Takes XML and dumps it on a
       Message Bus (RabbitMQ)
     Nothing much to see here but…
13                              Oracle OpenWorld 2011
Data is Code
     So, how do we store the configurations we want for the various datacenters?

                             As code … data … code …

                                [“dc1” “url1” “type1”
                                “dc2” “url2” “type2”]

               The configs are just Clojure code and they make sense

14                                                                     Oracle OpenWorld 2011
RabbitMQ
                       That is easy
        We will just use the RabbitMQ Java API
       We will create Clojure centric data structures

     This whole Java interoperability is kind of nice …
                 things just kind of work
15                                                Oracle OpenWorld 2011
Also!
     If code is data … then we can just send the code over
                           RabbitMQ


16                                                 Oracle OpenWorld 2011
Wait – What?
                We don’t need any funky configurations?
                     We don’t need to use XML?
                     We don’t need to use JSON?

     If it is Clojure talking to Clojure we can just use data (or is it
                            code, I am confused)


17                                                            Oracle OpenWorld 2011
Persister
       Takes the data off the bus and writes it to disk
         The Java ecosystem has tools for that, too

                           Jrobin

We now have our own little timeseries database and we didn’t
                really have to work for it.
18                                                   Oracle OpenWorld 2011
Consumer
     Takes metrics and does stuff with them
                    Checks
                   Computes
                   Aggregates
             Historical Aggregates
19                                       Oracle OpenWorld 2011
Examples
                    Check
         (check “mta-delay” :degraded
     (above (* 3600 72)) :fmt “%,.1f secs”)

                    Compute
          (compute “mem-swap-used”
        :using [swap_total swap_free]
         :as (- swap_total swap_free))
20                                            Oracle OpenWorld 2011
Aggregate
                  (aggregate “cfg-anomalies”)

                       Historical Aggregate
     (hist-aggregate “index-percent-failed” “index-percent-
                failed#hist-1h” 3600 :agg-fn avg)

21                                                  Oracle OpenWorld 2011
Threading
     All those metrics are Clojure Agents, so I don’t
                 have to worry about it

            All 16 of my processors get used

                       Life is easy

22                                               Oracle OpenWorld 2011
Look




23          Oracle OpenWorld 2011
WWW
      We are not web developer types, which is fine,
     Clojure (plus some libraries) makes that easy, too

                        Compojure
                         Hiccup

                 So, no HTML. Just code
                      [:a {:href “/”}]

24                                                        Oracle OpenWorld 2011
Query
     We need a way to query the data in real time
                Clojure is homiconic
                        So…
          We will just create our own DSL

25                                          Oracle OpenWorld 2011
The DSL
                          It is just code

     We can use existing Clojure functions plus new ones like:
                              where
                               select
                               pivot
                               filter
                                sort
                              format
                        sum-by and agg-by
26                                                               Oracle OpenWorld 2011
Query Example
where :metric [“qsize” “qsize-2h-old” “rate”] |
pivot |
filter (> :qsize 50000) |
select :host
          :qsize
          [(* 100 (- 1 (/ :qsize-2h-old :qsize))) :pct-recent]
          :rate |
sort :pct-recent

27                                                               Oracle OpenWorld 2011
Explanation
         Looks a lot like Linux pipes
     Which is a good way to think about it


          Clojure way of reading it is:
      (sort (select (filter (pivot (where)))))

28                                               Oracle OpenWorld 2011
Output




29            Oracle OpenWorld 2011
DevOps
     What we needed (and what we got)

                 Reports
            Ad-hoc Queries
           Corrective actions?
          Make the app smarter?

30                                      Oracle OpenWorld 2011
Corrective Actions
              Write little python scripts that
               pull data and take actions
           This was so easy that we had to do it
     Simple, repetitive actions are now fully automated
                       Life is better

31                                                    Oracle OpenWorld 2011
App Smarter
     App now uses the monitoring to feed intelligently
             Less operator interaction needed
          More time spent solving real problems

32                                                Oracle OpenWorld 2011
Q and A




33

Contenu connexe

Tendances

Kotlin 101 for Java Developers
Kotlin 101 for Java DevelopersKotlin 101 for Java Developers
Kotlin 101 for Java DevelopersChristoph Pickl
 
RxJava from the trenches
RxJava from the trenchesRxJava from the trenches
RxJava from the trenchesPeter Hendriks
 
JCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJoseph Kuo
 
Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency IdiomsAlex Miller
 
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsTWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsJoseph Kuo
 
Java Serialization
Java SerializationJava Serialization
Java Serializationjeslie
 
Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningCarol McDonald
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the raceVictor_Cr
 
Functional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event SystemsFunctional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event SystemsLeonardo Borges
 
Software Transactioneel Geheugen
Software Transactioneel GeheugenSoftware Transactioneel Geheugen
Software Transactioneel GeheugenDevnology
 
Basics of Java Concurrency
Basics of Java ConcurrencyBasics of Java Concurrency
Basics of Java Concurrencykshanth2101
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fpAlexander Granin
 
Reactive Android: RxJava and beyond
Reactive Android: RxJava and beyondReactive Android: RxJava and beyond
Reactive Android: RxJava and beyondFabio Tiriticco
 
Non blocking programming and waiting
Non blocking programming and waitingNon blocking programming and waiting
Non blocking programming and waitingRoman Elizarov
 
Java 7 - What's New?
Java 7 - What's New?Java 7 - What's New?
Java 7 - What's New?Kobib9
 
Making Java more dynamic: runtime code generation for the JVM
Making Java more dynamic: runtime code generation for the JVMMaking Java more dynamic: runtime code generation for the JVM
Making Java more dynamic: runtime code generation for the JVMRafael Winterhalter
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency GotchasAlex Miller
 
Java Course 5: Enums, Generics, Assertions
Java Course 5: Enums, Generics, AssertionsJava Course 5: Enums, Generics, Assertions
Java Course 5: Enums, Generics, AssertionsAnton Keks
 

Tendances (20)

Kotlin 101 for Java Developers
Kotlin 101 for Java DevelopersKotlin 101 for Java Developers
Kotlin 101 for Java Developers
 
RxJava from the trenches
RxJava from the trenchesRxJava from the trenches
RxJava from the trenches
 
JCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of JavaJCConf 2018 - Retrospect and Prospect of Java
JCConf 2018 - Retrospect and Prospect of Java
 
Java Concurrency
Java ConcurrencyJava Concurrency
Java Concurrency
 
Java Concurrency Idioms
Java Concurrency IdiomsJava Concurrency Idioms
Java Concurrency Idioms
 
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java VersionsTWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
TWJUG x Oracle Groundbreakers 2019 Taiwan - What’s New in Last Java Versions
 
The Java memory model made easy
The Java memory model made easyThe Java memory model made easy
The Java memory model made easy
 
Java Serialization
Java SerializationJava Serialization
Java Serialization
 
Java Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and TuningJava Garbage Collection, Monitoring, and Tuning
Java Garbage Collection, Monitoring, and Tuning
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the race
 
Functional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event SystemsFunctional Reactive Programming / Compositional Event Systems
Functional Reactive Programming / Compositional Event Systems
 
Software Transactioneel Geheugen
Software Transactioneel GeheugenSoftware Transactioneel Geheugen
Software Transactioneel Geheugen
 
Basics of Java Concurrency
Basics of Java ConcurrencyBasics of Java Concurrency
Basics of Java Concurrency
 
Hierarchical free monads and software design in fp
Hierarchical free monads and software design in fpHierarchical free monads and software design in fp
Hierarchical free monads and software design in fp
 
Reactive Android: RxJava and beyond
Reactive Android: RxJava and beyondReactive Android: RxJava and beyond
Reactive Android: RxJava and beyond
 
Non blocking programming and waiting
Non blocking programming and waitingNon blocking programming and waiting
Non blocking programming and waiting
 
Java 7 - What's New?
Java 7 - What's New?Java 7 - What's New?
Java 7 - What's New?
 
Making Java more dynamic: runtime code generation for the JVM
Making Java more dynamic: runtime code generation for the JVMMaking Java more dynamic: runtime code generation for the JVM
Making Java more dynamic: runtime code generation for the JVM
 
Java Concurrency Gotchas
Java Concurrency GotchasJava Concurrency Gotchas
Java Concurrency Gotchas
 
Java Course 5: Enums, Generics, Assertions
Java Course 5: Enums, Generics, AssertionsJava Course 5: Enums, Generics, Assertions
Java Course 5: Enums, Generics, Assertions
 

En vedette

Puppet loves RSpec, why you should, too
Puppet loves RSpec, why you should, tooPuppet loves RSpec, why you should, too
Puppet loves RSpec, why you should, tooDennis Rowe
 
Switching from Puppet to Ansible
Switching from Puppet to AnsibleSwitching from Puppet to Ansible
Switching from Puppet to AnsibleDennis Rowe
 
Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your AnsibleDennis Rowe
 
Investigation of testing with ansible
Investigation of testing with ansibleInvestigation of testing with ansible
Investigation of testing with ansibleDennis Rowe
 
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerDennis Rowe
 
System Hardening Using Ansible
System Hardening Using AnsibleSystem Hardening Using Ansible
System Hardening Using AnsibleSonatype
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentationJohn Lynch
 

En vedette (7)

Puppet loves RSpec, why you should, too
Puppet loves RSpec, why you should, tooPuppet loves RSpec, why you should, too
Puppet loves RSpec, why you should, too
 
Switching from Puppet to Ansible
Switching from Puppet to AnsibleSwitching from Puppet to Ansible
Switching from Puppet to Ansible
 
Drone your Ansible
Drone your AnsibleDrone your Ansible
Drone your Ansible
 
Investigation of testing with ansible
Investigation of testing with ansibleInvestigation of testing with ansible
Investigation of testing with ansible
 
Testing Ansible with Jenkins and Docker
Testing Ansible with Jenkins and DockerTesting Ansible with Jenkins and Docker
Testing Ansible with Jenkins and Docker
 
System Hardening Using Ansible
System Hardening Using AnsibleSystem Hardening Using Ansible
System Hardening Using Ansible
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 

Similaire à Java one 2011 monitoring a large-scale infrastructure with clojure

How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2OracleIDM
 
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part OneThe AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part OneLucas Jellema
 
An introduction to node3
An introduction to node3An introduction to node3
An introduction to node3Vivian S. Zhang
 
Blockchain, Integration, Serverless, Microservices - OOW / Code One 2018 Review
Blockchain, Integration, Serverless, Microservices - OOW / Code One 2018 ReviewBlockchain, Integration, Serverless, Microservices - OOW / Code One 2018 Review
Blockchain, Integration, Serverless, Microservices - OOW / Code One 2018 ReviewRobert van Mölken
 
Programmatic queries: things you can code with sql
Programmatic queries: things you can code with sqlProgrammatic queries: things you can code with sql
Programmatic queries: things you can code with sqlShlomi Noach
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code GenerationEdward Willink
 
Clash of Titans in SDN: OpenDaylight vs ONOS - Elisa Rojas
Clash of Titans in SDN: OpenDaylight vs ONOS - Elisa RojasClash of Titans in SDN: OpenDaylight vs ONOS - Elisa Rojas
Clash of Titans in SDN: OpenDaylight vs ONOS - Elisa RojasOpenNebula Project
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinatingAntonio Goncalves
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Jakarta_EE
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019The Eclipse Foundation
 
Clojure intro Dallas Functional
Clojure intro   Dallas FunctionalClojure intro   Dallas Functional
Clojure intro Dallas FunctionalAdam Hill
 
Clojure Intro - Dallas Functional
Clojure Intro - Dallas FunctionalClojure Intro - Dallas Functional
Clojure Intro - Dallas FunctionalAdam Hill
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )Rajput Rajnish
 
Deep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting StartedDeep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting StartedSuyash Joshi
 
Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807rehoscript
 
Overhauling a database engine in 2 months
Overhauling a database engine in 2 monthsOverhauling a database engine in 2 months
Overhauling a database engine in 2 monthsMax Neunhöffer
 

Similaire à Java one 2011 monitoring a large-scale infrastructure with clojure (20)

How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2How oracle-uses-idm-chirag-v2
How oracle-uses-idm-chirag-v2
 
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part OneThe AMIS Report from Oracle Open World and JavaOne 2011 - Part One
The AMIS Report from Oracle Open World and JavaOne 2011 - Part One
 
An introduction to node3
An introduction to node3An introduction to node3
An introduction to node3
 
Blockchain, Integration, Serverless, Microservices - OOW / Code One 2018 Review
Blockchain, Integration, Serverless, Microservices - OOW / Code One 2018 ReviewBlockchain, Integration, Serverless, Microservices - OOW / Code One 2018 Review
Blockchain, Integration, Serverless, Microservices - OOW / Code One 2018 Review
 
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
AMIS Oracle OpenWorld en Code One Review 2018 - Blockchain, Integration, Serv...
 
Programmatic queries: things you can code with sql
Programmatic queries: things you can code with sqlProgrammatic queries: things you can code with sql
Programmatic queries: things you can code with sql
 
OCL Integration and Code Generation
OCL Integration and Code GenerationOCL Integration and Code Generation
OCL Integration and Code Generation
 
Clash of Titans in SDN: OpenDaylight vs ONOS - Elisa Rojas
Clash of Titans in SDN: OpenDaylight vs ONOS - Elisa RojasClash of Titans in SDN: OpenDaylight vs ONOS - Elisa Rojas
Clash of Titans in SDN: OpenDaylight vs ONOS - Elisa Rojas
 
Are app servers still fascinating
Are app servers still fascinatingAre app servers still fascinating
Are app servers still fascinating
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
Kubernetes Native Java and Eclipse MicroProfile | EclipseCon Europe 2019
 
Clojure intro Dallas Functional
Clojure intro   Dallas FunctionalClojure intro   Dallas Functional
Clojure intro Dallas Functional
 
Clojure Intro - Dallas Functional
Clojure Intro - Dallas FunctionalClojure Intro - Dallas Functional
Clojure Intro - Dallas Functional
 
Rajnish singh(presentation on oracle )
Rajnish singh(presentation on  oracle )Rajnish singh(presentation on  oracle )
Rajnish singh(presentation on oracle )
 
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
AMIS Oracle OpenWorld 2013 Review Part 1 - Intro Overview Innovation, Hardwar...
 
Deep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting StartedDeep Learning for Java Developer - Getting Started
Deep Learning for Java Developer - Getting Started
 
Programming with Freedom & Joy
Programming with Freedom & JoyProgramming with Freedom & Joy
Programming with Freedom & Joy
 
Making Strongly-typed NETCONF Usable
Making Strongly-typed NETCONF UsableMaking Strongly-typed NETCONF Usable
Making Strongly-typed NETCONF Usable
 
Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807Virtual dev-day-java7-keynote-1641807
Virtual dev-day-java7-keynote-1641807
 
Overhauling a database engine in 2 months
Overhauling a database engine in 2 monthsOverhauling a database engine in 2 months
Overhauling a database engine in 2 months
 

Dernier

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 

Dernier (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 

Java one 2011 monitoring a large-scale infrastructure with clojure

  • 1. Monitoring a Large-Scale Infrastructure with Clojure
  • 2. Who am I? Dennis Rowe Senior Software Developer Dell MessageOne - DevOps 2 Oracle OpenWorld 2011
  • 3. MessageOne E-Mail Continuity E-Mail Archive E-Mail Search 3 Oracle OpenWorld 2011
  • 4. The Basics 2646 Servers 3 Countries 3 Billion E-Mail 5 Million Users 12 Tired People 4 Oracle OpenWorld 2011
  • 5. We got to have a way to monitor all that stuff… Maybe not the people 5 Oracle OpenWorld 2011
  • 6. So, we came up with a solution… 6 Oracle OpenWorld 2011
  • 7. “Kneel before Zod” -- General Zod 7 Oracle OpenWorld 2011
  • 8. A Bit of History Initially written in Python Utilized Twisted framework Historical Data stored in relational database It worked, but it did not perform 8 Oracle OpenWorld 2011
  • 9. Why? Global Interpreter Lock (GIL) caused performance problems Relational Database not efficient for time-series data 9 Oracle OpenWorld 2011
  • 10. So… Why switch to Clojure? It is hip It was designed with multi-threading in mind It is a functional language It uses the JVM We can use all the Java libraries lying around Homoiconic 10 Oracle OpenWorld 2011
  • 11. “And there was much rejoicing” -- Monty Python and the Holy Grail 11 Oracle OpenWorld 2011
  • 12. So, this is how we did it 12 Oracle OpenWorld 2011
  • 13. Loader Takes XML and dumps it on a Message Bus (RabbitMQ) Nothing much to see here but… 13 Oracle OpenWorld 2011
  • 14. Data is Code So, how do we store the configurations we want for the various datacenters? As code … data … code … [“dc1” “url1” “type1” “dc2” “url2” “type2”] The configs are just Clojure code and they make sense 14 Oracle OpenWorld 2011
  • 15. RabbitMQ That is easy We will just use the RabbitMQ Java API We will create Clojure centric data structures This whole Java interoperability is kind of nice … things just kind of work 15 Oracle OpenWorld 2011
  • 16. Also! If code is data … then we can just send the code over RabbitMQ 16 Oracle OpenWorld 2011
  • 17. Wait – What? We don’t need any funky configurations? We don’t need to use XML? We don’t need to use JSON? If it is Clojure talking to Clojure we can just use data (or is it code, I am confused) 17 Oracle OpenWorld 2011
  • 18. Persister Takes the data off the bus and writes it to disk The Java ecosystem has tools for that, too Jrobin We now have our own little timeseries database and we didn’t really have to work for it. 18 Oracle OpenWorld 2011
  • 19. Consumer Takes metrics and does stuff with them Checks Computes Aggregates Historical Aggregates 19 Oracle OpenWorld 2011
  • 20. Examples Check (check “mta-delay” :degraded (above (* 3600 72)) :fmt “%,.1f secs”) Compute (compute “mem-swap-used” :using [swap_total swap_free] :as (- swap_total swap_free)) 20 Oracle OpenWorld 2011
  • 21. Aggregate (aggregate “cfg-anomalies”) Historical Aggregate (hist-aggregate “index-percent-failed” “index-percent- failed#hist-1h” 3600 :agg-fn avg) 21 Oracle OpenWorld 2011
  • 22. Threading All those metrics are Clojure Agents, so I don’t have to worry about it All 16 of my processors get used Life is easy 22 Oracle OpenWorld 2011
  • 23. Look 23 Oracle OpenWorld 2011
  • 24. WWW We are not web developer types, which is fine, Clojure (plus some libraries) makes that easy, too Compojure Hiccup So, no HTML. Just code [:a {:href “/”}] 24 Oracle OpenWorld 2011
  • 25. Query We need a way to query the data in real time Clojure is homiconic So… We will just create our own DSL 25 Oracle OpenWorld 2011
  • 26. The DSL It is just code We can use existing Clojure functions plus new ones like: where select pivot filter sort format sum-by and agg-by 26 Oracle OpenWorld 2011
  • 27. Query Example where :metric [“qsize” “qsize-2h-old” “rate”] | pivot | filter (> :qsize 50000) | select :host :qsize [(* 100 (- 1 (/ :qsize-2h-old :qsize))) :pct-recent] :rate | sort :pct-recent 27 Oracle OpenWorld 2011
  • 28. Explanation Looks a lot like Linux pipes Which is a good way to think about it Clojure way of reading it is: (sort (select (filter (pivot (where))))) 28 Oracle OpenWorld 2011
  • 29. Output 29 Oracle OpenWorld 2011
  • 30. DevOps What we needed (and what we got) Reports Ad-hoc Queries Corrective actions? Make the app smarter? 30 Oracle OpenWorld 2011
  • 31. Corrective Actions Write little python scripts that pull data and take actions This was so easy that we had to do it Simple, repetitive actions are now fully automated Life is better 31 Oracle OpenWorld 2011
  • 32. App Smarter App now uses the monitoring to feed intelligently Less operator interaction needed More time spent solving real problems 32 Oracle OpenWorld 2011