SlideShare a Scribd company logo
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

More Related Content

What's hot (20)

PDF
Scaling up task processing with Celery
Nicolas Grasset
 
PDF
Tdc 2013 - Ecossistema Ruby
Fabio Akita
 
PDF
Infrastructure = code - 1 year later
Christian Ortner
 
PDF
Celery
Fatih Erikli
 
PDF
Trying Continuous Delivery - pyconjp 2012
Toru Furukawa
 
PDF
Celery for internal API in SOA infrastructure
Roman Imankulov
 
PDF
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Puppet
 
PDF
Celery: The Distributed Task Queue
Richard Leland
 
PDF
Celery with python
Alexandre González Rodríguez
 
PDF
V2 and beyond
jimi-c
 
PDF
Capistrano 2 Rocks My World
Graeme Mathieson
 
ODP
Introduction to Python Celery
Mahendra M
 
PDF
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
Abel Muíño
 
PDF
kRouter
Kelp Chen
 
PDF
The Puppet Master on the JVM - PuppetConf 2014
Puppet
 
PPTX
Toolbox of a Ruby Team
Arto Artnik
 
PDF
Designing net-aws-glacier
Workhorse Computing
 
PDF
Data processing with celery and rabbit mq
Jeff Peck
 
PPTX
Asynchronous Task Queues with Celery
Kishor Kumar
 
PPT
Async programming on NET
yuyijq
 
Scaling up task processing with Celery
Nicolas Grasset
 
Tdc 2013 - Ecossistema Ruby
Fabio Akita
 
Infrastructure = code - 1 year later
Christian Ortner
 
Celery
Fatih Erikli
 
Trying Continuous Delivery - pyconjp 2012
Toru Furukawa
 
Celery for internal API in SOA infrastructure
Roman Imankulov
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Puppet
 
Celery: The Distributed Task Queue
Richard Leland
 
Celery with python
Alexandre González Rodríguez
 
V2 and beyond
jimi-c
 
Capistrano 2 Rocks My World
Graeme Mathieson
 
Introduction to Python Celery
Mahendra M
 
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
Abel Muíño
 
kRouter
Kelp Chen
 
The Puppet Master on the JVM - PuppetConf 2014
Puppet
 
Toolbox of a Ruby Team
Arto Artnik
 
Designing net-aws-glacier
Workhorse Computing
 
Data processing with celery and rabbit mq
Jeff Peck
 
Asynchronous Task Queues with Celery
Kishor Kumar
 
Async programming on NET
yuyijq
 

Viewers also liked (20)

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

Similar to GPerf Using Jesque (20)

PDF
An Introduction to Celery
Idan Gazit
 
PPTX
Apache Spark in your likeness - low and high level customization
Bartosz Konieczny
 
PDF
Design Summit - Rails 4 Migration - Aaron Patterson
ManageIQ
 
PDF
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
Guy Royse
 
KEY
How and why i roll my own node.js framework
Ben Lin
 
PDF
Fast Web Applications Development with Ruby on Rails on Oracle
Raimonds Simanovskis
 
PDF
Matteo Collina | Take your HTTP server to Ludicrous Speed | Codmeotion Madrid...
Codemotion
 
PPTX
Developing web-apps like it's 2013
Laurent_VB
 
PDF
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
tdc-globalcode
 
PDF
Jeroen Vloothuis Bend Kss To Your Will
Vincenzo Barone
 
PDF
Test-Driven Development of AngularJS Applications
FITC
 
KEY
JavaScript Growing Up
David Padbury
 
PDF
JavaScript Fundamentals with Angular and Lodash
Bret Little
 
PDF
OSGi ecosystems compared on Apache Karaf - Christian Schneider
mfrancis
 
PDF
Background Jobs - Com BackgrounDRb
Juan Maiz
 
PDF
Angularjs Test Driven Development (TDD)
Anis Bouhachem Djer
 
PDF
RESTful API using scalaz (3)
Yeshwanth Kumar
 
PPTX
NetBeans Plugin Development: JRebel Experience Report
Anton Arhipov
 
PPT
Gearmam, from the_worker's_perspective copy
Brian Aker
 
PPT
Gearmam, from the_worker's_perspective copy
Brian Aker
 
An Introduction to Celery
Idan Gazit
 
Apache Spark in your likeness - low and high level customization
Bartosz Konieczny
 
Design Summit - Rails 4 Migration - Aaron Patterson
ManageIQ
 
jQuery & 10,000 Global Functions: Working with Legacy JavaScript
Guy Royse
 
How and why i roll my own node.js framework
Ben Lin
 
Fast Web Applications Development with Ruby on Rails on Oracle
Raimonds Simanovskis
 
Matteo Collina | Take your HTTP server to Ludicrous Speed | Codmeotion Madrid...
Codemotion
 
Developing web-apps like it's 2013
Laurent_VB
 
TDC2018SP | Trilha Go - Processando analise genetica em background com Go
tdc-globalcode
 
Jeroen Vloothuis Bend Kss To Your Will
Vincenzo Barone
 
Test-Driven Development of AngularJS Applications
FITC
 
JavaScript Growing Up
David Padbury
 
JavaScript Fundamentals with Angular and Lodash
Bret Little
 
OSGi ecosystems compared on Apache Karaf - Christian Schneider
mfrancis
 
Background Jobs - Com BackgrounDRb
Juan Maiz
 
Angularjs Test Driven Development (TDD)
Anis Bouhachem Djer
 
RESTful API using scalaz (3)
Yeshwanth Kumar
 
NetBeans Plugin Development: JRebel Experience Report
Anton Arhipov
 
Gearmam, from the_worker's_perspective copy
Brian Aker
 
Gearmam, from the_worker's_perspective copy
Brian Aker
 
Ad

Recently uploaded (20)

PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
July Patch Tuesday
Ivanti
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Biography of Daniel Podor.pdf
Daniel Podor
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
July Patch Tuesday
Ivanti
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
IoT-Powered Industrial Transformation – Smart Manufacturing to Connected Heal...
Rejig Digital
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 

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

Editor's Notes