Wednesday, April 6, 2011

Localizing WSO2 Carbon based products

WSO2 Middleware Products and Services
WSO2 Carbon, is by design, an internationalized (i18n) platform, hence making all the products and services that are built on top of Carbon ready to be localized to any language of your choice. Users have shown interest and have also localized WSO2 products in Chinese, Sinhala, and some other languages to a considerable extent.

Componentized Architecture
WSO2 Carbon with its modular architecture, is made of components. You can either build the Carbon core and pick whatever the components you need and integrate them into your Carbon build, making a customized product of your choice, or you can simply pick on of the products, let it be Appserver, ESB, Mashup Server, from the list of products and build it from the profiles, as we have products well packed for the need of a software architect.

Getting the Product/Service
Now you have two choices, based on your requirements. If you are going to just use the WSO2 products, you can simply download and use the  binaries or download the released sources for the respective product and build the product using Maven, if you are a fan of building from the code.  But you may prefer to build WSO2 Products from the source repositories (svn) as well, if you want to build customized products, learn the complex code base of WSO2 Carbon, extend WSO2 Carbon or Stratos (WSO2 Carbon Platform Middleware as a Service), have the desire to use the technology in its bleeding edge, or OEM WSO2 products where you can get the commercial support from the WSO2 experts for your organization.

Localization ~ From the source
Now let's come to the localization. Say you want to use a WSO2 Product with the user interface in your language. For that, you have to localize the Resources.properties and JSResources.properties files in locations like carbon/components/stratos/tenant-mgt/org.wso2.carbon.tenant.mgt.ui/src/main/resources/org/wso2/carbon/tenant/mgt/ui/i18n, when coming to localize the source, even before building.

Localization ~Not a mere dream
But obviously what users choose is to localize the product binaries. Internationalization in WSO2 Carbon is done in such way so that by putting a single bundle, all text every where can be replaced. There is no manual work involved. If someone wants to introduce a new locale, just create a bundle containing all converted text, deploy & that's it.

eg: If you want to localize Component manager & User Manager to Spanish, here is what you need to do.

Create a OSGi bundle with following properties files in given folder hierarchy.

src/main/resources/org/wso2/carbon/component/mgt/core/Resources_es.properties
src/main/resources/org/wso2/carbon/userstore/ui/i18n/Resources_es.properties

Build the bundle & deploy feature. Now by changing the user interface language from the browser or system (based on your operating system), you should be able to see Carbon running in the chosen language.

And, if you need to localize every text, you just put all the resource files from every component into the above bundle. By design, we have followed the correct packaging. Hence, resource file from one component will not get replaced with another.

After localizing the relevant .properties files (basically changing the value string from English to Spanish, in the key=string pair in the relevant files), start (or restart if it is already started) WSO2 Stratos Manager. You can see the WSO2 Stratos Manager running in the Spanish (or whatever the localized language) interface.

Image 1: Stratos Manager - Interface in Spanish
submit.tenant=Enviar Inquilino
domain=Dominio
domain.information=Inf. de dominio
contact.details=Datos de contacto
admin.username=Admin Usuario
current.admin.password=actual contraseña del administrador
new.admin.password=Nueva contraseña del administrador
new.admin.password.repeat=Nueva contraseña del administrador (Repetición)
admin.password=Contraseña del administrador
admin.password.repeat=Contraseña del administrador (Repetición)
govern.add_tenants.menu=Añadir un nuevo inquilino
govern.view_tenants.menu=Ver los inquilinos
overview=Información general
tenants.list=Lista de Inquilinos
company.organization=Empresa/Organización
admin.contact=Contacto Administrativo
edit=Editar
multitenancy=Multiusuario
added.successfully=Ha agregado un nuevo inquilino con el dominio:
updated.successfully=Ha actualizado correctamente el inquilino con el dominio:
update.added.tenant=Actualizar la acaba de agregar/inquilino actualizada
update.tenant=Actualizar Inquilino
add.new.tenant=Añadir un nuevo inquilino
register.new.organization=Crear una nueva organización
view.all.tenants=Ver todos los inquilinos
tenant.admin=Inquilino Admin
tenant.description=Descripción Inquilino
admin.fullname=Nombre completo
admin.firstname=Nombre
admin.lastname=Apellido
admin.address=Dirección
admin.email=Correo electrónico
admin.telephone=Teléfono
admin.im=IM
admin.url=URL
self.registration=Registro de Inquilinos
gaas=GaaS
gaas.register.a.new.tenant=Crear un nuevo inquilino
active=Activo
theme.management=Tema de Gestión
word.verification=Verificación de la palabra
captcha.message=Escriba los caracteres que ves en la imagen de abajo.

created.date=Fecha de creación

Saturday, March 19, 2011

Amazon ELB HTTPS Stickiness

Stickiness is needed in most of the complex applications when scaled up in cloud. Say one user logs in. Now his information should be attached to him. If not, each time, he would be routed to a random instance, which will not identify him. Attaching a session id would provide the stickiness, where a particular user can be forwarded to the particular instance. 

I tried using amazon elb-api commands using terminal to enable stickiness for the elastic load balancer. it gave error when trying to apply the stickiness for the port 443, and works fine for 80.

Create Stickiness Policy
pradeeban@pradeeban:~/pem$ elb-create-app-cookie-stickiness-policy wso2cloud1-as -p my-app-cookie-lb-policy -c jsessionid -K KEY.pem -C CERT.pem
OK-Creating App Stickiness Policy

Setting the Policy to the Listener - Fails for port 443
pradeeban@pradeeban:~/pem$ elb-set-lb-policies-of-listener wso2cloud1-as --lb-port 443 --policy-names my-app-cookie-lb-policy -K KEY.pem -C CERT.pem
elb-set-lb-policies-of-listener: Service error: aws:Client.InvalidConfigurationRequest AWSRequestId:4b2c7fc3-4fbf-11e0-a778-d17858cabec6

Setting the Policy to the Listener - Works for port 80
pradeeban@pradeeban:~/pem$ elb-set-lb-policies-of-listener wso2cloud1-as --lb-port 80 --policy-names my-app-cookie-lb-policy -K KEY.pem -C CERT.pem
OK-Setting Policies

So it seemed, it was an issue with https/stickiness from the amazon's end. It was not giving any error when tried with amazon management console nevertheless, but simply not allowing to enable stickiness for the listener with the tcp protocol.

It works for --lb-port 80 --lb-port 443, but not for --lb-port 443 --lb-port 80 (since it picks the first entry only, it seems).

Tried the same with elb-create-lb-cookie-stickiness-policy (elb controlled stickiness) and the results was same.

So I felt, https/stickiness is not working for both application based or amazon elb based cookies, while it works for http.


But Amazon announced in Oct, 2010 that they have started supporting HTTPS stickiness.


I reported this in AWS forum, but later found that it (Setting stickiness policy) works. What we had to change was the protocol to https from tcp for the port 443. :)

--listener "lb-port=443,instance-port=9443,protocol=https"

HTTPS/Stickiness is fine with Amazon's, but not TCP/Stickiness. The TCP/Stickiness issue has already been discussed in another thread [1] in AWS forums. Hence we resolved the issue, by changing the protocol from TCP to HTTPS for the port 443. However we also noted that aiCache provides web application HTTPS acceleration and stickiness for TCP too.

[1] Service error when setting LB policies of listener
[2] Elastic Load Balancing with Sticky Sessions
[3] Amazon Makes the Cloud Sticky
[4] jmeter + amazon ec2 + load balancing (elb)
[5] How can I force "non-sticky" connections for my ELB? 
[6] Load Balancer (ELB) - port forwarding on the load balancer itself
[7] "Sticky connection" on ELB for https?  
[8] Using ELB to Serve Multiple Domains Over SSL on EC2 for Giggles and Unicorns
[9] Amazon Simple Monthly Calculator

Friday, March 18, 2011

AbiWord and Google Summer of Code - 2011

AbiWord has been accepted as a mentoring organization for Google Summer of Code 2011. It should also be noted that AbiWord has also been a mentoring organization in the Google Summer of Code for the years 2006, 2007, 2008, 2009, and 2010 too, making this time the 6th consecutive year.

Have a look at the project ideas from AbiWord. List of selected mentoring organizations can be found here.

Update: Pls find the latest revised version of this presentation at 

Monday, March 14, 2011

SSI and Google Summer of Code - 2011

This year OMII-UK is applying for the Google Summer of Code as the Software Sustainability Institute (SSI). It should also be noted that many projects including OGSA-DAI, OGSA-DMI, and GRID-SAM are coming under SSI. OMII-UK has seen many successful student projects for the years 2008, 2009 and 2010, and foresees the same for this year, under the new name!

Last year I had my Google Summer of Code with OGSA-DAI (Open Grid Services Architecture - Data Access Integration), a project by The Edinburgh Parallel Computing Centre (EPCC) and National e-Science Centre Established by a consortium of departments from the universities of Edinburgh and Glasgow (NeSC), which is part of OMII-UK, which has currently been evolved into SSI. It should also be noticed that EPCC and Open Grid Services Architecture (OGSA) are also part of Globus Alliance. Globus Alliance has also applied for Google Summer of Code 2011.

Sunday, March 13, 2011

[Archive] Abi the Ant

I was going through the credentials of AbiWord and noticed, it was mentioned as, written by, "Abi the Ant " I found "Abi the Ant" was employed at AbiSource, Inc. as an open source evangelist. I later realized that it was just a character introduced by Eric Sink, the founder of AbiSource, and others, to represent AbiSource in LinuxExpo, other conferences, and elsewhere, similar to the Linux Tux. Abi the Ant was gladly answering the user queries. There were also discussions on making the Ant appear on the welcome splash screen of AbiWord. Anyway, as I see, unfortunately the life time of the Ant was not pretty high like that of the Linux Tux. Almost everyone has dropped the interest in the ant, unfortunately.