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

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
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
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
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
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
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?
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 

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