Wednesday, August 24, 2011

Moving from a 'Platform' to the 'Platform-as-a-Service' ~ What is it all about?

Written by Kathiravelu Pradeeban




Carbon Middleware Platform for each department.
In a traditional system, we see each department is equipped with its own middleware platform. With the Cloud Middleware Platforms (CMP), a single product which is installed and managed centrally, can replace the entire set of platforms installed separately, say for each departments.



Tenants, while sharing the same resource, will not be aware of the existence of the other tenants. Here, multi-tenancy enables centrally installed/deployed and managed resources, providing an independent middleware platform virtually for each department, registered as a tenant, in the organization's cloud middleware platform. Each tenant can have multiple users.


Now, a cloud middleware platform, when is hosted on a private, public, or a hybrid cloud infrastructure, becomes a Platform as a Service. Cloud Middleware Platform is also referred to as a cloud enabled application platform (CEAP), by Gartner, indicating that the application platform is cloud-enabled.



Stratos Cloud Middleware Platform


Are all the application platforms are cloud enabled? No, obviously not. The cloud enablement comes with the fruits of multi-tenancy, and the native support to be a cloud platform. 


An ideal example would be, WSO2 Carbon Platform, where the same platform, cloud enabled, becomes WSO2 Stratos Cloud Middleware Platform. A cloud middleware platform can usually be hosted over the cloud as a Platform as a Service. It should be noted that not all the PaaS are provided as a fully functional cloud middleware platforms. WSO2 StratosLive, the open java PaaS, is the publicly hosted cloud deployment of Stratos, from WSO2. Migration of your applications between the PaaS, and the Cloud Middleware Platform behind the PaaS are generally an easy job. WSO2 provides it from the bottom up - from an enterprise middleware platform named as Carbon, to the cloud middleware platform named as Stratos, and finally to the Platform as a Service - StratosLive and the other public, private, or hybrid clouds with Stratos as the Cloud Middleware Platform.


An open platform as a service is committed to fight against the vendor lock-in, by adhering to the open standards. Open source technologies help a lot in being committed to being open. Being open means, the application developers should not be writing an application solely focusing a platform. WSO2 is open by design.



See original post

Cloudchat

Written by Kathiravelu Pradeeban

I was able to witness the third #cloudchat that held on Thursday, August 11, at 4 p.m. ET focusing on open standards - specially interoperability, hybrid cloud, security, and compliance in detail.



To participate in the discussion we tweet with #cloudchat, as of the other twitter based panel discussions. It featured Andrew Watson, VP and Technical Director of Object Management Group (OMG); Sam Somashekar, VP Marketing and Business Development, Kaavo; and Dr.Chris Harding, Forum Director for The Open Group Cloud Computing Work Group.


A recap on the discussion can be found here.


The forth #cloudchat will be held on Sept. 8 at 4 p.m. ET!



See original post

Setting up Stratos locally in your home computer is just a few steps away ..

Written by Kathiravelu Pradeeban

Now you can check out the trunk code of Carbon from the repository, build, and configure WSO2 Stratos in a few steps.
Check out https://svn.wso2.org/repos/wso2/trunk/carbon

mvn clean install from carbon directory



Set up the following in ~/.bashrc (change the values accordingly for the email addresses, carbon directory, the transport sender, and the other information given below.)
# Stratos setup constants

export stratos_local_ip="10.100.0.15"



export CARBON_DIR="/home/pradeeban/trunk/stratos/carbon"

export STRATOS_DIR=$CARBON_DIR/stratos_home

export STRATOS_VERSION=1.1.0-SNAPSHOT

export SSO_ENABLED=true

export CREATE_DB=true

export STRATOS_MAIL_TRANSPORT=' ********.***.***25 false false cloud-noreply@wso2.com '

export NOTIFICATION_EMAIL=pradeeban@wso2.com



If you are going to use the stratos binaries, you can use the downloaded packs, usually available from the builders online (find it here, for the Stratos-1.5.1 binaries), as of the trunk or development branch version or from the wso2.org download area, for a released version.



Place the downloaded zips in to a location and also define that location in bashrc profile.

export PACKS_DIR="/home/pradeeban/Downloads"



Now you may run the set up script as above.



Running Stratos Set up script - carbon/build/stratos-setup.pl

./stratos-setup.pl


Add the following lines to your /etc/hosts file



127.0.0.1 cloud-test.wso2.com

127.0.0.1 identity.cloud-test.wso2.com

127.0.0.1 governance.cloud-test.wso2.com

127.0.0.1 appserver.cloud-test.wso2.com

127.0.0.1 bam.cloud-test.wso2.com

127.0.0.1 dss.cloud-test.wso2.com

127.0.0.1 bps.cloud-test.wso2.com

127.0.0.1 brs.cloud-test.wso2.com

127.0.0.1 cep.cloud-test.wso2.com

127.0.0.1 esb.cloud-test.wso2.com

127.0.0.1 gadget.cloud-test.wso2.com

127.0.0.1 mb.cloud-test.wso2.com

127.0.0.1 mashup.cloud-test.wso2.com





Start all the Stratos services

from $stratos_home

sh stratos.sh start all



Stop all the Stratos services

form $stratos_home

sh stratos.sh stop all


Also you can start and stop the services individually or as a chosen subset of all the available services.


Here by pointing the browser to cloud-test.wso2.com, you can access Stratos Manager. Pls note that in the configuration we have enabled SSO. You can also set up the Stratos services with SSO disabled instead, by setting export SSO_ENABLED=false, above in .bashrc profile. 


Since we have enabled SSO as above, once you have logged in to one of the services, you can just click and enter the other services without logging into each of the other services separately. Here identity.cloud-test.wso2.com is the url for WSO2 Identity Server as a Service, and governance.cloud-test.wso2.com is WSO2 Governance Registry as a Service, and the other urls as given above lists the respective services.






Await the official Stratos-1.5 release soon!



See original post

How to write xsd file (Enrich mediator) and use it with eclipse IDE

In general, a schema is an abstract representation of an object's characteristics and relationship. XSD specifies how to formally describe the elements in an Extensible Markup Language (XML) document.
Here i will briefly describe how to write simple XSD and use it with eclipse ide.

first we will consider simple xml file

<enrich xmlns:p="http://ws.apache.org/ns/synapse" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<p:source clone="false" type="custom" xpath="/default/xpath"/>
<p:target action="replace" type="custom" xpath="/default/xpath"/>
</p:enrich>

Here is the XSd file to describe that XML file. Save this file as enrich.xsd

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
           targetNamespace="http://ws.apache.org/ns/synapse"
           xmlns="http://ws.apache.org/ns/synapse">
<xs:element name="enrich">
    <xs:complexType>
        <xs:sequence>       
    <xs:element name="source">
        <xs:annotation>
            <xs:documentation source="description">
                Source Configuration
            </xs:documentation>
        </xs:annotation>
                <xs:complexType>         
                    <xs:attribute name="clone" minOccurs="1" maxOccurs="1">
                        <xs:annotation>
                        <xs:documentation>
                             Weather message can be cloned or use as a reference during the enriching
                         </xs:documentation>
                        </xs:annotation>
                        <xs:restriction base="xs:string">
                     <xs:enumeration value="true"/>
                    <xs:enumeration value="false"/>
                 </xs:restriction>
                         </xs:attribute>
             <xs:attribute name="type" minOccurs="1" maxOccurs="1">
                         <xs:annotation>
                         <xs:documentation>
                            Type that the mediator use from the original message to enrich the modified message that pass through the mediator
                         </xs:documentation>
                         </xs:annotation>
                 <xs:restriction base="xs:string">
             <xs:enumeration value="custom"/>
                         <xs:enumeration value="envelope"/>
                        <xs:enumeration value="body"/>
                 <xs:enumeration value="property"/>
                        <xs:enumeration value="inline"/>
                 </xs:restriction>
                         </xs:attribute>
            <xs:attribute name="xpath" type="xs:string" use="optional"/>
            <xs:attribute name="property" type="xs:string" use="optional"/>
         </xs:complexType>          
        </xs:element>      
    <xs:element name="target">
            <xs:annotation>
                <xs:documentation source="description">
                Target Configuration
                </xs:documentation>
            </xs:annotation>
            <xs:complexType>
        <xs:attribute name="action" minOccurs="1" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                            The relevant action can be applied to outgoing message.
                        </xs:documentation>                    </xs:annotation>
                <xs:restriction base="xs:string">
                        <xs:enumeration value="replace"/>
                       <xs:enumeration value="child"/>
                <xs:enumeration value="sibiling"/>
            </xs:restriction>
                </xs:attribute>
        <xs:attribute name="type" minOccurs="1" maxOccurs="1">
                    <xs:annotation>
                        <xs:documentation>
                           Type of enriching the outgoing message.
                        </xs:documentation>
                    </xs:annotation>
                <xs:restriction base="xs:string">
                        <xs:enumeration value="envelope"/>
                       <xs:enumeration value="body"/>
                <xs:enumeration value="property"/>
                       <xs:enumeration value="custom"/>
            </xs:restriction>
                </xs:attribute>
        <xs:attribute name="xpath" type="xs:string" use="optional"/>
        <xs:attribute name="property" type="xs:string" use="optional"/>
    </xs:complexType>
    </xs:element>
        </xs:sequence>
    </xs:complexType>
</xs:element>  
</xs:schema>
If you need to find more about enrich mediator you can visit
http://wso2.org/project/esb/java/3.0.1/docs/mediators/enrich.html


If you need more examples of xsd's written for various uses visit
https://svn.apache.org/repos/asf/synapse/trunk/java/repository/schema/mediators/filter/

Then we will see how we can use this with eclipse IDE
01.Open eclipse IDE
02.From window menu goto preferences
   Window>Preferences
   Then you will see image shown below



03.from the menu appearing you must select xml catalog as shown below


04.Then add xml catalog entry as shown in the figure shown in figure
05.browse your xsd file and save it
06.create new eclipse project and add new XML file
   from menu New > XML
07.Create new xml as shown in the below images.

   create xml from xml schema

select xml category and then point the xml




  Than you will get new xml file as shown below

Now you have created it successfully.

See original post

How to do Load test against web service - Using java bench

write web service  and upload it to some web server

Then generate wsdl by type address as follows
http://appserver.cloud-test.wso2.com:9766/services/t/yyy.yyy/testB?wsdl

use soapui to generate soap message
Create new project and give wsdl to it





Then
get the request text
Copy it into request.xml file located inside the folder jababench folder

Then use the following command in command line to execute

java -jar benchmark.jar -p request.xml -n 100 -c 10 -k -H "SOAPAction: readResource" -T "text/xml; charset=UTF-8" http://appserver.cloud-test.wso2.com:9766/services/t/yyy.yyy/testB

usage: HttpBenchmark [options] [http://]hostname[:port]/path
-v Set verbosity level - 4 and above prints response
content, 3 and above prints information on headers, 2 and above prints
response codes (404, 200, etc.), 1 and above prints warnings and info.
-H
Add arbitrary header line, eg. 'Accept-Encoding:
gzip' inserted after all normal header lines. (repeatable)
-n Number of requests to perform for the benchmarking
session. The default is to just perform a single request which usually
leads to non-representative benchmarking results.
-T Content-type header to use for POST data.
-c Concurrency while performing the benchmarking
session. The default is to just use a single thread/client.
-h Display usage information.
-i Do HEAD requests instead of GET.
-k Enable the HTTP KeepAlive feature, i.e., perform
multiple requests within one HTTP session. Default is no KeepAlive
-p File containing data to POST.

here
http://appserver.cloud-test.wso2.com:9766/services/t/yyy.yyy/testB is my service endpoint
SOAPAction: readResource is my operation name
inside wsdl you will find operation name=readResource
here we used soap 1.1 wsdl then we must use -T "text/xml

then run your test
you will see following output









See original post

How to detect bundle starts faliure(WSO2 Carbon) and how to fix it simply

WSO2 Carbon is based on set of OSGI bundles. when server starts those bundles must starts. But in some cases those may not start due to some reason. In most of issues we ask people to check weather bundles started or not. here i will briefly describe how to detect bundle start  failure and how to fix it without having any previous knowledge about osgi(I'm also not expert in osgi)Most of cases bundles will not start automatically may be they depend on some other bundle that did not started successfully or they may not included in bundledef file.we will see how to detect it

01.start wso2server in diagnose mode with osgi console by typing following  command in the command line
 sh wso2server.sh -DosgiConsole

you can get all osgi bundles information by typing ss in command line so you will be able to view bundles infomation

check weather your bundles state in order to use it, it must be activated.In cases it installed only we can start them manually by typing start command


if you see dependency or not listed in bundles list you have to manually add them to bundleinfo file.

in this case you can see we cant start this bundle because it depend on some other bundle that not listed so we have to manually add them to bundleinfo file.
Now you can see where is the root of error and we can fix it now

you can see file inside this filder

wso2stratos-manager-1.1.0-SNAPSHOT/repository/components/configuration/org.eclipse.equinox.simpleconfigurator/bunldles.info
This file contains all bundles that should be started


org.wso2.carbon.tenant.reg.agent.client,1.1.0.SNAPSHOT,plugins/org.wso2.carbon.tenant.reg.agent.client-1.1.0.SNAPSHOT.jar,4,true
org.wso2.carbon.tenant.reg.agent.service,1.1.0.SNAPSHOT,plugins/org.wso2.carbon.tenant.reg.agent.service-1.1.0.SNAPSHOT.jar,4,true
org.wso2.carbon.tenant.register.stub,3.2.0.SNAPSHOT,plugins/org.wso2.carbon.tenant.register.stub-3.2.0.SNAPSHOT.jar,4,true


so we will add new bundle that need to start as follows and put corressponding jar file in to repositary/components/pluggings folder

then you can start server again and you can check weather bundles started or not

See original post

Written by Waruna

WSO2Con 2011

Architects, Developers, IT Managers and technology enthusiasts, WSO2Con 2011, focuses on you! Newbie or seasoned professional, WSO2Con offers a great week of learning, sharing and the opportunity to connect with experts who have shaped the future enterprise. Register here

See original post

 

Copyright 2009 All Rights Reserved Revolution Two Church theme modified by Milinda Pathirage