SlideShare ist ein Scribd-Unternehmen logo
1 von 12
Jesque In Action
gperf framework
Why?

Easy Job Configuration
Low Latency
Redis is Fast
    Cache
    NoSQL
    Queue
And...
Phase 2: Redis & Jesque
And...
Phase 2: Redis & Jesque
Creating Jobs
perf {
    runners {
        largeNumberPerformanceRunner {
            description = 'Large Number Performance Test'
            maxWorkers = 20
            workerClass = com.perf.runners.math.LargeNumberPerformanceService
        }
    }
}



class LargeNumberPerformanceService extends AbstractPerformanceService {
    Result performTest() {
        Long result = 1
        def executionTime = benchmark {
            100000.times {
                result += it
            }
        }
        new SimpleResult(testName: 'Long Number Performance Service', executionTime: executionTime)
    }
}
The Jesque Job	
class PerformanceRunnerJob {


    GrailsApplication grailsApplication
    RedisService redisService
    ResultsService resultsService
    def executorService


    def perform(jobName, workers) {
        println "jesque queueing up job ${jobName} with ${workers} threads"
        Class clazz = grailsApplication.config?.perf?.runners[jobName]?.workerClass
        if(!clazz) {
            log.error "Can not start a performance worker without a workerClass defined in the config attribute"
        }
        PerformanceService service = (PerformanceService) grailsApplication.mainContext.getBean(clazz)
        Integer.parseInt(workers).times {
            runAsync {
                println "running ${jobName} on thread :: ${Thread.currentThread().id}"
                while(redisService.get(jobName) == PerformanceConstants.RUNNING) {
                     saveResults(jobName, service.performTest())
                }
            }
        }
    }


    private void saveResults(String jobName, Result result) {
        log.debug result
        resultsService.saveResults(jobName, result)
    }
}
Performance Distributed
              Grails Web

 Grails   Grails           Grails   Grails

 Jesque   Jesque           Jesque   Jesque




                   Redis
Performance Distributed
              Grails Web

 Grails   Grails           Grails   Grails

 Jesque   Jesque           Jesque   Jesque




                   Redis
Sequence Diagram
Dashboards!
Dashboards!
Demo

Twitter: @ctoestreich
Blog: http://www.christianoestreich.com
GPerf: http://bit.ly/zBHd6b
Github: https://www.github.com/ctoestreich

Weitere ähnliche Inhalte

Was ist angesagt?

Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012
Toru Furukawa
 

Was ist angesagt? (20)

Scaling up task processing with Celery
Scaling up task processing with CeleryScaling up task processing with Celery
Scaling up task processing with Celery
 
Tdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema RubyTdc 2013 - Ecossistema Ruby
Tdc 2013 - Ecossistema Ruby
 
Infrastructure = code - 1 year later
Infrastructure = code - 1 year laterInfrastructure = code - 1 year later
Infrastructure = code - 1 year later
 
Celery
CeleryCelery
Celery
 
Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012Trying Continuous Delivery - pyconjp 2012
Trying Continuous Delivery - pyconjp 2012
 
Celery for internal API in SOA infrastructure
Celery for internal API in SOA infrastructureCelery for internal API in SOA infrastructure
Celery for internal API in SOA infrastructure
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
 
Celery: The Distributed Task Queue
Celery: The Distributed Task QueueCelery: The Distributed Task Queue
Celery: The Distributed Task Queue
 
Celery with python
Celery with pythonCelery with python
Celery with python
 
V2 and beyond
V2 and beyondV2 and beyond
V2 and beyond
 
Capistrano 2 Rocks My World
Capistrano 2 Rocks My WorldCapistrano 2 Rocks My World
Capistrano 2 Rocks My World
 
Introduction to Python Celery
Introduction to Python CeleryIntroduction to Python Celery
Introduction to Python Celery
 
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
Cachopo - Scalable Stateful Services - Madrid Elixir MeetupCachopo - Scalable Stateful Services - Madrid Elixir Meetup
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
 
kRouter
kRouterkRouter
kRouter
 
The Puppet Master on the JVM - PuppetConf 2014
The Puppet Master on the JVM - PuppetConf 2014The Puppet Master on the JVM - PuppetConf 2014
The Puppet Master on the JVM - PuppetConf 2014
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Designing net-aws-glacier
Designing net-aws-glacierDesigning net-aws-glacier
Designing net-aws-glacier
 
Data processing with celery and rabbit mq
Data processing with celery and rabbit mqData processing with celery and rabbit mq
Data processing with celery and rabbit mq
 
Asynchronous Task Queues with Celery
Asynchronous Task Queues with CeleryAsynchronous Task Queues with Celery
Asynchronous Task Queues with Celery
 
Async programming on NET
Async programming on NETAsync programming on NET
Async programming on NET
 

Andere mochten auch

план конспект
план конспектплан конспект
план конспект
savlex
 
Fågeldag
FågeldagFågeldag
Fågeldag
tinzet
 
Vecka 47
Vecka 47Vecka 47
Vecka 47
tinzet
 
現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud
現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud
現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud
Class On Cloud -
 
Raising (funds) athletes
Raising (funds) athletesRaising (funds) athletes
Raising (funds) athletes
Towa Beer
 
Mymentorsaid public deck_tb
Mymentorsaid public deck_tbMymentorsaid public deck_tb
Mymentorsaid public deck_tb
Towa Beer
 
Snogeholm
SnogeholmSnogeholm
Snogeholm
tinzet
 
私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud
私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud 私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud
私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud
Class On Cloud -
 
Рекомендации
РекомендацииРекомендации
Рекомендации
savlex
 
Методработа Крюкова
Методработа КрюковаМетодработа Крюкова
Методработа Крюкова
savlex
 
Skogen
SkogenSkogen
Skogen
tinzet
 
'12 夏期 経済学セクション グローバル化恐慌の真相 資料
'12 夏期 経済学セクション グローバル化恐慌の真相 資料'12 夏期 経済学セクション グローバル化恐慌の真相 資料
'12 夏期 経済学セクション グローバル化恐慌の真相 資料
Class On Cloud -
 

Andere mochten auch (20)

Yurisprudensi
YurisprudensiYurisprudensi
Yurisprudensi
 
план конспект
план конспектплан конспект
план конспект
 
What would hhappen if payday loans are outlawed
What would hhappen if payday loans are outlawedWhat would hhappen if payday loans are outlawed
What would hhappen if payday loans are outlawed
 
Fågeldag
FågeldagFågeldag
Fågeldag
 
Colonial historynotespart2
Colonial historynotespart2Colonial historynotespart2
Colonial historynotespart2
 
Vecka 47
Vecka 47Vecka 47
Vecka 47
 
現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud
現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud
現代と酷似する 世界恐慌の時代と 帰結としての世界大戦 ①世界恐慌とその反省 ClassOnCloud
 
Raising (funds) athletes
Raising (funds) athletesRaising (funds) athletes
Raising (funds) athletes
 
Reglamento financiero
Reglamento financieroReglamento financiero
Reglamento financiero
 
Ed Min Week 7
Ed Min Week 7Ed Min Week 7
Ed Min Week 7
 
Mymentorsaid public deck_tb
Mymentorsaid public deck_tbMymentorsaid public deck_tb
Mymentorsaid public deck_tb
 
Snogeholm
SnogeholmSnogeholm
Snogeholm
 
私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud
私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud 私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud
私塾・義塾の時代 -内田樹blog;「学校教育の終わり」- Class On Cloud
 
Рекомендации
РекомендацииРекомендации
Рекомендации
 
Методработа Крюкова
Методработа КрюковаМетодработа Крюкова
Методработа Крюкова
 
Skogen
SkogenSkogen
Skogen
 
Handboek ICT EventsIT
Handboek ICT EventsITHandboek ICT EventsIT
Handboek ICT EventsIT
 
<legend> presentation
<legend> presentation<legend> presentation
<legend> presentation
 
Vinkelläxa
VinkelläxaVinkelläxa
Vinkelläxa
 
'12 夏期 経済学セクション グローバル化恐慌の真相 資料
'12 夏期 経済学セクション グローバル化恐慌の真相 資料'12 夏期 経済学セクション グローバル化恐慌の真相 資料
'12 夏期 経済学セクション グローバル化恐慌の真相 資料
 

Ähnlich wie GPerf Using Jesque

How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
Ben Lin
 
Fast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on OracleFast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on Oracle
Raimonds Simanovskis
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
David Padbury
 
Background Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRbBackground Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRb
Juan Maiz
 
NetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportNetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience Report
Anton Arhipov
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
Brian Aker
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
Brian Aker
 

Ähnlich wie GPerf Using Jesque (20)

An Introduction to Celery
An Introduction to CeleryAn Introduction to Celery
An Introduction to Celery
 
Apache Spark in your likeness - low and high level customization
Apache Spark in your likeness - low and high level customizationApache Spark in your likeness - low and high level customization
Apache Spark in your likeness - low and high level customization
 
Design Summit - Rails 4 Migration - Aaron Patterson
Design Summit - Rails 4 Migration - Aaron PattersonDesign Summit - Rails 4 Migration - Aaron Patterson
Design Summit - Rails 4 Migration - Aaron Patterson
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScriptjQuery & 10,000 Global Functions: Working with Legacy JavaScript
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
 
How and why i roll my own node.js framework
How and why i roll my own node.js frameworkHow and why i roll my own node.js framework
How and why i roll my own node.js framework
 
Fast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on OracleFast Web Applications Development with Ruby on Rails on Oracle
Fast Web Applications Development with Ruby on Rails on Oracle
 
Matteo Collina | Take your HTTP server to Ludicrous Speed | Codmeotion Madrid...
Matteo Collina | Take your HTTP server to Ludicrous Speed | Codmeotion Madrid...Matteo Collina | Take your HTTP server to Ludicrous Speed | Codmeotion Madrid...
Matteo Collina | Take your HTTP server to Ludicrous Speed | Codmeotion Madrid...
 
Developing web-apps like it's 2013
Developing web-apps like it's 2013Developing web-apps like it's 2013
Developing web-apps like it's 2013
 
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
TDC2018SP | Trilha Go - Processando analise genetica em background com GoTDC2018SP | Trilha Go - Processando analise genetica em background com Go
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
 
Jeroen Vloothuis Bend Kss To Your Will
Jeroen Vloothuis   Bend Kss To Your WillJeroen Vloothuis   Bend Kss To Your Will
Jeroen Vloothuis Bend Kss To Your Will
 
Test-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS ApplicationsTest-Driven Development of AngularJS Applications
Test-Driven Development of AngularJS Applications
 
JavaScript Growing Up
JavaScript Growing UpJavaScript Growing Up
JavaScript Growing Up
 
JavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and LodashJavaScript Fundamentals with Angular and Lodash
JavaScript Fundamentals with Angular and Lodash
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian SchneiderOSGi ecosystems compared on Apache Karaf - Christian Schneider
OSGi ecosystems compared on Apache Karaf - Christian Schneider
 
Background Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRbBackground Jobs - Com BackgrounDRb
Background Jobs - Com BackgrounDRb
 
Angularjs Test Driven Development (TDD)
Angularjs Test Driven Development (TDD)Angularjs Test Driven Development (TDD)
Angularjs Test Driven Development (TDD)
 
RESTful API using scalaz (3)
RESTful API using scalaz (3)RESTful API using scalaz (3)
RESTful API using scalaz (3)
 
NetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience ReportNetBeans Plugin Development: JRebel Experience Report
NetBeans Plugin Development: JRebel Experience Report
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
 
Gearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copyGearmam, from the_worker's_perspective copy
Gearmam, from the_worker's_perspective copy
 

Kürzlich hochgeladen

+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
+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...
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

GPerf Using Jesque

  • 2. Why? Easy Job Configuration Low Latency Redis is Fast Cache NoSQL Queue
  • 5. Creating Jobs perf { runners { largeNumberPerformanceRunner { description = 'Large Number Performance Test' maxWorkers = 20 workerClass = com.perf.runners.math.LargeNumberPerformanceService } } } class LargeNumberPerformanceService extends AbstractPerformanceService { Result performTest() { Long result = 1 def executionTime = benchmark { 100000.times { result += it } } new SimpleResult(testName: 'Long Number Performance Service', executionTime: executionTime) } }
  • 6. The Jesque Job class PerformanceRunnerJob { GrailsApplication grailsApplication RedisService redisService ResultsService resultsService def executorService def perform(jobName, workers) { println "jesque queueing up job ${jobName} with ${workers} threads" Class clazz = grailsApplication.config?.perf?.runners[jobName]?.workerClass if(!clazz) { log.error "Can not start a performance worker without a workerClass defined in the config attribute" } PerformanceService service = (PerformanceService) grailsApplication.mainContext.getBean(clazz) Integer.parseInt(workers).times { runAsync { println "running ${jobName} on thread :: ${Thread.currentThread().id}" while(redisService.get(jobName) == PerformanceConstants.RUNNING) { saveResults(jobName, service.performTest()) } } } } private void saveResults(String jobName, Result result) { log.debug result resultsService.saveResults(jobName, result) } }
  • 7. Performance Distributed Grails Web Grails Grails Grails Grails Jesque Jesque Jesque Jesque Redis
  • 8. Performance Distributed Grails Web Grails Grails Grails Grails Jesque Jesque Jesque Jesque Redis
  • 12. Demo Twitter: @ctoestreich Blog: http://www.christianoestreich.com GPerf: http://bit.ly/zBHd6b Github: https://www.github.com/ctoestreich

Hinweis der Redaktion

  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
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n