moskito at silpion solutionscamp 2014
DESCRIPTION
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-appdynamicTRANSCRIPT
![Page 1: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/1.jpg)
Leon Rosenberg (@dvayanu)!anotheria solution GmbH
1
Open Source APM
![Page 2: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/2.jpg)
![Page 3: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/3.jpg)
3
Who am I?
Leon Rosenberg - Architect, DevOps. !
1997 - Started programming with Java. !
2000 - Started building Portals.!
2003 - Founded anotheria.net.!
2007 - Started MoSKito.
![Page 4: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/4.jpg)
![Page 5: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/5.jpg)
![Page 6: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/6.jpg)
6
Today
Short Story!
Live Demo!
Integration!
Tools!
Success Stories
![Page 7: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/7.jpg)
Because running a production System without monitoring is like ...
Why MoSKito
7
![Page 8: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/8.jpg)
![Page 9: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/9.jpg)
The MoSKito Story
![Page 10: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/10.jpg)
This is you
![Page 11: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/11.jpg)
You developed an APP
![Page 12: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/12.jpg)
And now you've got traffic
![Page 13: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/13.jpg)
Or inherited one
![Page 14: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/14.jpg)
And simply don't know what the app does?
![Page 15: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/15.jpg)
You need Help!
![Page 16: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/16.jpg)
You need MoSKito!
![Page 17: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/17.jpg)
![Page 18: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/18.jpg)
Collect data
![Page 19: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/19.jpg)
Organize data
![Page 20: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/20.jpg)
Inspect Intervals
![Page 21: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/21.jpg)
MoSKito Core Team
![Page 22: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/22.jpg)
Discover and analyze
![Page 23: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/23.jpg)
Scale and get in control
![Page 24: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/24.jpg)
Keep history
![Page 25: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/25.jpg)
The big picture !
![Page 26: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/26.jpg)
… and you … ? !
![Page 27: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/27.jpg)
Why MoSKito ?
![Page 28: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/28.jpg)
Lets get some burgers
![Page 29: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/29.jpg)
Integration
AOP / CDI / Spring!
Proxies!
WEB!
!
Guide: https://confluence.opensource.anotheria.net/display/MSK/Integration+Guide
29
![Page 30: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/30.jpg)
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) { !
![Page 31: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/31.jpg)
AOP + MAVEN
31
<dependencies> <dependency> <groupId>net.anotheria</groupId> <artifactId>moskito-core</artifactId> <version>2.5.2</version> </dependency> <dependency> <groupId>net.anotheria</groupId> <artifactId>moskito-aop</artifactId> <version>2.5.2</version> </dependency>
<build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>aspectj-maven-plugin</artifactId> <version>1.4</version> <configuration> <aspectLibraries> <aspectLibrary> <groupId>net.anotheria</groupId> <artifactId>moskito-aop</artifactId> </aspectLibrary> </aspectLibraries> <source>1.6</source> <target>1.6</target> </configuration> <executions> <execution> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> </plugins> </build>
![Page 32: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/32.jpg)
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) { !
![Page 33: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/33.jpg)
CDI
33
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"! xsi:schemaLocation="!http://java.sun.com/xml/ns/javaee!http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">! <interceptors>! <class>net.anotheria.moskito.integration.cdi.CountInterceptor</class>! <class>net.anotheria.moskito.integration.cdi.CallInterceptor</class>!! <class>net.anotheria.moskito.integration.cdi.WebCallInterceptor<class>! <class>net.anotheria.moskito.integration.cdi.ServiceCallInterceptor</class>! <class>net.anotheria.moskito.integration.cdi.DaoCallInterceptor</class>!! </interceptors>!</beans>
![Page 34: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/34.jpg)
Proxies
34
public interface SimpleService{ void doSomethingMethod(); }
public class SimpleServiceImpl implements SimpleService{ public void doSomethingMethod(){ } }
SimpleService service = ProxyUtils.createServiceInstance(new SimpleServiceImpl(), "default", SimpleService.class);
![Page 35: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/35.jpg)
WEB
35
<filter> <filter-name>RequestURIFilter</filter-name> <filter-class>net.anotheria.moskito.web.filters.RequestURIFilter</filter-class> <init-param> <param-name>limit</param-name> <param-value>1000</param-value> </init-param> </filter> <filter-mapping> <filter-name>RequestURIFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
<filter> <filter-name>DomainFilter</filter-name> <filter-class>net.anotheria.moskito.web.filters.DomainFilter</filter-class> <init-param> <param-name>limit</param-name> <param-value>50</param-value> </init-param> </filter> <filter-mapping> <filter-name>DomainFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Automagically with servlet 3.0
![Page 36: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/36.jpg)
Inspect
36
! <dependency> <groupId>net.anotheria</groupId> <artifactId>moskito-inspect-remote</artifactId> <version>2.5.2</version> </dependency>
![Page 37: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/37.jpg)
What else
MoSKito Control !
!
MoSKito Central!
!
MoSKito @ Barbecue
37
![Page 38: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/38.jpg)
![Page 39: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/39.jpg)
39
![Page 40: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/40.jpg)
40
MoSKito Control
![Page 41: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/41.jpg)
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
![Page 42: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/42.jpg)
MoSKito To Go
42
![Page 43: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/43.jpg)
![Page 44: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/44.jpg)
![Page 45: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/45.jpg)
Success stories
Far too many, but here are some :-)
45
![Page 46: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/46.jpg)
IAfter 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
![Page 47: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/47.jpg)
ICloser 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
![Page 48: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/48.jpg)
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
![Page 49: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/49.jpg)
IIsame call over net repeated thrice
time in milliseconds
49
![Page 50: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/50.jpg)
IIIA bug only reproduceable by one user.!
Second page of received messages won’t show. No exception logged.
50
![Page 51: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/51.jpg)
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
![Page 52: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/52.jpg)
What’s cooking?
MoSKito 2.5.3 - JPA!
Javaagent !
Central enhancements
52
![Page 53: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/53.jpg)
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
![Page 54: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/54.jpg)
54
![Page 55: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/55.jpg)
55
![Page 56: MoSKito at Silpion Solutionscamp 2014](https://reader034.vdocuments.site/reader034/viewer/2022051514/54892fbfb47959d80c8b5899/html5/thumbnails/56.jpg)
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