Posts

Showing posts from 2013

How to configure WSO2 G-Reg with ELB - Updated

This is the updated post for configuring WSO2 ELB 2.1.0 and G-Reg 4.6.0 releases. If you are using earlier releases, please refer the early post.  When we are fronting WSO2 ELB (Elastic Load Balancer) for a WSO2 G-Reg (Governance Registry) node, all the incoming messages will go through ELB node and it will act as a HTTP and HTTPS proxy to GREG node. So when you configure ELB to the GREG front, GREG won't be able to access alone without the ELB. 1. Download WSO2 ELB and WSO2 GREG. Rename the extracted ELB as ELB-HOME and extracted GREG as GREG-HOME. ELB Configuration  2. Go to ELB-HOME/repository/conf/loadbalancer.conf and add the following entry. There can be multiple entries according to the clustering requirements.   governance {   domains   {            wso2.governance.domain {                tenant_range *;                group_mgt_port 4000;                mgt{                    hosts governance.local.wso2.com;                }   

Manage SOAPAction of the Out Message

Image
   When you are sending a request message to a backend service through WSO2 ESB, there could be some scenarios where you need to remove or change the SOAPAction header value. Using header mediator and property mediator which are available in WSO2 ESB, we can remove SOAPAction or set it empty. Set SOAPAction as Empty: <header name="Action" value=""/> <property name="SOAPAction" scope="transport" value=""/> Remove SOAPAction: <header action="remove" name="Action"/> <property action="remove" name="SOAPAction" scope="transport"/> Modify SOAPAction: When setting SOAPAction one of the below approches can be used 1) . <header name="Action" value="fixedAction"/> 2). <header expression="xpath-expression" name="Action"/> More Info: Header Mediator TCPMon: If we need to monitor the messages getting

Oracle JDBC driver for Maven

When you are adding the oracle jdbc driver to your project as a dependency, you will not be able to get it resolved from the public repository. This is happening due to license compatibility issue. Therefore you have to manual install Oracle JDBC driver into your local repo or private repo. This is not limited to Oracle JDBC driver, there are some JARs which are not available in the public repos. Oracle JDBC drover can be downloaded from their web site .  When you are adding a JAR to the repository or project, you can refer " Maven add jar without install " post or below command. mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=11.2.0.3.0 -Dpackaging=jar -Dfile=ojdbc.jar -DgeneratePom=true  If you need to add JARs in to Central Repository this Maven guide will help.

How to get MySQL Database Size

While carrying out Performance Tests for WSO2 Governance Registry, I had to measure(calculate) MySQL database size. So here I am posting the query which I used to measure the MySQL database size, hoping this could be useful to someone. SELECT table_schema "Database Name", Round(Sum(data_length + index_length) / 1024 / 1024, 3) "Database Size in MB" FROM   information_schema.tables  GROUP  BY table_schema; Once this query is executed you can view the database size in formation like this:: mysql> SELECT table_schema "Database Name", Round(Sum(data_length + index_length) / 1024 / 1024, 3) "Database Size in MB" FROM   information_schema.tables  GROUP  BY table_schema; +--------------------+---------------------+ | Database Name      | Database Size in MB | +--------------------+---------------------+ | db11                       |               1.834 | | db12                       |               1.834 | +--------------------+-

Performance Results - WSO2 Governance Registry - Part 1

Recently I have completed a performance analysis for WSO2 Governance Registry . Here I am publishing some of the results. Zip Upload Thread Pool Size Whats is Zip Upload Thread Pool: When we are uploading ZIP files with WSDLs & Schema's, it hits the ZipWSDLMediaTypeHandler. There we can optimize number of threads which are working on Uploading WSDLs, Schema's and Service creation. Recommended Other Configuration: Increased the timeouts for the UI to 7200000 in axis2_client.xml.  Disabled WSDL and Schema validation in registry.xml.  Disabled registry indexing in registry.xml.  Stopped automatic versioning of resources.  Set the number of maximum active DB connections to 120 and max_connection in to 500 ( MySQL level), and the maximum wait time to 600000.  Set G-Reg memory configurations to 4GB With above configurations , here is test results for different thread upload pool size. Uploaded ZIP file containing 280 WSDLs and 506 Schema files. Time measure

Monitor WSO2 carbon Instance using New Relic

While I was doing a performance analysis of WSO2 Governance registry, I was looking for a way to monitor information of Apache Solr and its performance numbers. While reading "Apache Solr 3 Enterprise Search Server" book I found this very real time monitoring Tool(site) called New Relic. So I was able to integrate New Relic with WSo2 Governance Registry Server and was able to monitor many information about the server instance. There I found that Java Agent Self Installer is not working for my scenario. So I had to set Java agent information into JAVA_OPTS. After Few minutes(around 2 min) I was able to view my server related information in the newrelic console(https://rpm.newrelic.com). Here is the JAVA_OPTS which I have used: export JAVA_OPTS="$JAVA_OPTS -javaagent:/home/chandana/Documents/g-reg/newrelic/newrelic.jar" newrelic Java agent self-installer :  https://docs.newrelic.com/docs/agents/java-agent/installation/java-agent-self-installer

Yield Price Sri Lanka - Android Application

Image
" Yield Price Sri Lanka " is an Android based application which helps users to check Market Price Information using their mobile devices. This application concept is based on person X( will update his name after approvals) and I did slight modifications on the application to support in a low cost infrastructure. Using this " Yield Price Sri Lanka " application, you can check prices of various goods instantly, without going to the market. I am updating price information in Daily & Weekly basis according to the Colombo Manning Market prices. Initial application was developed to support English language only. With current latest version we are supporting English, Tamil and Sinhalese languages. This application will update price information in real time and when describing the application's back-end(server) architecture, it has developed to serve JSON based output with many concurrent requests without blocking any request. Within the mobile Application wh

How to configure WSO2 G-Reg with ELB

When we front WSO2 ELB(Elastic Load Balancer) into WSO2 G-Reg(Governance Registry) node, all the incoming messages will go through ELB node and it will act as a HTTP and HTTPS proxy to GREG node. So when you configure ELB to the GREG front, GREG won't be able to access alone without the ELB.  1. Download WSO2 ELB and WSO2 GREG . Rename the extracted ELB as ELB-HOME and extracted GREG as GREG-HOME. ELB Configuration   2. Go to ELB-HOME/repository/conf/loadbalancer.conf and add the following entry. There can be multiple entries according to the clustering requirements. governance { domains { wso2.governance.domain { min_app_instances 1; hosts governance.local.wso2.com; sub_domain mgt; tenant_range *; } } } 3. Update hosts files in nod