Re: [Architecture] RFC:Building Performance Probes into WSO2 Platfrom

2014-09-27 Thread Thomas Wieger
please have a look on the metrics lib, which quite nicely provides support
for capturing different kinds of statistics. see
https://dropwizard.github.io/metrics/3.1.0/


regards,

thomas

Am Freitag, 26. September 2014 schrieb Sajith Ravindra :


 IMHO, CEP is another product where this kind of probes can  be really
 useful as we have to deal with performance related requirements. As there's
 a major refactoring going on in siddhi I think we can we plant probes like
 this into the Siddhi engine. It will be useful to evaluate the re-factored
 Sindhi engines performance as well as to figure out performance bottlenecks
 in the future.


 Thanks
 *,Sajith Ravindra*
 Senior Software Engineer
 WSO2 Inc.; http://wso2.com
 lean.enterprise.middleware

 mobile: +94 77 2273550
 blog: http://sajithr.blogspot.com/
 http://lk.linkedin.com/pub/shani-ranasinghe/34/111/ab

 On Fri, Sep 26, 2014 at 8:38 AM, Srinath Perera srin...@wso2.com
 javascript:_e(%7B%7D,'cvml','srin...@wso2.com'); wrote:

 We have some pretty nice probes already in ESB, that let you look into
 what is going in the same running in production.  I think we need to do
 this generally and build it to other products. That should reduce time we
 spent debugging issues significantly.

 My proposal is to build a probe Lib that looks like following.

 There are two kinds of things you need to collect.

1. Throughput at give point of code (how fast calls goes though)
2. Latency between two points.


 We will have two types of Probes. Code would look like following.

 Probe probe = new Probe(Name, throughput, timeDuration);
 ..
 probe.recordThroughput();

 Probe probe = new Probe(Name, latency, timeDuration, logLevel);
 ...
 long id = probe.startTicking() // this so same probe can be used by many
 threads
 ...
 probe.endTicking(id);

 Probe will summarise data over given duration and expose. We need


1. JMX bean
2. BAM Agent
3. Can turn on, off via JMX agent or via System property
4. Have Tool Box
5. Have in product UI
6. Can configured to write data to logs

 Each probe should be very small and should be able to create thousands
 without much effect. (e.g. create one for each mediator type)

 WDYT?

 --Srinath






 --
 
 Blog: http://srinathsview.blogspot.com twitter:@srinath_perera
 Site: http://people.apache.org/~hemapani/
 Photos: http://www.flickr.com/photos/hemapani/
 Phone: 0772360902

 ___
 Architecture mailing list
 Architecture@wso2.org
 javascript:_e(%7B%7D,'cvml','Architecture@wso2.org');
 https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture



___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] BAM Log monitoring for Cloud

2014-09-25 Thread Thomas Wieger
Am Donnerstag, 25. September 2014 schrieb Manjula Rathnayake :

 Hi Gimantha,

 If we can correlate log event based on timestamp range from all
 services(AS,BPS,AF,etc) that is really useful when identifying issues.


 I would recommend that you take a look on the Google Dapper paper
http://research.google.com/pubs/pub36356.html regarding distributed
tracing. I think this would perfectly solve all correlation issues. For
implementation you should have a look on Twitters Zipkin
http://twitter.github.io/zipkin/ or Brave https://github.com/kristofa/brave
.

regards,

Thomas
___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


Re: [Architecture] Log4j MDC (Mapped Diagnostic Context) in Carbon

2014-09-24 Thread Thomas Wieger
would love to see you move to log4j2 asap.

please take note, that TenantAwarePatternLayout currently is buggy. i filed
https://wso2.org/jira/browse/CARBON-14920 for it, some weeks ago.

regards,

thomas

Am Dienstag, 23. September 2014 schrieb Isuru Perera :

 This is not critical, but I think it's better if we can upgrade log4j in
 next major release, i.e. Carbon 4.3.0

 As I mentioned, with Log4j 2 [1] Thread Context support, we should be
 able avoid classes like TenantAwarePatternLayout [2].

 [1] http://logging.apache.org/log4j/2.x/
 [2]
 https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.2.0/patches/patch0009/core/org.wso2.carbon.utils/4.2.0/src/main/java/org/wso2/carbon/utils/logging/TenantAwarePatternLayout.java

 On Tue, Sep 23, 2014 at 10:17 PM, Afkham Azeez az...@wso2.com
 javascript:_e(%7B%7D,'cvml','az...@wso2.com'); wrote:

 If this is something critical, we should get it into the next major
 release rather than wait for C5.

 On Thu, Jun 19, 2014 at 10:03 PM, Isuru Perera isu...@wso2.com
 javascript:_e(%7B%7D,'cvml','isu...@wso2.com'); wrote:

 Hi,

 Can we look at $subject for tenant information etc? I think this is
 better than implementing custom appenders, pattern layouts etc.

 In Log4j 2, this is part of Thread Context [1].

 Also, are we planning to use Log4j 2 in Carbon 5?

 Thanks!

 Best Regards,

 [1] http://logging.apache.org/log4j/2.x/manual/thread-context.html

 --
 Isuru Perera
 Senior Software Engineer | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha




 --
 *Afkham Azeez*
 Director of Architecture; WSO2, Inc.; http://wso2.com
 Member; Apache Software Foundation; http://www.apache.org/
 * http://www.apache.org/*
 *email: **az...@wso2.com*
 javascript:_e(%7B%7D,'cvml','az...@wso2.com');
 * cell: +94 77 3320919 %2B94%2077%203320919blog: *
 *http://blog.afkham.org* http://blog.afkham.org
 *twitter: **http://twitter.com/afkham_azeez*
 http://twitter.com/afkham_azeez
 *linked-in: **http://lk.linkedin.com/in/afkhamazeez
 http://lk.linkedin.com/in/afkhamazeez*

 *Lean . Enterprise . Middleware*




 --
 Isuru Perera
 Senior Software Engineer | WSO2, Inc. | http://wso2.com/
 Lean . Enterprise . Middleware

 about.me/chrishantha

___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture


[Architecture] double checked locking with volatile Re: Performance improvement in Identity Server OpenIDAssociationCache

2014-09-03 Thread Thomas Wieger
hi!

double checked locking will only work, if associationCache is declared as
VOLATILE.

see  following page for background information on double checked locking:
http://www.cs.umd.edu/~pugh/java/memoryModel/DoubleCheckedLocking.html

you should check your whole codebase for that pattern. i have already filed
a bug for EventPublusher in bamdataagents.

https://wso2.org/jira/plugins/servlet/mobile#issue/BAMDATAAGENTS-10


regards,

thomas

Am Dienstag, 2. September 2014 schrieb Tharindu Edirisinghe :

 In OpenIDAssociationCache, the method to get the singleton instance is
 synchronized. Isn't it better to improve this with applying double checked
 locking ??


 turing/components/identity/org.wso2.carbon.identity.provider/4.2.2/src/main/java/org/wso2/carbon/identity/provider/openid/cache/OpenIDAssociationCache.java

 Following is the code segment currently it is having.

 /**
  * Returns the singleton of the codeAssociationCache/code
  *
  * @return
  */
 public synchronized static OpenIDAssociationCache getCacheInstance() {
 if (associationCache == null) {
 associationCache = new OpenIDAssociationCache();
 }
 return associationCache;
 }

 --

 Thanks  Best Regards,

 Tharindu Edirisinghe
 Software Engineer

 *WSO2 Inc*
 *email   : tharin...@wso2.com
 javascript:_e(%7B%7D,'cvml','tharin...@wso2.com'); *
 *mobile : +94 775 181586*
 *www: :http://wso2.com http://wso2.com/ *lean . enterprise . middleware



___
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture