Você está na página 1de 28

Apache ServiceMix 4

FUSE Community Day London, 10th June 2010

Adrian Trenaman Distinguished Consultant Financial Services Group, Progress Professional Services trenaman@progress.com http://trenaman.blogspot.com Progress Education

Agenda
A little bit about what ServiceMix 4 really is
Conceptual architecture Standards and technologies Deployment and scaling Experience on the road

How you can be successful with ServiceMix 4


As architects As developers As project managers

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

ServiceMix 4 - architecture, standards & technologies

2010 Progress Software Corporation. All rights reserved.

SOA Fundamentals

Apache ServiceMix 4 - conceptual architecture


JVM-based runtime container for integration and SOA.
EIP-style integration flows SOAP web services REST web services Business processes Reliable messaging Business Logic
Integration Flows Business Processes

<<jvm>> :ServiceMix4 Web Services Reliable Messaging RESTful Services Business Logic

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Apache ServiceMix 4 - conceptual architecture (cont)


ServiceMix provides a uniform approach for common crossfunctional concerns
Logging Lifecycle and deployment Configuration Versioning & Dependency Mgmt Management Security Transactions
Integration Flows Business Processes <<jvm>> :ServiceMix4 Web Services Reliable Messaging RESTful Services Business Logic

Logging

Lifecycle / Deployment

Configuration

Versioning

Management

Security

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Apache ServiceMix 4 - standards and technologies

<<jvm>> :ServiceMix4

EIP (Apache Camel) or JBI (ServiceMix 3)

Integration Flows Business Processes

Web Services Reliable Messaging

RESTful Services Business Logic

WSDL, SOAP, XML, XSD, JAXWS, JSON, (Apache CXF) Java, JVM-based languages JMS (Apache ActiveMQ) OSGi Config Admin SSH, JAAS, HTTPS, TLS,

BPEL (Apache ODE)

Log4J, Slf4J, commons, Java logging, OSGi

Logging

Lifecycle / Deployment

Configuration

Versioning

Management

Security

JMX, web-console, ssh


6
2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Modular deployment with bundles and features


You can deploy almost anything into ServiceMix 4
War, Jar, bundle, spring,

<<jvm>> :ServiceMix4

Prefer OSGi bundles for your routing / integration / business logic


More modular design, explicit versioning, classpath control. Can share classes or objects (OSGi services) Dynamic wiring of OSGi services allows live hot deployment of patches without impacting your production deployment.

smx:> features:addUrl file:my-features.xml smx:> features:install f1

f1 a:bundle

f2 c:bundle b:bundle

common
my-features.xml

Use the feature mechanism to group and co-deploy bundles.


7
2010 Progress Software Corporation. All rights reserved.

x:bundle y:bundle

Apache ServiceMix 4 - FUSE Community Days

Getting into production


Deployment from Maven repository is ideal
but remember, admins dont like running internet-happy developer tools like Maven in production! Be prepared to deliver artifacts via .zip or .tar.gz - there are features-based Maven plugins to help!

SYSTEST

UAT

PROD

DEV

Maven

.tar.gz

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Scaling up, scaling out to understand ServiceMix, first you must understand ActiveMQ

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

ActiveMQ: networked brokers


Brokers use network connectors to share consumer information and make routing decisions using store-andforward
JMS clients use failover URLs or auto-discovery to connect to a live broker.
p:Producer <<jvm>> frodo:ActiveMQ Foo: m 1: Producer sends a message m to the broker. c1:Consumer
10
2010 Progress Software Corporation. All rights reserved.

<<jvm>> gandalf:ActiveMQ Foo: m 2: Broker frodo decides to route message via broker gandalf. m 3: message is delivered.

c2:Consumer

Apache ServiceMix 4 - FUSE Community Days

Aside: networked brokers allow you to create local broker clusters and implement wide-scale crossgeography architectures.

11

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

ActiveMQ replication, clustering & failover


Broker replication Shared message store

<<jvm>> frodo:ActiveMQ

<<jvm>> frodo:ActiveMQ

Master state replicated to slave using network connector.

Brokers compete for file system or database lock.

<<jvm>> samwise:ActiveMQ

<<jvm>> samwise:ActiveMQ

12

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Networks of master-slave pairs


A clustered, highly available approach
<<jvm>> frodo:ActiveMQ <<jvm>> gandalf:ActiveMQ <<jvm>> merry:ActiveMQ

Master Slave

<<jvm>> samwise:ActiveMQ

<<jvm>> saruman:ActiveMQ

<<jvm>> pip:ActiveMQ

13

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

the thing is, its largely the same scaling model in ServiceMix

14

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

ServiceMix 4: networks of master-slave pairs


Differs from AMQ only in that slaves can be partially active
<<jvm>> frodo:SMX4 <<jvm>> gandalf:SMX4 <<jvm>> merry: SMX4

Master Slave

<<jvm>> samwise: SMX4

<<jvm>> saruman: SMX4

<<jvm>> pip: SMX4

15

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

ServiceMix 4: embedded brokers


Embedded brokers speed up in-VM traffic, and facilitate location transparency via a messaging fabric
<<jvm>> frodo:SMX4 <<jvm>> gandalf:SMX4 <<jvm>> merry: SMX4

ActiveMQ
Master Slave

ActiveMQ

ActiveMQ

<<jvm>> samwise: SMX4

<<jvm>> saruman: SMX4

<<jvm>> pip: SMX4

ActiveMQ

ActiveMQ

ActiveMQ

16

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

The unbearable chattiness of brokers or too many brokers spoiled the pot

17

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Breaking out the broker


Broker meta-traffic will increase as more brokers are added.
Sharing info on what consumers are listening to what destinations.

If you have many SMX instances, then it might be more sensible to deploy your AMQ infrastructure separately.
This also keeps things conceptually simple. We like simple.

<<jvm>> master:AMQ

<<jvm>> slave: AMQ

<<jvm>> frodo:SMX4

<<jvm>> gandalf:SMX4

<<jvm>> merry: SMX4

Master Slave

<<jvm>> samwise: SMX4

<<jvm>> saruman: SMX4

<<jvm>> pip: SMX4

18

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Respecting and supporting our JBI heritage

19

2010 Progress Software Corporation. All rights reserved.

SOA Fundamentals

JBI - fundamentals

<<jvm>> :SMX <<component>> :FTP <<component>> :EIP

ServiceMix acts as a container for components, communicating with each other using the XML-based Normalized Message Router.

NMR <<component>> :JMS <<component>> :SAXON Use well-known components like JMS, HTTP, CXF, Bean, FTP, FILE, or write your own.

20

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

JBI fundamentals (cont)

<<jvm>> :SMX <<component>> :FTP <<component>> :EIP

Build an application by configuring and wiring endpoints as SUs, combining them into SAs that can be deployed atomically.

:Poller

:Pipeline

NMR <<component>> :JMS <<component>> :SAXON Endpoints are configured using xbean (Spring) configuration; deployment artifacts are created using maven plugins.

:Producer

:Transformer

21

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

JBI fundamentals: packaging


<<jar>> <<zip>> <<zip>>

Each component is specialized using a SU. In ServiceMix, the endpoint(s) are defined in an xbean.xml file. Maven plugins are used to generate jbi.xml file SUs can optionally contain support classes and resources such as WSDL & XSD SUs are bundled together into an SA to be deployed atomically.

jbi.xml

xbean.xml

jbi.xml

xbean.xml

.class ftp-input-su

resources

.class eip-su

resources

<<zip>>

<<zip>>

jbi.xml

xbean.xml

jbi.xml

xbean.xml

.class resources jms-output-su


22
2010 Progress Software Corporation. All rights reserved.

.class resources xslt-transformer-su


Apache ServiceMix 4 - FUSE Community Days

JBI support in ServiceMix 4


Full support for JBI 1.0 Use JBI without the packaging!
Spring + JBI components.
:FilePoller NMR

<<jvm>> :SMX

Use NMR without canonical XML payload Use Interceptors to monitor endpoints and message exchanges. New clustering architecture:
Clustered consumers write to NMR which uses a single JMS queue. Providers listen on queue using message selectors ActiveMQ network connectors provide location transparency.
23
2010 Progress Software Corporation. All rights reserved.

<<jvm>> :SMX NMR

:JMSProvider

Apache ServiceMix 4 - FUSE Community Days

Where we are today

24

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

What is the community up to?

Better documentation - the ServiceMix book Building on OSGi Blueprints technology Supporting Apache Ode Scalability, performance, feature build-out

25

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Adopting ServiceMix 4
Java, Maven, Spring - if you dont have these skills, be prepared to get them. Invest in technical steering - dont go in the wrong direction Nominate FUSE expert(s) on your team - then let them spread the love. Know yourself - If youe not source-friendly, then get professional help. In the source, there is truth - dont be afraid of the truth.

26

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Words from a battle-hardened consultant


Dont confuse enterprise integration with workflow or BPM
Use the right tool for the job at hand.

Respect the {n|cr}appy path above the happy path. Validate performance early, and keep validating it. Prefer Camel; use JBI as an integration point. Never forget your customer. Give them visibility and control.
Thing about management early.

27

2010 Progress Software Corporation. All rights reserved.

Apache ServiceMix 4 - FUSE Community Days

Apache ServiceMix 4
FUSE Community Day London, 10th June 2010

Adrian Trenaman Distinguished Consultant Financial Services Group, Progress Professional Services trenaman@progress.com http://trenaman.blogspot.com Progress Education

Você também pode gostar