Upgrade to Pro — share decks privately, control downloads, hide ads and more …

MoSKito at SIlpion Solutionscamp 2014

Leon Rosenberg
September 12, 2014

MoSKito at SIlpion Solutionscamp 2014

MoSKito als leistungsfähige Open-Source Alternative zu Applikation Management Systemen wie NewRelic oder AppDynamic - Slides - http://www.solutionscamp.de/session-detail/?3-moskito-als-leistungsfaehige-open-source-alternative-zu-applikation-management-systemen-wie-newrelic-oder-appdynamic

Leon Rosenberg

September 12, 2014
Tweet

More Decks by Leon Rosenberg

Other Decks in Technology

Transcript

  1. Leon Rosenberg (@dvayanu)!
    anotheria solution GmbH
    1
    Open Source APM

    View Slide

  2. View Slide

  3. 3
    Who am I?
    Leon Rosenberg - Architect, DevOps. !
    1997 - Started programming with Java. !
    2000 - Started building Portals.!
    2003 - Founded anotheria.net.!
    2007 - Started MoSKito.

    View Slide

  4. View Slide

  5. View Slide

  6. 6
    Today
    Short Story!
    Live Demo!
    Integration!
    Tools!
    Success Stories

    View Slide

  7. Because running a production System 

    without monitoring is like ...
    Why MoSKito
    7

    View Slide

  8. View Slide

  9. The MoSKito Story

    View Slide

  10. This is you

    View Slide

  11. You developed an APP

    View Slide

  12. And now you've got traffic

    View Slide

  13. Or inherited one

    View Slide

  14. And simply don't know
    what the app does?

    View Slide

  15. You need Help!

    View Slide

  16. You need MoSKito!

    View Slide

  17. View Slide

  18. Collect data

    View Slide

  19. Organize data

    View Slide

  20. Inspect Intervals

    View Slide

  21. MoSKito Core Team

    View Slide

  22. Discover and analyze

    View Slide

  23. Scale and get in control

    View Slide

  24. Keep history

    View Slide

  25. The big picture
    !

    View Slide

  26. … and you … ?
    !

    View Slide

  27. Why MoSKito ?

    View Slide

  28. Lets get some burgers

    View Slide

  29. Integration
    AOP / CDI / Spring!
    Proxies!
    WEB!
    !
    Guide: https://
    confluence.opensource.anotheria.net/display/
    MSK/Integration+Guide
    29

    View Slide

  30. AOP
    30
    @Monitor
    public class YourClass {
    public class YourClass {
    @Monitor public void firstMonitoredMethod(){...
    @Monitor public void secondMonitoredMethod(){...
    public void notMonitoredMethod(){...
    @Monitor
    public class YourClass {
    public void thisMethodWillBeMonitored(){...
    @DontMonitor public void thisMethodWillBeExcludedFromMonitoring(){
    @Count
    public class PaymentCounter {
    @Count
    public class PaymentCounter {
    /**
    * Electronic card payment (lastchrifteinzug in germany).
    */
    public void ec(){}
    /**
    * Credit card payment.
    */
    public void cc(){}
    /**
    * Payment via paypal.
    */
    public void paypal(){}
    }
    @CountByParameter
    void ingredientUsed(String ingredient) {
    !

    View Slide

  31. AOP + MAVEN
    31


    net.anotheria
    moskito-core
    2.5.2


    net.anotheria
    moskito-aop
    2.5.2




    org.codehaus.mojo
    aspectj-maven-plugin
    1.4



    net.anotheria
    moskito-aop


    1.6
    1.6




    compile






    View Slide

  32. CDI
    32
    @Monitor
    @ProducerRuntime(producerId=”Foo”, category=”my”)
    public class YourClass {
    public class YourClass {
    @Monitor public void firstMonitoredMethod(){...
    @Monitor(“dao”) public void secondMonitoredMethod(){...
    public void notMonitoredMethod(){...
    @Monitor(MonitoringCategorySelector.WEB)
    public class YourClass {
    public void thisMethodWillBeMonitored(){...
    @DontMonitor public void thisMethodWillBeExcludedFromMonitoring(){
    @Count
    public class PaymentCounter {
    @Count
    public class PaymentCounter {
    /**
    * Electronic card payment (lastchrifteinzug in germany).
    */
    public void ec(){}
    /**
    * Credit card payment.
    */
    public void cc(){}
    /**
    * Payment via paypal.
    */
    public void paypal(){}
    }
    @CountByParameter
    void ingredientUsed(String ingredient) {
    !

    View Slide

  33. CDI
    33
    xsi:schemaLocation="!
    http://java.sun.com/xml/ns/javaee!
    http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">!
    !
    net.anotheria.moskito.integration.cdi.CountInterceptor!
    net.anotheria.moskito.integration.cdi.CallInterceptor!
    !
    net.anotheria.moskito.integration.cdi.WebCallInterceptor!
    net.anotheria.moskito.integration.cdi.ServiceCallInterceptor!
    net.anotheria.moskito.integration.cdi.DaoCallInterceptor!
    !
    !

    View Slide

  34. Proxies
    34
    public interface SimpleService{
    void doSomethingMethod();
    }
    public class SimpleServiceImpl implements SimpleService{
    public void doSomethingMethod(){
    }
    }
    SimpleService service = ProxyUtils.createServiceInstance(new SimpleServiceImpl(), "default", SimpleService.class);

    View Slide

  35. WEB
    35

    RequestURIFilter
    net.anotheria.moskito.web.filters.RequestURIFilter

    limit
    1000



    RequestURIFilter
    /*


    DomainFilter
    net.anotheria.moskito.web.filters.DomainFilter

    limit
    50



    DomainFilter
    /*

    Automagically with servlet 3.0

    View Slide

  36. Inspect
    36
    !

    net.anotheria
    moskito-inspect-remote
    2.5.2

    View Slide

  37. What else
    MoSKito Control !
    !
    MoSKito Central!
    !
    MoSKito @ Barbecue
    37

    View Slide

  38. View Slide

  39. 39

    View Slide

  40. 40
    MoSKito Control

    View Slide

  41. MoSKito Central
    Central server for snapshot storage.!
    Attachable storages can store data into sql- or
    nosql- based databases, xml/json files etc.!
    Runs in remote or embedded mode.
    41

    View Slide

  42. MoSKito To Go
    42

    View Slide

  43. View Slide

  44. View Slide

  45. Success stories
    Far too many, but here are some :-)
    45

    View Slide

  46. I
    After a release of a new version huge traffic
    increase on one of the databases was
    detected.!
    The database in question was used by a
    service. There were 20 clients (code
    components) using this service. !
    MoSKito showed that 55% of the traffic to the
    service came from one client. With MoSKito
    inspection we were able to detect which client
    was producing most traffic.
    46

    View Slide

  47. I
    Closer inspection (code review) of the client
    revealed a bug which led to double calls to the
    service. !
    Incident solved in 30 minutes.
    Most traffic
    Created here
    47

    View Slide

  48. II
    Application overall performance was
    insufficient.!
    With moskito journeys and call tree analysis
    we were able to find redundant calls to the
    backend and remove them.!
    Request duration reduced to 50% with 4 hours
    analysis and 4 hours coding effort.
    48

    View Slide

  49. II
    same call over net repeated thrice
    time in
    milliseconds
    49

    View Slide

  50. III
    A bug only reproduceable by one user.!
    Second page of received messages won’t
    show. No exception logged.
    50

    View Slide

  51. Broken Call
    red color indicates
    that the method
    was terminated
    abnormaly
    (exception)
    possible reason - user didn’t exist in the db and the code didn’t know how to
    handle it.
    51

    View Slide

  52. What’s cooking?
    MoSKito 2.5.3 - JPA!
    Javaagent !
    Central enhancements
    52

    View Slide

  53. End of Data.
    Thank you.!
    53
    http://www.moskito.org
    https://github.com/anotheria/moskito
    https://github.com/anotheria/moskito-control
    http://search.maven.org/#search%7Cga%7C1%7Cmoskito
    https://itunes.apple.com/de/app/moskito-ui/id531387262?l=en&mt=8
    https://github.com/anotheria/moskito-examples
    https://itunes.apple.com/de/app/msk-control/id688838411?l=en&mt=8

    View Slide

  54. 54

    View Slide

  55. 55

    View Slide

  56. End of Data.
    Thank you.!
    56
    http://www.moskito.org
    https://github.com/anotheria/moskito
    https://github.com/anotheria/moskito-control
    http://search.maven.org/#search%7Cga%7C1%7Cmoskito
    https://itunes.apple.com/de/app/moskito-ui/id531387262?l=en&mt=8
    https://github.com/anotheria/moskito-examples
    https://itunes.apple.com/de/app/msk-control/id688838411?l=en&mt=8

    View Slide