350 likes | 481 Views
Managing Chaos. Building an Open Source Enterprise Service Bus from Scratch Jeff Genender. Introduction. Jeff Genender. Are you experienced?. What is an ESB?. Collection of Best Practices for Data Integration. Characteristics Of An ESB. Standards Based Highly Distributed
E N D
Managing Chaos • Building an Open Source Enterprise Service Bus from Scratch • Jeff Genender
Introduction • Jeff Genender
What is an ESB? • Collection of Best Practices for Data Integration
Characteristics Of An ESB • Standards Based • Highly Distributed • Data Transformation • Event Driven Service Oriented Architecture • Workflow • Secure and Reliable • Remote Management • Provides Operational Awareness • Incremental Adoption
Process B Process C BAD DATA FAIL Inability To Verify Execution Process A Where Did The Failure Occur? A, B, or C?
What Is The Solution? • Centralized Management Of Activities • Powerful Scheduler • Guaranteed Event and Activity Execution • Durable Transactions • Pluggable Enterprise Service Bus Components For Activities • Staging Database For Single Common Data Location • Logging and Notification Of Activities • Proactive Response To Failed Activities • J2EE Architecture Provides For True 24/7 clustering uptime. ESB
Why Is Workflow Important? • Downstream Dependencies • Escalation path based on success or failure • Automatic retry for failure if defined Activity A Activity B Activity C Success Success Failure
Workflow Within an ESB Itinerary Content Orchestration
Orchestration <process-definition name="Retrieve Weather Data"> <!-- START-STATE --> <start-state name="start"> <transition to="retrieve vendor1 data"> <action> <delegation class="workflow.LogJobStartActionHandler"/> </action> </transition> </start-state> <!-- NODES --> <state name="retrieve vendor1 data"> <action> <delegation class="workflow.LaunchActivityActionHandler">vendor1Activity</delegation> </action> <transition name="success" to="retrieve vendor2 data"/> <transition name="fail" to="end"> <action> <delegation class="workflow.LogJobEndActionHandler">FAILURE</delegation> </action> </transition> </state> ... <!-- SNIP VENDOR 2 DATA --> ... <!-- END-STATE --> <end-state name="end" /> </process-definition>
ESB: Data Transformation • Conversion of data formats from one application to another • Dependent upon message itineraries or process flow definitions
Spring Transformer Wiring <bean id="weathereyeActivity" singleton="false" class="com.foo.transformer.earthsat.launch.WeathereyeActivity"> <property name="transformers"> <list> <ref bean="weathereyeLakeBentonFcTransformer"/> <ref bean="weathereyeEauclaireFcTransformer"/> </list> </property> </bean> <bean id="weathereyeLakeBentonFcTransformer" singleton="false" class="com.foo.transformer.earthsat.WeathereyeTransformer"> <property name="weatherVendorLocationDao"><ref bean="WeatherVendorLocationDao"/></property> <property name="weatherVendorDao"><ref bean="WeatherVendorDao"/></property> <property name="dataRetriever"><ref bean="weathereyeLakeBentonFcRetriever"/></property> <property name="dataProvider"><ref bean="theWeatherProvider"/></property> </bean> <bean id="weathereyeLakeBentonFcRetriever" singleton="false" class="com.foo.transformer.earthsat.retriever.WeatherEyeRetriever"> <property name="weatherLocation"><value>LakeBenton</value></property> <property name="actOrFcstCd"><value>F</value></property> </bean> <bean id="theWeatherProvider" singleton="false" class="com.foo.transformer.provider.WeatherProvider"> <property name="weatherDao"><ref bean="WeatherDao"/></property> </bean>
XDoclet for MDB <SNIP> * @ejb.bean * name="WeathereyeActivity" * type="MDB" * destination-type="javax.jms.Topic" * subscription-durability="Durable" * message-selector="ACTIVITY='weathereyeActivity'" * acknowledge-mode="Auto-acknowledge" * transaction-type="Container" * * ### Note: only use this markup if you want singleton MDB's. ### * @jboss.container-configuration * name="Singleton Message Driven Bean" * * @ejb.transaction * type="Required" * * @jboss.destination-jndi-name * name="topic/ActivityTopic" * * @jboss.subscriber * name="system" * password="manager" * client-id="weathereyeActivityID" * subscription-id="weathereyeActivitySubID" <SNIP>
Common Staging • Central Location for Common Data Types • Single Location for Load Data • Single Location and Format for Weather Data • Data is Accessible From Any Outside System EMS 1 EMS 2 EMS 3 Oracle Weather1 Weather 2
Tools/APIs • What did we use?
Development Lessons Learned • Technical • Business
Questions • (and hopefully answers)