wso2con 2011: introduction to the wso2 carbon platform

66
Introduction to WSO2 Carbon Platform by Afkham Azeez Supun Malinga Director of Architecture Software Engineer WSO2 Inc. Lean, Consistent, Modular Enterprise Software Platform

Upload: afkhamazeez

Post on 10-May-2015

4.662 views

Category:

Technology


2 download

DESCRIPTION

WSO2 Carbon platform is the base framework for all fifteen WSO2 products and Cloud services. Based on OSGi, WSO2 Carbon is lean, consistent, modular, componentized middleware platform for enterprise software. The Carbon platform consists of a powerful core set of components and numerous product-specific components that are plugged together to provide a unique set of products. These highly decoupled components can easily be added or removed from any Carbon instance.This tutorial will provide a fundamental overview of WSO2 Carbon, including:An overview of the WSO2 Carbon architectureThe advantages of a modular frameworkWSO2 Carbon platform capabilitiesInsights to how Carbon is developed and builtA comprehensive demo on the lifecycle of a carbon component, explaining how a component is created, plugged into the platform and usedCarbon UI framework

TRANSCRIPT

Page 1: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Introduction to WSO2 Carbon Platform

by

Afkham Azeez Supun Malinga Director of Architecture Software Engineer

WSO2 Inc.

Lean, Consistent, Modular Enterprise Software Platform

Page 2: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Agenda

• WSO2 Platform

• In-depth look at WSO2 Carbon

• Writing a Carbon component

Page 3: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

About WSO2 Founded in 2005 by acknowledged leaders in

XML, Web Services Technologies & Standards and Open Source

Producing entire middleware platform 100% open source under Apache license

Leading contributors to the Apache Software Foundation

Business model is to sell comprehensive support & maintenance for our products

Venture funded by Intel Capital

Global corporation with offices in USA, UK & Sri Lanka

100+ employees and growing

Page 4: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Selected Customers

Page 5: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 PLATFORM

Page 6: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Challenges in Enterprise Software• Legacy Modernization and Integration

– Most enterprises have complex existing systems that are expensive to replace and need to be connected to web applications and new business processes

• End-to-End Flows, Straight-Thru, Business Processes, Portals

– Enterprises need to reduce human interaction as much as possible to make transactions efficient

– When human interaction is required, it needs to be high-quality and contextual (portal, task list, analysis data available)

• Performance, Scalability and Reliability

– For Straight-Through-Processing and consumer-fronting applications there needs to be very high scalability and performance

• Skills

– There is a shortage of people required to build very high performance, complex, integrated applications. Simple effective systems with clear programming models are vital

• Governance

– Large enterprises have thousands of applications that need to be tracked, with lifecycle and dependency management

• Identity Management

– Need to integrate Web-based Identity management and federated identities – A strong move to Policy-based authorization and entitlement with central management

Page 7: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

How does WSO2 help?A complete platform to enable modern Enterprise Software

• Legacy Modernization and Integration

– Enterprise Service Bus, Business Adapters and Data Services connects to multiple existing systems

• End-to-End Flows, Straight-Thru, Business Processes, Portals

– Straight through processing supported by ESB flows and Business Process Server

– Human Task management and Rich User Interfaces with Gadgets and Portals

• Performance, Scalability and Reliability

– Industry leading performance: eBay 5B transactions/day, Fox Mobile 150m transactions/day

– Systems in full Continuous Availability mode (no downtime even for system updates)

• Skills

– WSO2 systems use industry standard programming models and effective tools and UIs

– Java/POJO, HTML/JavaScript, XML, Eclipse and Web-based consoles

• Governance

– WSO2 has a leading governance solution based

– Business Activity Monitoring allows Key Performance Indicators to be monitored

• Identity

– A full web-based identity management system with support for Java, .NET, C, C++, PHP

– Full Policy-based entitlement and authorization engine

Page 8: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Other Enterprise ChallengesChallenge• Vendor Lock-in

• High Cost and Procurement complexity

• Cloud vision and migration

• Inconsistent and complex systems

• Support is often hard to use

WSO2 Solution• 100% Open Source and Open

Standards

• Straightforward pricing, no multi-core hikes, simple contracts

• A complete cloud-enabled approach, strong cloud vision

• Completely modular stack:– Self-Consistent, use exactly what

you need and no more

• First class support system, top-rated support and response times

Page 9: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

WSO2 CarbonOn-premises Platform

Page 10: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Enterprise Expectations

Page 11: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

The WSO2 SOA platform

Page 12: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

WSO2 - A Complete Compositional Application Platform

• Orchestration & Composition– WSO2 Business Process Server– WSO2 Mashup Server

• Repository and Governance– WSO2 Governance Registry

• Monitoring– WSO2 Business Activity Monitor

• Identity Management and Security– WSO2 Identity Server

• Tooling– WSO2 Carbon Studio

Page 13: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Carbon Architecture• “Eclipse for Servers”

– Completely Modular Middleware– Based on the Equinox OSGi runtime– The most integrated composite application platform available

• Clean “front-end/back-end” separation– Every component has a core runtime, a clean SOA management interface, a

well-defined front-end console component– All completely pluggable, versioned, etc

• Full dependency management – Hence full re-use

• Pluggable common core services:– Registry, Key Management, Identity Management, Clustering, Monitoring/JMX,

Transports, etc– Cloud enabled

Page 14: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon : Component Architecture

Page 15: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon

Page 16: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon : Component Library

Page 17: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon : Distribution Artifacts

Page 18: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon : Share Runtime

Page 19: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Carbon Component Manager

Page 20: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Integration Features• Support for SOA, WOA, and Messaging

protocols– SOAP, WS-Security, SecureConversation,

Trust, ReliableMessaging, Discovery, MetadataExchange, MTOM, Transfer, Addressing

– JMS (tested with Tibco, IBM MQSeries, Sonic, Swift, Apache QPid, ActiveMQ)

– AMQP Broker component (beta in Q2 2011)

– CORBA/IIOP connectivity– HTTP – full REST support– SMTP/POP3, TCP, FIX, HL7, extensible

transports– File Adapter

• Rule based mediation• Transactional flows

• Transformation– Smooks (Flatfile, EDI, CSV, Record)– XSLT, XQuery– Variable Record

• Routing– Content and header based routing

(variable parsing for efficiency)– Message Router EIP

• Microflow engine– Aggregate/Disaggregate, filter, clone– Priority based queuing / mediation

• Tasks– CRON-like ability to run flows based on

timers• Events

– Multi-protocol event distribution engine

Page 21: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

ESB / Legacy Application Integration

Page 22: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Key Capabilities continued

• Business Process Server– BPEL 1.1 and BPEL 2.0 support– Full management console including

instance and process management• Identity Server

– Support for local and federated Identity– Full single-sign on (SAML2, OpenID,

Infocard)– Entitlement and authorization

• OAuth and XACML• Policy based

– Integration with ESB, Registry, etc

• Portal (Gadget Server)– Based on Google Gadget Specification– Supports OpenID, Infocard login– Inter-gadget communications– Automatic generation of gadgets from

WSDLs• Registry/Repository

– Highly scalable repository– Full versioning, lifecycle, dependency

management– Eclipse tooling (beta)– Command line, REST, WS-* APIs– Schema, WSDL management– Code and configuration management

Page 23: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Application Container

• WSO2 Application Server– POJO container

• Spring, JAXWS, pure POJO services

– Webapp• WAR deployment

• WS-* Support

• Clustering and session replicatio

• Full multi-tenant deployment and management of webapps

Page 24: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Extended Capabilities

• Business Rules Server– Embeddable

• Within ESB flows or POJO code

– Available as services• Callable remotely, from BPS,

etc– Stores and manages rulesets in

the Registry• Event Server – MB and CEP

– Event distribution and topic management

– Complex Event Processing

• Business Activity Monitoring– Out of the box monitoring of the

platform (services, mediations, etc)

– Extensible to monitor business metrics

– Analytical support

Page 25: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Business Activity Monitor

Page 26: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Key Enhancements in Carbon 3.x• Improved provisioning

– Web console, remote API and command-line

– Install, Uninstall, Revert– Patch management

• Clear dependency management and reversion

• WS-Discovery capabilities across the platform– Automatically publish and discover

services from providers and consumers

– Registry provides the WS-Discovery server

• Significantly improved registry support for large scale deployments– Clear separation of per-cluster

metadata vs enterprise metadata

• ESB 3.0.1– Priority Queuing– Hot deploy, undeploy, update, co-

deploy– Message Relay mode

• Governance Registry– Tree view– AJAX/Web XML editor– Impact analysis gadgets

• Identity Server – SAML2 Single Sign-on– OAuth federated authorization

• Available as cloud-ready images – Amazon AMI, vmWare and KVM

images

Page 27: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Tooling• Currently the tooling is a set of Eclipse components – BPEL and ESB editors– AS and Registry tools

• Carbon App and WSO2 Carbon Studio– Taking individual components and building a complete deployment

and tooling model for composite applications– Carbon Studio provides a complete tool environment for WSO2

• Carbon App is a deployment model that can auto-provision into a distributed infrastructure

• Takes account– Logical Topology– Mapping to Physical Topology– Versioning– Dependencies

Page 28: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

BPEL Editor

Page 29: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Gadget Editor

Page 30: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

WSO2 StratosCloud Middleware Platform

&Stratoslive Platform-as-a-Service

Page 31: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011© WSO2 2011

Enterprise IT in 2011

31

Page 32: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011© WSO2 2011

Enterprise IT in 2015+

32

Page 33: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

WSO2 Stratos

Page 34: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

WSO2 Stratos• Cloud Middleware Platform

• Can be hosted on a private or public infrastructure Cloud (IaaS) or directly on the infrastructure

• Self-service portal for managing the platform

– Domain/sub-domain registration

– Each tenant can provision users

• Or be auto-provisioned from LDAP or AD

– Each tenant can choose “Stratos Services”

– Tenant Stratos Services are isolated and secure

– Each tenant Stratos Service has a full administration console with fine-grained user authorization

• StratosLive - PaaS

– http://stratoslive.wso2.com

Page 35: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon and Stratos

Page 36: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Page 37: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

© WSO2 2011

Cloud Native Middleware

Page 38: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Design Objectives : WSO2 Carbon

To build a, Lean Modular Enterprise-class

Middleware platform

Page 39: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Design Objectives : WSO2 Carbon

Self-consistent and lean

Internal interoperability

External interoperability

Infinitely flexible and agile for rapid solution architecture adoption

Open standards and Open Source

A complete middleware platform from data to screen

Page 40: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Complete Platform – Data to Screen

Page 41: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon based products WSO2 Carbon Set of Features= +

WSO2 Carbon Based Products

WSO2 Carbon based products WSO2 WSAS WSO2 ESB WSO2 IS

Features Service Management Feature Proxy Services Features Transport Management Feature

Page 42: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon, The webapp

Carbon can be used as an standalone server or can be deployed in application servers.

Carbon is itself a webapp, hence In the standalone mode, it uses an embedded tomcat instance.

In both modes, Carbon is launched by the BridgeServlet which bridges the non-OSGi world and the OSGi world.

Page 43: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

WSO2 Carbon, The webapp

Page 44: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Various Technologies

OSGi.

Equinox P2.

J2EE specially servlets, JSPs

Web Services and WS-* specifications.

...

Page 45: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Key Features

Page 46: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Core Platform Services

Mechanisms to providing and consuming Web services

Repository Services

Authentication and Authorization

Logging Service

Clustering for HA

UI Framework

Multitenancy

Page 47: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Enterprise Deployments

Enterprise ready for large deployments with

Clustering

High availability

Scalability

Page 48: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Some other Features…

Mechanisms to providing and consuming services,

Message mediation,

Service Orchestration,

Service Governance,

Service Monitoring,

Business Process Management.

Page 49: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

UI Framework / Easy Configuration

Easy configuration via a rich Web-based graphical management Console allows remote administration of the system.

Clear interface for component configuration

Based on Apache Tiles UI framework.

Page 50: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Development and Release Process

Open and agile development model

All binaries and source code distributed under the Apache Software License 2.0

Source code repository (Subversion)

https://svn.wso2.org/repos/wso2 Issue tracker (JIRA)

http://wso2.org/jira

All design and development discussions are carried out on public mailing lists

Page 51: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Building and Testing

Build system based on Apache Maven2

Continuous integration system powered by Hudson

Automated nightly builds Automated testing

Page 52: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Documentation

Context sensitive help on the UI

A documentation distribution as well as an on-line documentation

http://wso2.org/project/carbon/3.2.0/docs/

Articles and tutorials can be found on WSO2 Oxygen Tank

http://wso2.org/library/carbon

Many publications on external websites

Page 53: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

What is a Carbon Component A set of OSGi Bundles.

Lives in the Carbon Framework. Hence should conform to rules define in the Carbon Framework.

Two aspects/ BE-FE Separation

– Every component has a core runtime, a clean SOA management interface, a well-defined front-end console component

– Back-end Runtime

– Front-end Console Uses Core Carbon Services

– Via OSGi service registry

e.g. Registry Service, UserManager Service, etc.

Page 54: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

What is a Feature In Eclipse world

Feature is a grouping of set of logically related plug-ins/ OSGi bundles

Feature can be installed into Eclipse platform using its Update Manager

In Carbon world Feature can be thought of as an installable form of one or

more logically related Carbon component

Service Management Component What you develop

Service Management Feature What you install

Feature is a grouping of one or more logically related Carbon components

Features can be installed into Carbon based product using Feature Manager

Page 55: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Features

Allows you to specify pre-requisites of your Carbon component.

Other dependent features, bundles. Dependency Management.

Are installable Units which can be installed into any Carbon based product.

Can be install using the WSO2 Carbon Feature Manager

Can be shared with others by packaging features as a Repository (Update Site in eclipse terms).

Page 56: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Carbon Component: Development Process• Develop the Carbon component

Back-end component (BE OSGi bundles) Front-end component (FE OSGi bundles) Common bundles, if any

• Develop the corresponding feature BE/Server Feature FE/UI Feature Composite Feature

• Install into a Carbon based product By integrating with the product build

system By developing a feature repository and

installing using Feature Manager

Page 57: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Carbon Component: Build Process We use Maven as our build tool.

Building Carbon components/OSGi bundles

Use Maven Bundle plugin to build OSGi bundles

http://svn.wso2.org/repos/wso2/branches/carbon/3.0.0/components/logging/org.wso2.carbon.logging.service/3.0.0/pom.xml

Building Features

Use Maven P2 Feature plugin (Developed at WSO2)

User p2-feature-gen goal

http://svn.wso2.org/repos/wso2/branches/carbon/3.0.0/features/logging-mgt/org.wso2.carbon.logging.mgt.server.feature/3.0.0/pom.xml

Building a Repository

Use Maven P2 plugin

P2-repo-generator goal

http://svn.wso2.org/repos/wso2/branches/carbon/3.0.0/features/repository/pom.xml

Page 58: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

What do you need to know to develop a Carbon component?

Java – to write some code

Carbon - Understand the architecture and the usage

Apache Axis2 - enough to create a service and consume it

JSP

XML

SVN - To check out the code

Maven - To build the code

Plus a little OSGi and a little p2 OSGI is useful for:

Getting OSGi services (e.g. Registry) injected into your code

Handling activation of bundles

Page 59: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

LET’S WRITE SOME CODE!Enough talking!

Page 60: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Student Manager Component Lets develop a sample Carbon component to

understand the development process as well as the build process.

Student Manager component consists of a BE runtime which exposes a Web

services to

Add new students Get the list of students

Consist of a FE console which displays the available student information on the Carbon management console.

Student Manager Feature org.wso2.carbon.student.mgt.server.feature

org.wso2.carbon.student.mgt.ui.feature

org.wso2.carbon.student.mgt.feature

Page 61: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Developing the BE Component

Some actual server logic plus an admin service to manage it

Add some special sauce into the services.xml to let us know it’s an admin service

component.xml → configures permissions

Page 62: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

BE Component: Directory Structure org.wso2.carbon.student.mgt

- src/- main/ - java/

- org/wso2/carbon/student/mgt - Resources/ - META-INF/

- services.xml- component.xml

-test/- pom.xml

Page 63: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Developing the FE Component

Admin service client – standard Axis2 WSDL client

JSP

Helper code sets correct security

component.xml

Defines the menu structure to place the JSP in the right place

Page 64: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

FE Component: Directory Structure

org.wso2.carbon.student.mgt.ui

- src/ - main/

- java/ - resources/

studentmgt.wsdl org/wso2/carbon/student/mgt/ui/i18n/Resources.properties META-INF/ - component.xml

web/ student-mgt/ (web context of the FE console) doc/ userguide.html images/ js/ *.jsp filespom.xml

Page 65: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Resources

How to develop OSGi Bundles using the Maven Plugin

http://bit.ly/9TPMjl Getting Started with WSO2 Carbon

http://bit.ly/9CdzTO

Page 66: WSO2Con 2011: Introduction to the WSO2 Carbon Platform

Thank You!