Tuesday, August 16, 2011

WSO2 Carbon Studio in a Nutshell



The WSO2 Carbon platform consists of a number middleware products that are different to each other in terms of functionality, look-and-feel and configuration (of course they all lie on the same Carbon platform). These products require their own set of configuration files or 'artifacts' to be deployed within them in order to provide customized services to the user. The users will have to deploy these artifacts in order to generate services. Sometimes creating lengthy artifacts, creating many artifacts that are different to each other and deploying them to different servers/products is time consuming and cumbersome. Therfore, the need for a tool that can ease the creation and deployment process for these said artifacts arose and Carbon Studio was created.

What is Carbon Studio?
It is really an Eclipse plugin. It's just like any 3rd party plugin that you can install in Eclipse. When you install the plugin to the Eclipse IDE you will be able to work in an SOA development environment along with the standard features of Eclipse. To install Carbon Studio go to this article on how to install Carbon Studio.

What Can You Do with Carbon Studio?
With Carbon Studio you can easily create artifacts for the WSO2 Carbon platform. The types of artifacts are mostly java based artifacts or xml configurations designed differently for each of the products in the Carbon platform. Development of these artifacts is surprisingly easy with the graphical editors enhancing the experience of editing xml based configurations. The availability of easy development and debugging capabilities of Java based artifacts such as Axis2-based services, registry handlers, data validators and synapse mediators, makes it so much better than doing everything manually. You can even run your products/servers within Carbon Studio and test your applications. Carbon Studio is all about making your life easier with respect to creating your SOA applications for the Carbon platform.

How to Create an Artifact
You can easily create a custom artifact such as a data service, an endpoint, a bpel process or any other artifact. For example say you need to create a data service. The configuration files for a data service is a dbs file (with the extension dbs e.g. dataservice1.dbs). dbs files are used in the Data Services Server to save the information about databases, queries and the data service operations that are linked to those queries. To create a dbs file you can either go through the wizard in the Data Services Server to create a data service or else you can use Carbon Studio to create a dbs file. To create a dbs file in Carbon Studio you first need to create a CApp project. The abbreviation CApp stands for Carbon Application. It's just like any other Java project that you can create within Eclipse, except of course you can create Carbon Artifacts inside them. So before you create a data service or any other artifact file you need to have a CApp created.

This is how you create a CApp ->




When you right click on your CApp you will find that you can select an artifact from an array of Carbon artifacts as shown below. Choose what you want to create . Yes, you can have different types of artifacts in one CApp.



The Artifacts are Created. What's Next?
The CApp and the artifacts are created. How would you deploy these artifacts into their respective servers? A dbs file must be deployed in the Data Services Server and a bpel process must be deployed in the BPS Server etc. but your CApp contains different artifacts. So how do you get this done? The good news is we dont have to manually filter these articles and deploy them ourselves. We can deploy the whole container into the servers and the servers will take care of the whole filtering process and only take the artifacts that belong to them. So when we want to deploy this CApp project into different servers, we must first convert this CApp project to an archive file. This archive file is known as a CAR file which is short for Carbon Archive. This CAR file is what needs to get into the servers.

Actually, there are two ways of deploying artifacts. You can either add the servers from within Carbon Studio and add the Carbon Applications (CApps) to the servers and start the servers and the artifacts will be deployed in their respective servers or else you need to create a CAR if you want to deploy it outside Carbon Studio on to your server instance like I mentioned earlier.

Summary
In a nutshell, you can create the relevant artifacts within Carbon Studio, create many of them in one CApp, create a CAR file from the CApp and deploy the CAR into you servers and voila! Your services are deployed for you!

To sum up, let's discuss the advantages of Carbon Studio. Taking the above facts into consideration, the plus point is, if you know your way around the Carbon platform or if you know your way around a particular server that you are interested in such as the ESB server, you can create synapse.xml or sequence.xml files quickly and deploy them all in one go by using Carbon Studio . This I believe is the strongest feature in Carbon Studio. Even if you are new to the Carbon platform and you are still learning about the products you can easily create these artifacts because Carbon Studio provides a user-friendly and precise user interface.


No comments:

Post a Comment