apache servicemix4 : dream platform for java integration

24
right © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 1 A Progress Software Company A Progress Software Company FUSE ESB – ServiceMix 4 Dream platform for Java Integration FUSE Community Day, Paris, 14 th October 2010 Charles Moulliard Sr. Principal Solution Architect Apache Committer

Upload: charles-moulliard

Post on 27-Jan-2015

2.858 views

Category:

Education


0 download

DESCRIPTION

Apache ServiceMix4 : Dream platform for Java Integration !

TRANSCRIPT

Page 1: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 1 A Progress Software Company

A Progress Software Company

FUSE ESB – ServiceMix 4

Dream platform for Java Integration

FUSE Community Day,

Paris, 14th October 2010

Charles MoulliardSr. Principal Solution ArchitectApache Committer

Page 2: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 2 A Progress Software Company

Agenda

Presentation of the Fuse ESB technologies Platform unmasked Concepts Standards

Architecture design Messaging OSGI service Messaging + OSGI services Web

High availability and distributed applications Real example

Q/A

Page 3: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 3 A Progress Software Company

Fuse ESB –Technologies

“Open the ServiceMix box to discover it ?”

Page 4: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 4 A Progress Software Company

Fuse ESB - Unmasked

<<jvm>>:ServiceMix4

Java Boot (Register as service - Wrapper)

Lightweight container (Apache Karaf)

OSGI Kernel (Apache Felix / Eclipse Equinox)

Container Container Container Container Container Container

Page 5: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 5 A Progress Software Company

Fuse ESB – Conceptual Architecture

Containers for Integration, Web, Java and SOA.• Java Application

• Web Applications

• SOAP/REST web services

• Business processes

• Routing - EIP

• Messaging

• Server (FTP, SMTP, LDAP,…)

<<jvm>>:ServiceMix4

EIPWeb

ServicesRESTfulServices

BusinessProcesses

Messaging

JavaApplication

WebApplications

Java Business

IntegrationServers

Page 6: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 6 A Progress Software Company

<<jvm>>:ServiceMix4

EIPWeb

ServicesRESTfulServices

BusinessProcesses

Messaging

JavaApplication

WebApplications

Java Business

IntegrationServers

Fuse ESB - conceptual architecture (cont’)

Provides a uniform approach for common cross-functional concerns• Logging

• Lifecycle and deployment

• Configuration

• Versioning & Dependency Mgmt

• Instances Management

• Security

• Transactions

Logging Lifecycle /Deployment Configuration

Versioning Management Security

Page 7: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 7 A Progress Software Company

Fuse ESB - Standards and Technologies

<<jvm>>:ServiceMix4

Logging Lifecycle /Deployment Configuration

Versioning Management Security

Apache Camel, servicemix-eip

BPEL (Apache ODE)

WSDL, SOAP, XML, XSD, JAX-WS, JAX-RS, (Apache CXF)

Java, JVM-based languages, Spring

JMS(Apache ActiveMQ)

OSGi Config Admin

Log4J, slf4J, commons, Java logging

OSGiJAAS

JMX, web-console, ssh

EIPWeb

ServicesRESTfulServices

BusinessProcesses

Reliable Messaging

JavaApplication

WebApplications

Java Business

IntegrationJBI, NMR

JSF, JSP, Struts,Wicket

Page 8: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 8 A Progress Software Company

Fuse ESB – Architectures design

« What a beautiful world ! »

Page 9: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 9 A Progress Software Company

<<jvm>>:ServiceMix4

BUSBUS

Fuse ESB – “Messaging” Architecture

The bus (camel, jms, nmr) orchestrates exchange of messages through different endpoints

The exchanges can be of type (InOnly, InOut) and processed in a Sync/Async / Transaction way

FTP

Route Service (Java/Spring)

JAX-WS

Page 10: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 10 A Progress Software Company

<<jvm>>:ServiceMix4

OSGI & ServicesOSGI & Services

Fuse ESB – “OSGI” Architecture

This model is oriented for deployment of Java application where we use Spring or Blueprint to configure « services »

The part of OSGI EE covering (JPA, Transaction, JNDI, …) will help the design of such architecture

Modules can be designed according to « decoupage » technical or business

DAOOrdering Service

Java, JPAJava / Spring / Hibernate

Page 11: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 11 A Progress Software Company

<<jvm>>:ServiceMix4

Fuse ESB – “Messaging + OSGI” Architecture

BUSBUS

FTP JAX-WS

Java, JPA

OSGI & Services OSGI & Services

Java / Spring / Hibernate

Ordering ServiceDAO

Camel routes allow you to link POJOS together using camel-bean, Spring DM or Blueprint, …

Camel Route

from(ftp).validate().to(bean:orderOsgi)

from(cxf:bean:orderWS).validate().to(bean:orderOsgi)

Page 12: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 12 A Progress Software Company

<<jvm>>:ServiceMix4

Fuse ESB – “Web” Architecture

OSGI & Services OSGI & Services

Java / Spring / Hibernate

Java, JPA

Ordering ServiceDAO

Web projects can be deployed as WAR bundles

They could only contain HTML artifacts (hml, gif, css, js, … files)

They have access to business modules using OSGI service

Web Application

Html, gif, jpeg, css, js files

Page 13: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 13 A Progress Software Company

Fuse ESB – Bundle border

OSGi with bundles offer modularity but … create « limitation » in camel routes

Camel ‘direct://’ component can only be used within camel routes packaged in the same ‘camel context’ in the same bundle.

<<jvm>>:ServiceMix4

BUSBUS

Camel - FTP

from(ftp).to(direct://order)

from(direct://order).bean://order?method=place

Camel-cxf

Bundle Bundle

Page 14: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 14 A Progress Software Company

Fuse ESB – Bundle border (con’t)

Camel ‘vm://’ component overcomes this limitation because it works within the JVM context

This offers much flexibility for project packaging

Is it enough ?

<<jvm>>:ServiceMix4

BUSBUS

Camel - FTP

from(ftp).to(vm://order)

from(vm://order).bean://order?method=place

Camel-cxf

Bundle A Bundle B

Page 15: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 15 A Progress Software Company

<<jvm>>:ServiceMix4 : Nestor

Fuse ESB – JVM border

When more cpu, memory are required, we need more than one JVM - Server

This is where ActiveMQ save us and bridge our jvm, servers

<<jvm>>:ServiceMix4 : Toto

BUSBUS

Camel - FTP

from(ftp).to(amq:queue:order)

from(amq:queue:order).bean://order?method=place

Bundle A Bundle B

BUSBUS

Camel - ActiveMq

ActiveMQActiveMQ

Page 16: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 16 A Progress Software Company

ServiceMix and ActiveMQ

« The perfect matchfor high-available solutions and distributed

applications »

Page 17: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 17 A Progress Software Company

ActiveMQ replication, clustering & failover

<<jvm>>samwise:ActiveMQ

<<jvm>>samwise:ActiveMQ

Master state replicated to slave using network connector.

Master state replicated to slave using network connector.

<<jvm>>frodo:ActiveMQ

<<jvm>>frodo:ActiveMQ

<<jvm>>samwise:ActiveMQ

<<jvm>>samwise:ActiveMQ

Brokers compete for file system or database lock.

Brokers compete for file system or database lock.

<<jvm>>frodo:ActiveMQ

<<jvm>>frodo:ActiveMQ

Broker replication Shared message store

Page 18: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 18 A Progress Software Company

Server 2Server 1

Master

Networks of master-slave pairs

A clustered, highly available approach with 2 machines

Slave

<<jvm>>Frodo:ActiveMq

<<jvm>>Frodo:ActiveMq

<<jvm>>Frodo:ActiveMq

<<jvm>>Frodo:ActiveMq

NetworkOf

Brokers

Page 19: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 19 A Progress Software Company

… the thing is, it’s largely the same scaling model in ServiceMix

« Simplicity is the best »

Page 20: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 20 A Progress Software Company

Master

Fuse ESB : networks of master-slave pairs

Differs from AMQ only in that slaves can be ‘partially active’

<<jvm>>frodo:SMX4

<<jvm>>frodo:SMX4

<<jvm>>gandalf:SMX4

<<jvm>>gandalf:SMX4

<<jvm>>saruman:SMX4

<<jvm>>saruman:SMX4

<<jvm>>samwise:SMX4

<<jvm>>samwise:SMX4

Slave

Page 21: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 21 A Progress Software Company

Master

Fuse ESB : embedded brokers

Embedded brokers speed up in-VM traffic

<<jvm>>frodo:SMX4

<<jvm>>frodo:SMX4

<<jvm>>gandalf:SMX4

<<jvm>>gandalf:SMX4

<<jvm>>saruman: SMX4

<<jvm>>saruman: SMX4

<<jvm>>samwise: SMX4

<<jvm>>samwise: SMX4

Slave

ActiveMqActiveMq ActiveMqActiveMq

ActiveMqActiveMq ActiveMqActiveMq

Page 22: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 22 A Progress Software Company

Breaking out the broker

Broker ‘meta-traffic’ will increase as more brokers are added.

If you have many SMX instances, then it might be more sensible to deploy your AMQ infrastructure separately

Master

<<jvm>>merry: SMX4

<<jvm>>merry: SMX4

<<jvm>>frodo:SMX4

<<jvm>>frodo:SMX4

<<jvm>>gandalf:SMX4

<<jvm>>gandalf:SMX4

<<jvm>>saruman:

SMX4

<<jvm>>saruman:

SMX4

<<jvm>>samwise:

SMX4

<<jvm>>samwise:

SMX4

<<jvm>>pip: SMX4<<jvm>>

pip: SMX4

Slave

<<jvm>>master:AMQ

<<jvm>>master:AMQ

<<jvm>>slave: AMQ<<jvm>>

slave: AMQ

Page 23: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 23 A Progress Software Company

Slave

23

Fuse ESB – All Together

Regional Office

Headquarter

queue:orderqueue:orderBUSBUS

Camel - FTP

from(amq:queue:order).bean://order

BUSBUS

bean://order

queue:orderqueue:order

Master

queue:orderqueue:orderBUSBUS

SMX4 - Master

SMX4 - Slave

queue:orderqueue:order

from(ftp).to(amq:queue:order)

Regional Office

Camel - WS

BUSBUSqueue:orderqueue:order

from(ftp).to(amq:queue:order)

from(amq:queue:order).bean://order

bean://order

Page 24: Apache ServiceMix4 : Dream platform for Java Integration

Copyright © 2010 Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved. 24 A Progress Software Company

Questions ?

More info http://fusesource.com/products/

Follow me

Twitter : http://twitter.com/cmoulliard

LinkedIn : http://www.linkedin.com/in/charlesmoulliard

My blog : http://cmoulliard.blogspot.com