Tuesday, June 14, 2011

Off-season Sri Padha(Adam's peak) hike


Recently five friends at WSO2 and I hiked-up Sri Padha(Adam's Peak) during the off-season. It was my 2nd hike to that mountain during the off-season. During the off-season the site was very much peaceful as usually pilgrims don't walk up the mountain due to heavy raining, strong wind, lightning and thick mist.
Adam's peak is an important pilgrimage site especially for Buddhists. Unlike in pilgrimage season (December to May), we had to take precautions and we had to prepare and bring all the food and stuff required up to the peak of the mountain. As there's no electricity until the peak of the mountain, we prepared for that as well. We climbed-up the mountain via a shorter path which is Hatton route and climbed-down via a longer path which is Rathnapura route. We started to climb-up the mountain around 2pm and it took around four hours. While climbing-up, it was raining all most all the time, but we didn't experience much of a wind. We were the only team to stay there for that night. And the next morning we worshiped and walked around the peak. We couldn't see the sun-rise due to thick mist. Only for few seconds we saw very far away mountains but those views were vanished in seconds when thick clouds covered the peak. Then we climbed-down via Rathnapura route and we experienced some strong wind. Though Rathnapura route was quite longer it was more beautiful as it was lead through a lush green jungle.


At the peak

Carbon 3.2.0 - One checkout One build in 3-4 hours


Recently I had a memory upgrade to my office laptop. So I felt to build very recently released WSO2 Carbon 3.2.0 branch and compare the build time while watching a movie :). Previously it took around 8-9 hours to build the complete carbon product stack which consist of around 4941kSLOC. But now it takes around 3-4 hours. During the build, I managed to keep the swap usage in a minimum level (maximum up-to 10MB) by configuring the JVM options such that Build system utilizes the maximum physical memory while underneath OS has enough physical memory left for its tasks. Normally in Ubuntu 10.04 (Kernel Linux 2.6.32-24-generic), from the moment physical memory is fully utilized, the swap space starts to increase continuously even though there's available physical memory after sometime. So swap usage doesn't decrease for a long time. So if the JVM options are not set properly overall performance get decreased drastically. Seems tuning JVM based on available physical memory can preserve a lot of CPU time.

Saturday, April 23, 2011

Monitoring multiple WSO2 server instances via a single front-end

Any WSO2 product like WSO2 BPS, WSO2 AS, WSO2 ESB etc is based on WSO2 Carbon platform. One inherent characteristic of this platform is, it's easily front-end and back-end separated.
As well this is an interesting deployment pattern which is very useful in many scenarios. In this post what I tried to do is monitor two WSO2 back-end server instances (ESB and BPS) via a single front-end server instance.


Table of Content

Saturday, April 16, 2011

SOA Security and Identity Workshop - European Tour


This is the second run on a series of workshops on a crosscutting concern of SOA-Security. Four workshops will be conducted in Paris, London, Zurich and Frankfurt from 3rd to 11th of May.


With data protection at the peak of scrutiny, identity and security are fundamental tools in the management of enterprise web applications.

This full-day interactive workshop will highlight the growing challenges of identity and security management. We will demonstrate how enterprise architects and developers may overcome these challenges and gain insight in to key security standards and identity management for SOA.

Topics to be covered :
  • Identity, Single sign-on, SAML2, OpenID, OAuth, Information Card
  • Entitlement and Authorization – XACML
  • How Governance affects your Security?
  • Best practices for securing your SOA, REST and Cloud (Patterns)
  • Summary/ QA
For more info - http://wso2.com/events/workshops/2011-may-europe-securitygatewaysolution-workshop/

Thursday, April 14, 2011

Wishing you a very happy new year


First of all I like to Wish a very happy new year to everyone. This is the festive season of Sinhala and Hindu new year all for Sri Lankans. So is the WSO2 team also celebrating the new year dawn with their loved ones except for few guys at on-site work in US.
Before starting the vacation we stayed few days at Heritance Kandalama Hotel. The climate was kinda calm but hot as Colombo. So I spent the afternoons swimming and during morning I spent on sightseeing around the hotel and the lake. Evening time was almost spent on playing cricket with friends.
I went to this hotel when I was a kid, but I think now it's more greener and more closer to wildlife. (Don't put anything in balcony unnoticed as monkeys are gonna drag them away definitely :))




As well the hotel is renowned for its grand architecture which is well blended with the natural environment by Geoffrey Bawa.
After the trip, I moved back to home. I'm happy that my family still respect new year rituals.
And I’m happy as all my family get together after a long time.

Related links - Happy new year Sri Lanka!

Monday, March 7, 2011

Memory Growth - FireFox vs. Chrome


This is very quick and silly test you can try to analyse on the memory usage of Mozilla Firefox and Google Chrome.

Used environment
  • Firefox 3.6.9
  • Google Chromium 7.0.517
  • Ubuntu 10.04

Method
  • Choose a list of 10 random very frequently used web pages which consisting a mixture of dynamic and static content. 
  • Then measure the memory growth due to each new tab in both browsers.
  • During the test, a snapshot of cumulative memory growth due to new tab was measured using operating system level resource statistics.
  • Memory overhead due to add-ons was added to "Empty Tab" column.



Thursday, March 3, 2011

How to deploy WSO2-BPS in Apache Tomcat


This blog post explains how to deploy WSO2-BPS in Apache Tomcat servlet container with a few configuration steps. Even for any other WSO2 product these steps will be compatible.

Tested Environment
- Ubuntu 10.04
- WSO2BPS-2.0.2
- Apache-Tomcat-6.0.12
- Java version "1.6.0_21"

Step 1
  • Extract the downloaded distribution of wso2bps-2.0.2 into a directory.
  • Copy repository and resources directories in to a new folder. Say it is carbon-repo (i.e:- /opt/temp-svn/products/carbon-repo)
Step 2
  • Extract the downloaded distribution of apache-tomcat-6.0.32 into a directory, CATALINA_HOME.
  • Go to CATALINA_HOME\webapps directory and create a new folder, bps
  • Copy wso2bps-2.0.2/lib/core/WEB-INF to CATALINA_HOME/webapps/bps
Step 3
  • We need to enable https in tomcat. Therefore, edit CATALINA_HOME\conf\server.xml by adding the following entry.
<connector maxhttpheadersize="8192" port="8443"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true" SSLEnabled="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile = "/opt/temp-svn/products/carbon-repo/resources/security/wso2carbon.jks"
keystorePass="wso2carbon" />
  • Make sure to give the exact location of wso2carbon.jks as highlighted above.
    Step 4
    • We have done the configurations required in tomcat. Now, we must do the necessary configurations in a set of configuration files shipped with WSO2 BPS. We will update carbon.xml, axis2.xml, registry.xml and user-mgt.xml which can be found at carbon-repo\repository\conf directory.
    • First, open carbon.xml and update the ServerURL and WebContextRoot elements as follows. It is required to change the WebContextRoot to match with the web application directory name we have given in step2. In our case, it is bps.
    <ServerURL>https://localhost:8443/bps/services/</ServerURL>
    
    <WebContextRoot>/bps</WebContextRoot>
    
    • Note that we have configured tomcat to run on 8443 port. Save and close carbon.xml.
    • Open registry.xml and update DB URL as follows.
    <dbConfig name="wso2registry">
    <url>jdbc:h2:/opt/temp-svn/products/carbon-repo/repository/database/WSO2CARBON_DB</url>
          <userName>wso2carbon</userName>
          <password>wso2carbon</password>
          <driverName>org.h2.Driver</driverName>
          <maxActive>50</maxActive>
          <maxWait>60000</maxWait>
          <minIdle>5</minIdle>
      </dbConfig>
    
    
    • Open user-mgt.xml and update database URL as follows.
    <Property name="url">jdbc:h2:/opt/temp-svn/products/carbon-repo/repository/database/WSO2CARBON_DB</Property>
    
    • Make sure to specify the absolute path of the WSO2CARBON_DB in both of the above elements.
    • Open axis.xml and change the ports in the http and https transport receivers as follows.
    <transportReceiver name="http" class="org.wso2.carbon.core.transports.http.HttpTransportListener">
       <parameter name="port">8080</parameter>
    </transportReceiver>
    
    <transportReceiver name="https"
    class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
       <parameter name="port">8443</parameter>
    </transportReceiver>

    Step 5
    • Add the jars included in CARBON_HOME/lib/endorsed to CATALINA_HOME/lib.
    • Now, open a new command window and change the directory to CATALINA_HOME/bin.
    • Define an environment variable called CARBON_HOME and set the path to your carbon-repo directory.
                 eg - export CARBON_HOME=/opt/temp-svn/products/carbon-repo
    • Start the Tomcat server and access https://localhost:8443/bps/services/ in browser.