WSO2 Carbon Studio in a Nutshell
By Dakshitha Ratnayake
- 29 Aug, 2011
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. Therefore, the need for a tool that can ease the creation and deployment process for these said artifacts arose. WSO2 Carbon Studio was created to fulfil this requirement.
- What is WSO2 Carbon Studio
- The Main Features of Carbon Studio
- How to Create an Artifact
- The Artifacts are Created. What's Next?
- The Biggest Advantage of Carbon Studio
- The WSO2 Product Stack
Simply put, Carbon Studio is an Eclipse plugin, 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. For detailed instruction on how to install WSO2 Carbon Studio, please refer to the article: How to install Carbon Studio.
Let's first take a look at the WSO2 product stack.
The lean, complete, OSGi-based WSO2 Carbon platform includes a range of SOA products that deliver messaging, data, business, presentation, identity, security, governance, monitoring and management services. You can select and use the services to fulfill your unique middleware requirements. Maybe all you need is just an Application Server to host your applications or an Enterprise Service Bus and a Data Services Server. The full stack or individual products of WSO2 middleware products stack covers a comprehensive array of enterprise middleware needs.
- WSO2 Application Server for service hosting (Web Apps, JAX-WS, Axis2, Spring)
- WSO2 Enterprise Service Bus for mediation services (and SAP, FIX, HL7, Salesforce.com adapters)
- WSO2 Message Broker for messaging services (AMQP, JMS, Amazon SQS, WS-Eventing)
- WSO2 Data Services Server for managing data sources and data access (NoSQL, RDBMS, Flat file, CVS, MS-Excel, Google Docs)
- WSO2 Identity Server for authentication, single sign-on and access control (SAML 2.0, OpenID, OAuth, XACML, WS-Security)
- WSO2 Governance Registry and repository for managing WSDL, schemas, policies, life cycles and versioning
- WSO2 Business Process Server(BPEL) ,WSO2 Business Rules Server (JSR-94) ,WSO2 Complex Event Processing Server ,WSO2 Business Activity Monitor (JMX) and WSO2 Mashup Server for composing, orchestrating and monitoring business processes and activities
- WSO2 Gadget Server for portal services
- WSO2 Web Services Frameworks for C , C++ and PHP provide simple APIs for implementing web services and web service clients
With Carbon Studio, you can easily create artifacts for the WSO2 Carbon platform. The types of artifacts are mostly java-based 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 simplifying 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 WSO2 Carbon platform.
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 WSO2 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 you can create Carbon Artifacts inside them. 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 can select an artifact from an array of Carbon artifacts as shown below. Choose what you want to create . You can have different types of artifacts in one CApp.
Once the CApp and the artifacts are created, how do you deploy them 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. The good news is you don’t have to manually filter these different articles and deploy them yourself. You can deploy the whole container into the servers and the servers will take care of the whole filtering process and will only take the artifacts that belong to them. As a result, when you want to deploy this CApp project into different servers, you must first convert the CApp project to an archive file. The archive file is known as a CAR file, which is short for Carbon Archive. The CAR file is what needs to get into the servers.
There are two ways to deploy artifacts. You can add the servers from within Carbon Studio, add the Carbon Applications (CApps) to the servers and start the servers. The artifacts will be deployed in their respective servers. Or else, you need to create a CAR in order to deploy it outside Carbon Studio on to your server instance like I mentioned earlier.
In a nutshell, you can simply 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. Your services will be instantly deployed for you!
Considering the above facts, the biggest advantage of Carbon Studio 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 are still learning about the products you can still easily create these artifacts because Carbon Studio provides a user-friendly and precise user interface.
1. Carbon Studio
Dakshitha Ratnayake, Software Engineer, WSO2 Inc.