22
1 Developing with an Enterprise Service Bus Brian Cochran & Eric Stevens

Developing with an Enterprise Service Bus

  • Upload
    zubin67

  • View
    730

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Developing with an Enterprise Service Bus

1

Developing with an Enterprise Service Bus

Brian Cochran & Eric Stevens

Page 2: Developing with an Enterprise Service Bus

2

Who We Are

• Own and Operate Architecture Consulting Company specializing in ESB technology and implementations.

• Working on an ESB implementation in the utility industry for last 18 months.

• Expertise in extremely high volume transactional environments. Making use of ESB as a Grid enabler.

• Background in architecting financial service and insurance solutions for Fortune 1000.

• Primarily open source centric.

Page 3: Developing with an Enterprise Service Bus

3

Outline

• What is an ESB?• Where and why should you use one?• What tools should you use?• What do you need to do (a look at

the popular Loan Broker example)?• What are the “gotchas”?• Who is using this stuff?

Page 4: Developing with an Enterprise Service Bus

4

Software Agility

Agility

Green Field Customizations Renovation Roadmap

Page 5: Developing with an Enterprise Service Bus

5

SOA Background

What is a Service Oriented Architecture?– Loosely Coupled Business Services– Cross Platform– Distributed Environment

Quoting

Data Tier

App S

ubmission

Credit Inquiry

Not JustBusiness Tier

Presentation Tier

Page 6: Developing with an Enterprise Service Bus

6

Defining ESB

• A Framework that helps in implementing Service Oriented Architectures– Can be used for other things– SOA does not require an ESB

• Provides framework for– Messaging– Transformation– Routing– Orchestration

JCredit

NQ

uoteJ2Q

uote

NR

ate

Page 7: Developing with an Enterprise Service Bus

7

Applications of an ESB

• Rapid Integration of different systems

• Reuse of existing applications• Parallel Grid based Applications• To force decoupling of

components• Build Asynchronous Applications

Page 8: Developing with an Enterprise Service Bus

8

Lending Twig Loan Broker(adapted from the EIP book)

I need a simple loan quoting site for Bank Fred ASAP!

Yeah right, you’ve never doneanything simple in your life.

Page 9: Developing with an Enterprise Service Bus

9

Lending Twig Loan Broker

public class LoanBrokerImpl implements LoanBroker { // injected dependencies CreditAgencyService creditAgency = null; BankServiceFacade bankFacade = null;  // service method pulic LoanQuote createQuote(QuoteRequest req){

 CreditReport cr =creditAgency.createCreditReport(req.getSSN());

 LoanQuote lq = bankFacade.createQuote(req.getSSN(),req.getAmount(),cr);

  return lq;

}}

SpringHibernate

StrutsJSF

Page 10: Developing with an Enterprise Service Bus

10

Service Enabling Lending Twig

Our partner wants to call our software as aWeb Service and is talking about SOA things. Do we do that?

I can see where this is going.Everyone is going to want to communicate with our software in different ways and use itin ways we never intended.

Page 11: Developing with an Enterprise Service Bus

11

Finding an ESB

Well I certainly don’t want to expose theIntegration technology to my POJOs. And I’m bettingThat WS isn’t going to be the only way people try tointegrate with this stuff. Let me look at using an ESB.

Mule

Service Mix

Cape Clear

Celtix

TIBCO

Page 12: Developing with an Enterprise Service Bus

12

Mule ESB

• Light Weight and Embeddable• Supports POJO Components• Based on “Enterprise Integration

Patterns”• Support for over 20 different protocols• Support for Pluggable Component

Containers (Spring, JNDI, Hivemind, etc.)• Highly scalable (SEDA and Distributed

Messaging)

Page 13: Developing with an Enterprise Service Bus

13

Some Mule Supported Technologies

TcpHttpVMSSLSystem StreamJdbcAxisAS400 Data QueueFtpGlueSpaceGigaSpacesXMPP

FileUdpMulticastJmsRmiEjbEmailResource AdapterSoapOracle AQQuartzXfire

JBISpring ExtensionsPico ExtensionsPlexus ExtensionsHiveMind ExtensionsJotm SupportAcegi SecurityPGP Security

Page 14: Developing with an Enterprise Service Bus

14

Exposing Services

public class LoanBrokerImpl implements LoanBroker {

public LoanQuote createQuote( QuoteRequest req)

{…}}

<bean

id=“loanBroker”

class=“LoanBroker” />

<!–- descriptor -->

<mule-descriptor name=“loanBroker“

implementation=“loanBroker">

<inbound-router>

<endpoint address=“axis:http://host/loanBroker” />

<endpoint

address=“vm://vmLoanBroker” />

</inbound-router>

</mule-descriptor>

LoanBroker.java

spring-context.xml

mule-config.xml

Page 15: Developing with an Enterprise Service Bus

15

Mule Architecture Guide(from mule.codehaus.org)

Endpoints

Component

Page 16: Developing with an Enterprise Service Bus

16

Multiple ServicesWe want support four new banks in our system and offer the consumer the best rate. But:•Not all of them have web services, some use JMS, some use EJBs.•Not all banks write all loans, so we acquired SmartLender Rule Base,

a .NET service that will help us figure out which banks will offer on which loan requests.

Sounding like an Accidental Architecture. Some issues are:•We don’t want a bunch of logic in our

existing LoanBroker based on which Bank?•How are we going to get the response back to the user

in any sort of reasonable time?

Page 17: Developing with an Enterprise Service Bus

17

Loan Broker(from EIP book)

Page 18: Developing with an Enterprise Service Bus

18

Lessons Learned

• Concentrate on Interface Definition over Component Design (its hard).

• Configuration explosion is easy (you must standardize).

• Immature Development model can make things difficult (asynchronous, routers, transformers, etc.).

• State management makes it difficult to be truly service oriented.

• Use iterative, test driven development.• Get high level buy in

Page 19: Developing with an Enterprise Service Bus

19

Who’s using this stuff?

Mule:• HP

• Sony

• Deutche Bank

• CitiBank

Page 20: Developing with an Enterprise Service Bus

20

Other Real World Application

Used network concepts of an ESB to build data collection system over millions of embedded devices.

• Handle Proprietary Network Protocols using transformers and driver services

• Facilitate parallel processing over large amounts of data using ESB patterns.

• Integrate with external ERP and network management systems to manage the installation and maintenance of installed devices.

Page 21: Developing with an Enterprise Service Bus

21

More Information

• mule.codehaus.org – Mule Web Site

• Enterprise Integration Patterns – Gregor Hohpe, Bobby Woolf

• http://www.atlantacs.com/• Atlanta CS – [email protected]

Page 22: Developing with an Enterprise Service Bus

22

Questions?