SlideShare a Scribd company logo
1 of 33
Download to read offline
Monitoring and
                          Feature Toggle Pattern
                                with JMX

                                 Bruno Bonfils
                                Cyrille Le Clerc   15/06/2011




Thursday, June 16, 2011
Speaker



                          @cyrilleleclerc
                          blog.xebia.fr


                               Cyrille Le Clerc
                                                                 Large Scale


                                                       In Memory Data Grid
       Open Source
       (Apache CXF, ...)

                                            “you build it, you run it”

                                                                               2
Thursday, June 16, 2011
The use case




                                         3
Thursday, June 16, 2011
The Use Case

                                         Corporate Data Center




                          travel-ecommerce
                                                                 anti-fraud
                              Tomcat
                                                                  Tomcat


                          travel-ecommerce                       anti-fraud
                              Tomcat                              Tomcat



                                                                 Credit Card Service




                          Travel e-commerce application

                                                                                       4
Thursday, June 16, 2011
The Use Case

 xebia-spring-travel source code
      ▶   http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/

      ▶ Groovy            JMX scripts
            » http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel-
              ecommerce/src/main/scripts/

      ▶ JMXTrans             Configuration
            » http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel-
              ecommerce/src/main/jmxtrans/

      ▶ JMeter            plan
            » http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel-
              ecommerce/src/main/jmeter/


 xebia-management-extras JMX library
      ▶   http://code.google.com/p/xebia-france/wiki/XebiaManagementExtras




                                                                                                                                        5
Thursday, June 16, 2011
Part 1
                          Monitoring with JMX




                                                6
Thursday, June 16, 2011
Simplified Use Case




                                                7
Thursday, June 16, 2011
Simplified Use Case


                                    Corporate Data Center




                                 travel-ecommerce
                                      Tomcat


                                                              Credit Card Service
                                                                   Mock




                          Monitoring Booking and Credit Card Service

                                                                                    8
Thursday, June 16, 2011
Simplified Use Case


                                    Corporate Data Center




                                 travel-ecommerce
                                      Tomcat


                                                              Credit Card Service
                                                                   Mock




                          Monitoring Booking and Credit Card Service

                                                                                    9
Thursday, June 16, 2011
Custom/business indicator monitoring
                                      with JMX




                                                                 10
Thursday, June 16, 2011
Custom Indicator Monitoring with JMX



                                                 CreditCardService

                                                    #purchase()



                     CreditCardService MonitoringImpl                CreditCardServiceImpl

                               #purchase()                               #purchase()




             monitoring logic isolated with a delegate pattern



                                                                                             11
Thursday, June 16, 2011
Custom Indicator Monitoring with JMX
@ManagedResource
public class CreditCardServiceMonitoringImpl implements CreditCardService {

  // delegate
  private CreditCardService creditCardService;
  // counters
  private final AtomicInteger purchaseInvocationCounter = new AtomicInteger();
  private final AtomicLong purchaseInvocationDurationInNanosCounter = new AtomicLong();
  private final AtomicInteger threeDSecureVerificationExceptionCounter = new AtomicInteger();

  @Override
  public PaymentTransaction purchase(MonetaryAmount total, Order order, String requestId) {
    long nanosBefore = System.nanoTime();

      try {

         return creditCardService.purchase(total, order, requestId);

      } catch (ThreeDSecureVerificationException e) {
        threeDSecureVerificationExceptionCounter.incrementAndGet();
        throw e;
      } finally {
        purchaseInvocationCounter.incrementAndGet();
        purchaseInvocationDurationInNanosCounter.addAndGet(System.nanoTime() - nanosBefore);
      }
  }
                  http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel-ecommerce/src/main/java/fr/
                  xebia/monitoring/demo/payment/CreditCardServiceMonitoringImpl.java


                                                                                                                                                                                    12
Thursday, June 16, 2011
Accessing JMX is not so difficult




                                                              13
Thursday, June 16, 2011
JMX Monitoring with Visual VM




                                14
Thursday, June 16, 2011
JMX Monitoring with JSP Pages

                          Powered by JMX !




 Human friendly or script friendly pages

 Beware of security
      ▶ BasicAuth
      ▶ Obfuscated URL : /my-app/seye5E7E/jmx/cxf.jsp

                                                        15
Thursday, June 16, 2011
Graphite - JMXTrans Style Reporting Tools




 {
     "servers" : [ {
       "port" : "6969",
       "host" : "my-server-1",
       "alias" : "travel-ecommerce-1",
       "queries" : [
       {
           "outputWriters" : [ {
                 "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter",
                 "settings" : { "port" : 2003, "host" : "graphite-server" }

       	
               }],
       "obj": "travel-ecommerce:name=CreditCardServiceMonitoringImpl,...",
                                                                                                                                             Graphite
       	
       "resultAlias" : "CreditCardService",
       	
       "attr":["PurchaseInvocationCount", "ThreeDSecureVerificationExceptionCount", ...]
       }
       ],
       "numQueryThreads" : 2

                   JMX Trans Configuration
     } ]
 }


                          http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel-
                          ecommerce/src/main/jmxtrans/xebia-spring-travel-ecommerce-jmxtrans.json                                                                16
Thursday, June 16, 2011
Monotoring systems




                              AppDynamics




                    Hyperic
                              All others ...
                                               17
Thursday, June 16, 2011
JVM Based Scripting Language




                          http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring-
                          travel-1.0.0/xebia-spring-travel-ecommerce/src/main/scripts/getAntiFraudVerificationStatus.groovy
                                                                                                                                18
Thursday, June 16, 2011
Part 2
                          Feature Toggle Pattern with JMX




                                                            19
Thursday, June 16, 2011
Simplified Use Case




                                                20
Thursday, June 16, 2011
Simplified Use Case




                                         Corporate Data Center




                          travel-ecommerce
                                                                 anti-fraud
                              Tomcat
                                                                  Tomcat


                                                                 Credit Card Service




                          Enable anti-fraud



                                                                                       21
Thursday, June 16, 2011
What ? Why ?




                                         22
Thursday, June 16, 2011
What is it ?


 Technique to enable/disable a feature without
    redeploying

 Can be simple : on/off

 Can be sophisticated : f(user), f(server), etc




                                                   23
Thursday, June 16, 2011
Benefits of the Feature Toggle Pattern

 Dissociate deployment & feature activation

 Progressive activation of a feature
                     Canary Testing

 Measure impacts of a new version
               A/B Testing

 Differ feature activation on production

 Trunk based development

                                               24
Thursday, June 16, 2011
Coding Patterns




                                            25
Thursday, June 16, 2011
Coding Patterns
Dispatcher

                                                       AntiFraudService
                                                         <<Interface>>




                                                                           AntiFraudServiceV1Impl
                               AntiFraudService
                                DispatchingImpl
                                                                           AntiFraudServiceV2Impl




           JMX
            transient                persistent



                   The dispatcher holds the feature toggle
                          http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring-
                          travel-1.0.0/xebia-spring-travel-ecommerce/src/main/java/fr/xebia/ws/travel/antifraud/v1_0/
                          AntiFraudServiceDispatchingImpl.java                                                                  26
Thursday, June 16, 2011
Coding Patterns
To duplicate or not to duplicate ?



                      Dispatching




                               Smart reuse and mutualization


                          Dispatching




                                        Brutal duplication
              Version 1

              Version 2



                                                               27
Thursday, June 16, 2011
Coding Patterns
To duplicate or not to duplicate ?



                   Dispatching




                               Smart reuse and mutualization


                          Dispatching




                                        Brutal duplication
              Version 1

              Version 2



                                                               28
Thursday, June 16, 2011
Coding Patterns
To duplicate or not to duplicate ?



                   Dispatching




                               Smart reuse and mutualization


                          Dispatching




                                        Brutal duplication
              Version 1

              Version 2



                                                               29
Thursday, June 16, 2011
Coding Patterns
To duplicate or not to duplicate ?

                          Old version removal requires cleanup


                          Smart reuse and mutualization



                             Old version removal is clean

                             Brutal duplication
              Version 1

              Version 2



                                                                 30
Thursday, June 16, 2011
Coding Patterns
To duplicate or not to duplicate ?




       Old code removal is simpler with brutal duplication




                                                             31
Thursday, June 16, 2011
Demo




                                 32
Thursday, June 16, 2011
Questions / Answers




                          ?

                              33
Thursday, June 16, 2011

More Related Content

Viewers also liked

Practical Monitoring Techniques
Practical Monitoring TechniquesPractical Monitoring Techniques
Practical Monitoring TechniquesAriel Moskovich
 
Which watcher watches CloudWatch
Which watcher watches CloudWatch Which watcher watches CloudWatch
Which watcher watches CloudWatch David Lutz
 
Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015
Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015
Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015DevOpsBangalore
 
5 Ways ITSM can Support DevOps, an ITSM Academy Webinar
5 Ways ITSM can Support DevOps, an ITSM Academy Webinar5 Ways ITSM can Support DevOps, an ITSM Academy Webinar
5 Ways ITSM can Support DevOps, an ITSM Academy WebinarITSM Academy, Inc.
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsNima Badiey
 
DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015Yuval Yeret
 
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011Henri Gomez
 
Run IT Support the DevOps Way
Run IT Support the DevOps WayRun IT Support the DevOps Way
Run IT Support the DevOps WayAtlassian
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)roland.huss
 
Jelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service ProvidersJelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service ProvidersJelastic Multi-Cloud PaaS
 
Public Opinion Landscape: Economy 5.25.16
Public Opinion Landscape: Economy 5.25.16Public Opinion Landscape: Economy 5.25.16
Public Opinion Landscape: Economy 5.25.16GloverParkGroup
 
戴紅玫瑰的醜女人
戴紅玫瑰的醜女人戴紅玫瑰的醜女人
戴紅玫瑰的醜女人He Yan
 

Viewers also liked (15)

Practical Monitoring Techniques
Practical Monitoring TechniquesPractical Monitoring Techniques
Practical Monitoring Techniques
 
Which watcher watches CloudWatch
Which watcher watches CloudWatch Which watcher watches CloudWatch
Which watcher watches CloudWatch
 
Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015
Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015
Measured availability - Sanjay Singh - DevOps Bangalore meetup March 28th 2015
 
5 Ways ITSM can Support DevOps, an ITSM Academy Webinar
5 Ways ITSM can Support DevOps, an ITSM Academy Webinar5 Ways ITSM can Support DevOps, an ITSM Academy Webinar
5 Ways ITSM can Support DevOps, an ITSM Academy Webinar
 
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamicsMonitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
Monitoring Cloud Native Apps on Pivotal Cloud Foundry with AppDynamics
 
DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015DevOps/Flow workshop for agile india 2015
DevOps/Flow workshop for agile india 2015
 
Devoxx 2014 monitoring
Devoxx 2014 monitoringDevoxx 2014 monitoring
Devoxx 2014 monitoring
 
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
 
Run IT Support the DevOps Way
Run IT Support the DevOps WayRun IT Support the DevOps Way
Run IT Support the DevOps Way
 
Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)Jolokia - JMX on Capsaicin (Devoxx 2011)
Jolokia - JMX on Capsaicin (Devoxx 2011)
 
Jelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service ProvidersJelastic - DevOps PaaS Business with Docker Support for Service Providers
Jelastic - DevOps PaaS Business with Docker Support for Service Providers
 
Public Opinion Landscape: Economy 5.25.16
Public Opinion Landscape: Economy 5.25.16Public Opinion Landscape: Economy 5.25.16
Public Opinion Landscape: Economy 5.25.16
 
戴紅玫瑰的醜女人
戴紅玫瑰的醜女人戴紅玫瑰的醜女人
戴紅玫瑰的醜女人
 
Evaluation q2
Evaluation q2Evaluation q2
Evaluation q2
 
Resources
ResourcesResources
Resources
 

Similar to Paris Devops - Monitoring And Feature Toggle Pattern With JMX

Good Data: Collaborative Analytics On Demand
Good Data: Collaborative Analytics On DemandGood Data: Collaborative Analytics On Demand
Good Data: Collaborative Analytics On Demandzsvoboda
 
Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Zi Bin Cheah
 
iEnterprise - Mit HTML5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML5 zum Unternehmens-Dashboard für TabletsiEnterprise - Mit HTML5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML5 zum Unternehmens-Dashboard für TabletsStefan Kolb
 
iEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für TabletsiEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für TabletsIndiginox
 
WCXM marketplace 2012
WCXM marketplace 2012WCXM marketplace 2012
WCXM marketplace 2012Irina Guseva
 
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011Stephen Thair
 
Smart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer VisionSmart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer VisionIRJET Journal
 
My Name is E & Open Standards
My Name is E & Open StandardsMy Name is E & Open Standards
My Name is E & Open StandardsAndreas - Creten
 
APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...
APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...
APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...ijitcs
 
STKI Mobile brainstorming -MDM Panel
STKI Mobile brainstorming -MDM PanelSTKI Mobile brainstorming -MDM Panel
STKI Mobile brainstorming -MDM PanelShahar Geiger Maor
 
Applying BDD/TDD practices, using Jasmine.js
Applying BDD/TDD practices, using Jasmine.jsApplying BDD/TDD practices, using Jasmine.js
Applying BDD/TDD practices, using Jasmine.jsAnil Tarte
 
Keeping Your Digital Office Clean Wim Putzeys Panoptic
Keeping Your Digital Office Clean Wim Putzeys PanopticKeeping Your Digital Office Clean Wim Putzeys Panoptic
Keeping Your Digital Office Clean Wim Putzeys PanopticWim Putzeys
 
MT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォームMT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォームSix Apart KK
 
ROLE Vision RWTH Aachen
ROLE Vision RWTH AachenROLE Vision RWTH Aachen
ROLE Vision RWTH AachenRalf Klamma
 
Smart Traffic System using Machine Learning
Smart Traffic System using Machine LearningSmart Traffic System using Machine Learning
Smart Traffic System using Machine LearningIRJET Journal
 
Curriculum Vitae Fabio Vitaterna - ENG
Curriculum Vitae Fabio Vitaterna - ENGCurriculum Vitae Fabio Vitaterna - ENG
Curriculum Vitae Fabio Vitaterna - ENGFabio Vitaterna
 
What is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays FinlandWhat is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays FinlandMaarten Balliauw
 
Html5 performance
Html5 performanceHtml5 performance
Html5 performancefanqstefan
 
JavaSE - The road forward
JavaSE - The road forwardJavaSE - The road forward
JavaSE - The road forwardeug3n_cojocaru
 

Similar to Paris Devops - Monitoring And Feature Toggle Pattern With JMX (20)

Good Data: Collaborative Analytics On Demand
Good Data: Collaborative Analytics On DemandGood Data: Collaborative Analytics On Demand
Good Data: Collaborative Analytics On Demand
 
Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011Taiwan Web Standards Talk 2011
Taiwan Web Standards Talk 2011
 
iEnterprise - Mit HTML5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML5 zum Unternehmens-Dashboard für TabletsiEnterprise - Mit HTML5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML5 zum Unternehmens-Dashboard für Tablets
 
iEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für TabletsiEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für Tablets
iEnterprise - Mit HTML-5 zum Unternehmens-Dashboard für Tablets
 
WCXM marketplace 2012
WCXM marketplace 2012WCXM marketplace 2012
WCXM marketplace 2012
 
Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011Measuring web performance. Velocity EU 2011
Measuring web performance. Velocity EU 2011
 
Smart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer VisionSmart Parking Solution using Camera Networks and Real-time Computer Vision
Smart Parking Solution using Camera Networks and Real-time Computer Vision
 
My Name is E & Open Standards
My Name is E & Open StandardsMy Name is E & Open Standards
My Name is E & Open Standards
 
APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...
APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...
APPLICATION OF VARIOUS DEEP LEARNING MODELS FOR AUTOMATIC TRAFFIC VIOLATION D...
 
STKI Mobile brainstorming -MDM Panel
STKI Mobile brainstorming -MDM PanelSTKI Mobile brainstorming -MDM Panel
STKI Mobile brainstorming -MDM Panel
 
Applying BDD/TDD practices, using Jasmine.js
Applying BDD/TDD practices, using Jasmine.jsApplying BDD/TDD practices, using Jasmine.js
Applying BDD/TDD practices, using Jasmine.js
 
Keeping Your Digital Office Clean Wim Putzeys Panoptic
Keeping Your Digital Office Clean Wim Putzeys PanopticKeeping Your Digital Office Clean Wim Putzeys Panoptic
Keeping Your Digital Office Clean Wim Putzeys Panoptic
 
MT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォームMT5で実現するマルチデバイス、クロスプラットフォーム
MT5で実現するマルチデバイス、クロスプラットフォーム
 
ROLE Vision RWTH Aachen
ROLE Vision RWTH AachenROLE Vision RWTH Aachen
ROLE Vision RWTH Aachen
 
Smart Traffic System using Machine Learning
Smart Traffic System using Machine LearningSmart Traffic System using Machine Learning
Smart Traffic System using Machine Learning
 
Curriculum Vitae Fabio Vitaterna - ENG
Curriculum Vitae Fabio Vitaterna - ENGCurriculum Vitae Fabio Vitaterna - ENG
Curriculum Vitae Fabio Vitaterna - ENG
 
What is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays FinlandWhat is going on - Application diagnostics on Azure - TechDays Finland
What is going on - Application diagnostics on Azure - TechDays Finland
 
Html5 performance
Html5 performanceHtml5 performance
Html5 performance
 
Mobile game changer 2011
Mobile game changer 2011Mobile game changer 2011
Mobile game changer 2011
 
JavaSE - The road forward
JavaSE - The road forwardJavaSE - The road forward
JavaSE - The road forward
 

More from Cyrille Le Clerc

Embracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryEmbracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryCyrille Le Clerc
 
Joe Mobile sur le Cloud - DevoxxFR 2013
Joe Mobile sur le Cloud - DevoxxFR 2013Joe Mobile sur le Cloud - DevoxxFR 2013
Joe Mobile sur le Cloud - DevoxxFR 2013Cyrille Le Clerc
 
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...Cyrille Le Clerc
 
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...Cyrille Le Clerc
 
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspectiveGeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspectiveCyrille Le Clerc
 
Java Application Monitoring with AppDynamics' Founder
Java Application Monitoring with AppDynamics' FounderJava Application Monitoring with AppDynamics' Founder
Java Application Monitoring with AppDynamics' FounderCyrille Le Clerc
 
Bonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionBonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionCyrille Le Clerc
 
Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)Cyrille Le Clerc
 
Xebia Knowledge Exchange - Owasp Top Ten
Xebia Knowledge Exchange - Owasp Top TenXebia Knowledge Exchange - Owasp Top Ten
Xebia Knowledge Exchange - Owasp Top TenCyrille Le Clerc
 
Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)Cyrille Le Clerc
 

More from Cyrille Le Clerc (10)

Embracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetryEmbracing Observability in CI/CD with OpenTelemetry
Embracing Observability in CI/CD with OpenTelemetry
 
Joe Mobile sur le Cloud - DevoxxFR 2013
Joe Mobile sur le Cloud - DevoxxFR 2013Joe Mobile sur le Cloud - DevoxxFR 2013
Joe Mobile sur le Cloud - DevoxxFR 2013
 
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...
 
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...
 
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspectiveGeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
GeeCon 2011 - NoSQL and In Memory Data Grids from a developer perspective
 
Java Application Monitoring with AppDynamics' Founder
Java Application Monitoring with AppDynamics' FounderJava Application Monitoring with AppDynamics' Founder
Java Application Monitoring with AppDynamics' Founder
 
Bonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la productionBonnes pratiques des applications java prêtes pour la production
Bonnes pratiques des applications java prêtes pour la production
 
Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)Soirée OSGi au Paris Jug (14/10/2008)
Soirée OSGi au Paris Jug (14/10/2008)
 
Xebia Knowledge Exchange - Owasp Top Ten
Xebia Knowledge Exchange - Owasp Top TenXebia Knowledge Exchange - Owasp Top Ten
Xebia Knowledge Exchange - Owasp Top Ten
 
Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)Soirée Data Grid au Paris JUG (2009/05/12)
Soirée Data Grid au Paris JUG (2009/05/12)
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
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
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
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
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
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
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
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
 
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
 
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
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
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
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

Paris Devops - Monitoring And Feature Toggle Pattern With JMX

  • 1. Monitoring and Feature Toggle Pattern with JMX Bruno Bonfils Cyrille Le Clerc 15/06/2011 Thursday, June 16, 2011
  • 2. Speaker @cyrilleleclerc blog.xebia.fr Cyrille Le Clerc Large Scale In Memory Data Grid Open Source (Apache CXF, ...) “you build it, you run it” 2 Thursday, June 16, 2011
  • 3. The use case 3 Thursday, June 16, 2011
  • 4. The Use Case Corporate Data Center travel-ecommerce anti-fraud Tomcat Tomcat travel-ecommerce anti-fraud Tomcat Tomcat Credit Card Service Travel e-commerce application 4 Thursday, June 16, 2011
  • 5. The Use Case  xebia-spring-travel source code ▶ http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/ ▶ Groovy JMX scripts » http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel- ecommerce/src/main/scripts/ ▶ JMXTrans Configuration » http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel- ecommerce/src/main/jmxtrans/ ▶ JMeter plan » http://xebia-france.googlecode.com/svn/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel- ecommerce/src/main/jmeter/  xebia-management-extras JMX library ▶ http://code.google.com/p/xebia-france/wiki/XebiaManagementExtras 5 Thursday, June 16, 2011
  • 6. Part 1 Monitoring with JMX 6 Thursday, June 16, 2011
  • 7. Simplified Use Case 7 Thursday, June 16, 2011
  • 8. Simplified Use Case Corporate Data Center travel-ecommerce Tomcat Credit Card Service Mock Monitoring Booking and Credit Card Service 8 Thursday, June 16, 2011
  • 9. Simplified Use Case Corporate Data Center travel-ecommerce Tomcat Credit Card Service Mock Monitoring Booking and Credit Card Service 9 Thursday, June 16, 2011
  • 10. Custom/business indicator monitoring with JMX 10 Thursday, June 16, 2011
  • 11. Custom Indicator Monitoring with JMX CreditCardService #purchase() CreditCardService MonitoringImpl CreditCardServiceImpl #purchase() #purchase() monitoring logic isolated with a delegate pattern 11 Thursday, June 16, 2011
  • 12. Custom Indicator Monitoring with JMX @ManagedResource public class CreditCardServiceMonitoringImpl implements CreditCardService { // delegate private CreditCardService creditCardService; // counters private final AtomicInteger purchaseInvocationCounter = new AtomicInteger(); private final AtomicLong purchaseInvocationDurationInNanosCounter = new AtomicLong(); private final AtomicInteger threeDSecureVerificationExceptionCounter = new AtomicInteger(); @Override public PaymentTransaction purchase(MonetaryAmount total, Order order, String requestId) { long nanosBefore = System.nanoTime(); try { return creditCardService.purchase(total, order, requestId); } catch (ThreeDSecureVerificationException e) { threeDSecureVerificationExceptionCounter.incrementAndGet(); throw e; } finally { purchaseInvocationCounter.incrementAndGet(); purchaseInvocationDurationInNanosCounter.addAndGet(System.nanoTime() - nanosBefore); } } http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel-ecommerce/src/main/java/fr/ xebia/monitoring/demo/payment/CreditCardServiceMonitoringImpl.java 12 Thursday, June 16, 2011
  • 13. Accessing JMX is not so difficult 13 Thursday, June 16, 2011
  • 14. JMX Monitoring with Visual VM 14 Thursday, June 16, 2011
  • 15. JMX Monitoring with JSP Pages Powered by JMX !  Human friendly or script friendly pages  Beware of security ▶ BasicAuth ▶ Obfuscated URL : /my-app/seye5E7E/jmx/cxf.jsp 15 Thursday, June 16, 2011
  • 16. Graphite - JMXTrans Style Reporting Tools { "servers" : [ { "port" : "6969", "host" : "my-server-1", "alias" : "travel-ecommerce-1", "queries" : [ { "outputWriters" : [ { "@class" : "com.googlecode.jmxtrans.model.output.GraphiteWriter", "settings" : { "port" : 2003, "host" : "graphite-server" } }], "obj": "travel-ecommerce:name=CreditCardServiceMonitoringImpl,...", Graphite "resultAlias" : "CreditCardService", "attr":["PurchaseInvocationCount", "ThreeDSecureVerificationExceptionCount", ...] } ], "numQueryThreads" : 2 JMX Trans Configuration } ] } http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring-travel-1.0.0/xebia-spring-travel- ecommerce/src/main/jmxtrans/xebia-spring-travel-ecommerce-jmxtrans.json 16 Thursday, June 16, 2011
  • 17. Monotoring systems AppDynamics Hyperic All others ... 17 Thursday, June 16, 2011
  • 18. JVM Based Scripting Language http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring- travel-1.0.0/xebia-spring-travel-ecommerce/src/main/scripts/getAntiFraudVerificationStatus.groovy 18 Thursday, June 16, 2011
  • 19. Part 2 Feature Toggle Pattern with JMX 19 Thursday, June 16, 2011
  • 20. Simplified Use Case 20 Thursday, June 16, 2011
  • 21. Simplified Use Case Corporate Data Center travel-ecommerce anti-fraud Tomcat Tomcat Credit Card Service Enable anti-fraud 21 Thursday, June 16, 2011
  • 22. What ? Why ? 22 Thursday, June 16, 2011
  • 23. What is it ?  Technique to enable/disable a feature without redeploying  Can be simple : on/off  Can be sophisticated : f(user), f(server), etc 23 Thursday, June 16, 2011
  • 24. Benefits of the Feature Toggle Pattern  Dissociate deployment & feature activation  Progressive activation of a feature Canary Testing  Measure impacts of a new version A/B Testing  Differ feature activation on production  Trunk based development 24 Thursday, June 16, 2011
  • 25. Coding Patterns 25 Thursday, June 16, 2011
  • 26. Coding Patterns Dispatcher AntiFraudService <<Interface>> AntiFraudServiceV1Impl AntiFraudService DispatchingImpl AntiFraudServiceV2Impl JMX transient persistent The dispatcher holds the feature toggle http://code.google.com/p/xebia-france/source/browse/training/xebia-spring-travel/tags/xebia-spring- travel-1.0.0/xebia-spring-travel-ecommerce/src/main/java/fr/xebia/ws/travel/antifraud/v1_0/ AntiFraudServiceDispatchingImpl.java 26 Thursday, June 16, 2011
  • 27. Coding Patterns To duplicate or not to duplicate ? Dispatching Smart reuse and mutualization Dispatching Brutal duplication Version 1 Version 2 27 Thursday, June 16, 2011
  • 28. Coding Patterns To duplicate or not to duplicate ? Dispatching Smart reuse and mutualization Dispatching Brutal duplication Version 1 Version 2 28 Thursday, June 16, 2011
  • 29. Coding Patterns To duplicate or not to duplicate ? Dispatching Smart reuse and mutualization Dispatching Brutal duplication Version 1 Version 2 29 Thursday, June 16, 2011
  • 30. Coding Patterns To duplicate or not to duplicate ? Old version removal requires cleanup Smart reuse and mutualization Old version removal is clean Brutal duplication Version 1 Version 2 30 Thursday, June 16, 2011
  • 31. Coding Patterns To duplicate or not to duplicate ? Old code removal is simpler with brutal duplication 31 Thursday, June 16, 2011
  • 32. Demo 32 Thursday, June 16, 2011
  • 33. Questions / Answers ? 33 Thursday, June 16, 2011