"Web Age Speaks!" Webinar Series

Practical Open Source SOA Introduction  Mikhail Vladimirov  Director, Curriculum Architecture  [email protected] Web Age Solutions  Providing a broad spectrum of regular and customized training classes in programming, system administration and architecture to our clients across the world for over ten years

©WebAgeSolutions.com 2 Overview of Talk

SOA definition Enterprise Integration Patterns Presentation services What is an ESB? Messaging Business Process Management

©WebAgeSolutions.com 3 Practical Open Source SOA

SOA definition SOA definition

The OASIS (Organization for the Advancement of Structured Information Standards) consortium describes SOA as a paradigm for matching needs and capabilities in a distributed environment Service consumers have needs Service providers offer capabilities SOA facilitates matching needs with capabilities SOA facilitates this matching in a distributed fashion across ownership domains

©WebAgeSolutions.com 5 SOA definition

 Some people gave up on trying to define what SOA is, saying that it means whatever best suites the person using the term  Others even claim that SOA benefits were overhyped and it is de-facto dead (circa 2009)  SOA is survived by its offspring: mashups, BPM, SaaS, Cloud Computing, and all other architectural approaches that depend on “services”. [http://apsblog.burtongroup.com/2009/01/soa-is-dead-long- live-services.html]  Everybody seems to agree, however, that SOA (whatever it is) is not about specific technology, it is about thinking in terms of services, capabilities and their interactions. It is a style of design

©WebAgeSolutions.com 6 Too Much Prescriptive Technology

Source: @stilkov - http://www.innoq.com/blog/st/

©WebAgeSolutions.com 7 Why Open Source SOA?

 OSS Frameworks and Tools have reached a level of technology maturity to qualify for specific use cases in Enterprise  You can use the OSS products most appealing to you with the low Cost of Entry. If needed, get development, deployment and 24x7 product support with low TCO

Source: www.WSO2.com

©WebAgeSolutions.com 8 Practical Open Source SOA

Enterprise Integration Patterns EIP

 The book by Gregor Hohpe and Bobby Woolf (http://www.enterpriseintegrationpatterns.com/toc.html)  Formalizes Enterprise Integration Solutions in 65 Patterns that help assemble elements of SOA infrastructure

©WebAgeSolutions.com 10 Integration Tools & Platforms

The solutions and approaches described in Hohpe’s book are relevant for integration tools and platforms such as IBM WebSphere MQ, TIBCO, Vitria, SeeBeyond, WebMethods, or BizTalk, messaging systems such as JMS,WCF, or MSMQ, ESB's such as Sonic, Fiorano, ServiceMix, Mule, Apache Synapse, or WSO2, and SOA and Web-service based solutions.

©WebAgeSolutions.com 11 One Real-World Enterprise System Architecture

Source: http://www.infoq.com/presentations/3-SOA-Case-Studies-Paul-Fremantle

©WebAgeSolutions.com 12 Practical Open Source SOA

Presentation Services Liferay: Open Source Java Portal

 Liferay implements JSR 268 Portal API  Delivers open source enterprise solutions for portals, publishing, content, and collaboration  Runs in servlet containers (Jetty, Tomcat) and existing JEE application servers  Ready for the Enterprise:  Clusterable configuration for high availability  Implements top ten OWASP-recommended security practices  Options for Terracotta, Oracle RAC, and other scalability solutions  Simplified UI development  User, Group management  Secure SSO  Role-based content delivery  Auditing & Performance Monitoring  Multi-language Support

©WebAgeSolutions.com 14

Simpler and More Flexible …

Liferay folks claim that their Portal is Simpler than WebSphere®: • Deploy Liferay in a week to get a full solution for portals, content and collaboration for less than the cost of a single WebSphere® CPU. More flexible than SharePoint®: • Unlike SharePoint®, Liferay runs in non-Microsoft environments, is easy to customize, and integrates with your existing applications.

©WebAgeSolutions.com 15 Liferay IDE Liferay IDE is a set of Eclipse plug-ins supporting development of Liferay Portal applications and artifacts: portlets, hooks, layout templates, themes, and EXT-style plug-ins

An Enterprise Edition (EE) of the IDE called Liferay Developer Studio is also available to current or potential EE customers; it includes support for  Websphere and Weblogic server adapters

©WebAgeSolutions.com 16 Liferay IDE

©WebAgeSolutions.com 17 Liferay IDE

©WebAgeSolutions.com 18 Liferay Server Administration

©WebAgeSolutions.com 19 Liferay System Libraries (WEB-INF\lib folder)

©WebAgeSolutions.com 20 Liferay Technology Stack

©WebAgeSolutions.com 21 Practical Open Source SOA

What is an ESB? ESB Defined

(ESB) is an Architectural Pattern From the SOA perspective, ESB can be used as an integration platform that enables existing IT assets and applications to be exposed as services Important part of an SOI (Service Oriented Infrastructure)

©WebAgeSolutions.com 23 ESB vs. EAI

 Most ESB vendors in the past were also (surprise!) enterprise application integration (EAI) solution providers (IBM WebSphere Message Broker, TIBCO Business Works, and Sonic XQ))  Two main differences between ESB and EAI:  ESB implements the bus-based architecture while EI solutions use hub-and-spoke architecture  For the most part, EAI solutions used proprietary technologies and data formats. ESB products use open standards for communication and data exchange (WSDL, XSD, XML, SOAP, REST, JMS, JEE Connector Architecture, etc.)  JBossESB positions itself as the next generation of EAI (without vendor lock-in)

©WebAgeSolutions.com 24 ESB – Big Picture

Source: Wikipedia

©WebAgeSolutions.com 25 ESB Distilled

The Service Provider is completely decoupled from the Consumer ESB transparently connects consumer(s) with provider(s) ESB can introduce such enterprise services as security, audit, throttling, HA, etc., protecting the Service Provider

©WebAgeSolutions.com 26 ESB on eBay

©WebAgeSolutions.com 27 ESB Core Functionality

 Message routing (message header/content based; rules-based)  Location transparency (service consumer is decoupled from provider)  Transport protocol conversion (HTTP, JMS, TCP, File, etc.)  Connectivity and interoperability (a/synchronous; p2p, pub/sub)  Message mediation (via adapters, protocol transformation and service mapping)  QoS (security: authentication authorization, encryption; audit; extensibility; interoperability; HA; transactional support; etc.)  Message manipulation (transformation from one format into another) and enhancement  Monitoring & Management

©WebAgeSolutions.com 28 JBoss ESB

JBoss ESB started by acquiring enterprise- ready Rosetta messaging product Rosetta was developed using JBoss Enterprise Middleware Suite (JEMS) technologies and has been used as a messaging backbone for a large insurance provider in Canada, handling data from 3,000 employees in 40 locations and two million customers for nearly three years

©WebAgeSolutions.com 29 JBoss ESB Features

 Can run on many Java Application Servers  Tight integration with JBoss  LGPL v2.1  Community and Enterprise versions offered  Registry support  JAX-R  jUDDI  SOA Software UDDI  Eclipse IDE integration  jBPM integration  Extensive Messaging support: HornetQ, JBoss Messaging, MRG, JBossMQ, Oracle AQ and MQSeries

©WebAgeSolutions.com 30 JBoss ESB Architecture

Source: http://www.jboss.org/jbossesb

©WebAgeSolutions.com 31 Mule ESB

 Mule ESB is a lightweight Java-based enterprise service bus (ESB) and integration platform  Can run in a servlet container or stand-alone  It is built on the Staged Event-Driven Architecture (SEDA) principles  Supports 30+ protocols and technologies  Offers Eclipse IDE-based Mule Studio  Comes in two editions: Community and Enterprise  Enterprise Edition comes with:  HA (available only with Platinum subscription)  WebSphere MQ Connector  Service Registry (Galaxy)  Management Console

©WebAgeSolutions.com 32 Mule ESB Features

©WebAgeSolutions.com 33 Mule ESB Anatomy

©WebAgeSolutions.com 34 Apache ServiceMix

 Supports JBI and JCA as well as a wide range of connectors  Deployed in any servlet container  Offers a container for OSGi-based service bundles  Sits on top of ActiveMQ and uses it for remoting and HA  Main parts are:  Camel for message routing  CXF for web services  Karaf as a lightweigth OSGi container  Quartz for scheduling  JMX for monitoring  Historically had roots in Java Business Integration (JBI) which now is defunct (spec disbanded)  Enterprise-grade FUSE project supported by RedHat is the certified ServiceMix distro which has commercial support  Popular in US

©WebAgeSolutions.com 35

WSO2

 WSO2 as an open source SOA project was launched in 2005  Offered under Apache 2.0 License  Uses Carbon – OSGi-based runtime to host:  Apache Synapse-based ESB (released in 2007)  Registry  Business Process Server  Heavy on Axis2  Supports HA  Uses Apache Zookeeper project for reliable distributed server coordination  (SVN) based deployment  Governance Registry integration for large-scale deployments  Supports distributed caching  On-site development / training / consulting and 24x7 product fee-based support available (no separate Enterprise edition)

©WebAgeSolutions.com 36

WSO2 Logical Architecture

©WebAgeSolutions.com 37 WSO2 Network Deployment

Source: http://wso2.com

©WebAgeSolutions.com 38 WSO2 Support

“WSO2 provides high-quality development services for customers requiring an augmented team during the course of a project spanning a minimum of one month. WSO2 supplies qualified Engineer(s) dedicated to the customer project and acting as a virtual team member, whether on-site or off-site, for the term of the project.”

Source: http://wso2.com/support

©WebAgeSolutions.com 39 Spring Integration

 Provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns while maintaining the separation of concerns  Enables lightweight messaging and supports integration with external systems via declarative adapters  Adapters provide a higher-level of abstraction over Spring's support for remoting, messaging, and scheduling

©WebAgeSolutions.com 40 Bug List: It is hard to make it right

 [INT-2859] - spring-integration-scripting memory leak  [INT-2862] - Memory Leak in Tcp Outbound Gateway  [INT-2875] - JmsOutboundGatewayParserTests Consuming High CPU  [INT-2889] - Concurrency Problem in BeanFactoryTypeConverter . . . Source: https://jira.springsource.org/secure/ReleaseNote.jspa?projectId=10121&v ersion=13807

©WebAgeSolutions.com 41 Practical Open Source SOA

Messaging Apache ActiveMQ

 A message broker written in Java  Provides support for:  JMS 1.1 clients  AMQP, Stomp and OpenWire protocols  Other (non-JMS) clients: C, C++, C#, Ruby, Perl, Python, et al.  Reliable (persistent) messaging  CXF and Axis2 based endpoints for messaging  Built-in clustering  High performance journaling for message recovery  Includes JCA 1.5 resource adaptors for inbound & outbound messaging ready for an JEE container  Full support for the Enterprise Integration Patterns both in the JMS client and the Message Broker ©WebAgeSolutions.com 43

Apache ActiveMQ: Mapping REST to JMS

 ActiveMQ uses a Servlet that takes care of the integration between HTTP endpoint and the ActiveMQ dispatcher  Use an HTTP POST to publish a message E.g. a POST to http://www.acme.com/queue/orders/input would publish the contents of the HTTP POST request to the orders.input queue on JMS  Use an HTTP GET or DELETE to consume a message  Note: See if the throughput is acceptable

©WebAgeSolutions.com 44 RabbitMQ

 A messaging broker (accepts and forwards messages)  Written in Erlang designed by Ericsson for telecom use cases  Supports distributed, fault-tolerant, multi-platform, real- time, non-stop applications and hot swapping (code can be changed without stopping a system)  Clustering out-of-the-box  Open source (commercial support and consulting services available)  Implements wire-level AMQP messaging protocol  Flexible exchange-binding-queue model  Owned by VMWare

©WebAgeSolutions.com 45 Practical Open Source SOA

Business Process Management Activiti

 Light-weight workflow and Business Process Management (BPM) Platform (process engine) written in Java  Supports BPMN 2.0  Distributed under the Apache 2.0 license to encourage widespread usage and adoption of the Activiti BPM engine and BPMN 2.0  Activiti runs in any Java application, on a server, on a cluster or in the cloud  Integrates with Spring  Core people behind Activiti were key developers of RedHat JBoss’s jBPM product (versions 1 through 4) who left RedHat to continue with the roadmap that they had envisioned for commoditizing BPM technology and they use the expertise and insights obtained while developing jBPM for building Acitiviti 5

©WebAgeSolutions.com 47 Activiti Studio Snapshots

©WebAgeSolutions.com 48 Practical Open Source SOA

Our Offerings Open Source SOA offerings

 WA2229 Open Source SOA (2 days)

©WebAgeSolutions.com 50 Summary

In this webinar, we: Reviewed some of the open source projects that can be used to build SOA- based solutions

©WebAgeSolutions.com 51