Posts

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 when displa…

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 nodes with r…

Website Visit Forecasting with Weka

Data mining is a technique which can used for identifying relationships between various large amounts of data set. I have done a research on Time Series Forecasting, there I done web visit forecasting with Weka tool. I think that kind of Research will help to plane to new releases, upgrades, etc. Another case is density of forecast visitors would be helpful to allocate or deallocate servers.

The aim of this research work was applying a suitable forecasting technique to predict web site visits. Thus, the results derived through forecasting will be assist web site owners in,

Predict total number of visitors within next WEEK time.Predict number of visitors on a given DAY (Sunday, Monday, etc) within next WEEK time.
In this research four of classifier functions are used. They are namely Gaussian Process, Multilayer Perceptron, Linear Regression and SMO Regression.Based on the evaluation results i finally  conclude that SMO regression and Linear Regression algorithms are better suited for …

Build Maven Multi Module Project and Run using one Command

When we have maven multi module project, there will be dependency between sub project. Therefor if you need to build all projects need tp navigate to parent directory and run the mvn clean install command.

If we have web based multi module project, currently most people doing is go to parent directory and build the all projects using mvn install or mvn clean install command, after that navigate to web project and start web container.

Ex: Projects are P1(parent project), Core and Web. When we building project go to P1 and build the all subprojects, after that go to web project and start jetty server using mvn jetty:run

But that approach wasting you time little bit and when we doing same thing all the time it will become boring  task to do(build parent and go to child folder and run the server)

For avoid this issue I am going to show how to run web project with out navigate to child project.

following command will help you to run specific project without moving to sub project folder.

mv…

Change Jetty Server Running Port

Jetty is one one of the best development server which I have ever used. It is easy to work with jetty server and its light weight

Here I am going to show how to change jetty server running port.  Jetty server default running port is 8080.

Port with Maven: 

 Command line:          For starting jetty server we are using mvn jetty:run command. We can change the port jetty server running by passing run time argument to it.

mvn -Djetty.port=80 jetty:run


 Using pom.xml
                By changing jetty plugin system properties as below, you can change the jetty running port.
<plugin> <groupId>org.mortbay.jetty</groupId> <artifactId>maven-jetty-plugin</artifactId> <configuration> <stopPort>9966</stopPort> <stopKey>foo</stopKey> <systemProperties> <systemproperty> <name>jetty.port</name> <value>80</value> </systemproperty> </systemP…

Maven add jar without install

I have some problem with adding external jar in to maven project without install it. If I install JAR file other people who working on same project, have to install same JAR. them I want to avoid that issue.

First need to place jar file inside lib folder. After that using following POM entry we can use it as dependency.

<dependency> <groupId>com.chandana</groupId> <artifactId>example</artifactId> <version>0.1</version> <scope>system</scope> <systemPath>${basedir}/lib/example.0.1.jar</systemPath> </dependency>

Ex: <dependency> <groupId>com.sun</groupId> <artifactId>tools</artifactId> <version>1.5.0</version> <scope>system</scope> <systemPath>${JAVA_HOME}/lib/tools.jar</systemPath> </dependency>
 Here very important option is <scope>system</scope>. It's say dependency provide with system, no need …