30
Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc.

Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Embed Size (px)

Citation preview

Page 1: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Enterprise Integration with ColdFusion

Sean A Corfield

Director of Architecture

Macromedia, Inc.

Page 2: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Goals

Explain some of the history behind Macromedia's use of ColdFusion, both on the web and behind it

Show you how Macromedia is using ColdFusion “behind the web” for integration tasks

Inspire you to think outside the “web box” and look for new problems to solve with ColdFusion MX 7

Page 3: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Who Am I?

Senior Architect for Macromedia IT (since mid-2000)

A ColdFusion developer (since late-2001) ...and Java developer (since early-1997)

An advocate of standards and best practices (since birth?)

Page 4: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Agenda

Setting the scene – a brief history of macromedia.com

A look at our Online Store architecture Introducing Oracle Applications (ERP) Additional systems join our Hub'n'Spoke world Evolving our Online Store architecture Upcoming changes and future plans Wrap-up

Page 5: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

macromedia.com BC

Before ColdFusion...

macromedia.com was built with BroadVision and Perl

We created flat files full of CSV data and ran batch jobs to move those files around and load them into databases

Page 6: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

macromedia.com BC

Page 7: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

2001 A ColdFusion Odyssey

Macromedia acquired Allaire I formed Web Technology Group to rewrite

macromedia.com using ColdFusion ColdFusion 5 was the (new) current release We learned ColdFusion on Neo using pre-alpha

builds and then alphas and betas – it was “fun”... We also picked JMS (Java Message Service)

and XML as core technologies for data transfer between the website and the various back end systems, using Java “adapters”

Page 8: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

macromedia.com – CFMX 6.0 U3

macromedia.com launched in early March 2003 on ColdFusion MX 6.0 Updater 3

About a dozen ColdFusion applications BroadVision still powered our Online Stores Perl still powered many of the simple information

forms Later that year we launched the Flash /

ColdFusion Online Stores for Europe with BroadVision for non-Flash users

Page 9: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

macromedia.com – CFMX 6.0 U3

Page 10: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

macromedia.com – CFMX 6.1

We were running Red Sky just before launch (August 2003)

We adopted Mach II as the Web Team standard (2004)

We continued to write more applications (currently around 50 applications, a quarter are Mach II apps)

We launched HTML versions of our Online Stores and rolled them out worldwide (2003-2004)

BroadVision was finally gone Some Perl forms remain (it ain't broke!)

Page 11: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

macromedia.com – CFMX 6.1

Page 12: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Online Store Architecture I

Tiered application architecture:• Front end has both Flash & HTML versions

• Business logic implemented with ColdFusion (using the same CFCs, and Mach II for HTML version)

• Back end used Perl scripts to manage fulfilment and settlement functionality

CSV (tab-delimited) files moved by FTP to ERP system

Page 13: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Online Store Architecture I

Page 14: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

ERP – Oracle Applications

Rolled out new ERP system (March 2004) Used OAGIS 7.2.1 standard XML for order

management file exchanges (instead of CSV) Still FTP based batch jobs (since everything is

file-based) Some vendors (including OLS) still provided CSV ColdFusion application written to manage all the

XML and CSV file exchanges and automate the FTP processes

Page 15: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

ERP – Oracle Applications

Page 16: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Breeze Live Online Sales

2004 also saw Breeze Live become available for purchase online as well as hosted solution

Decided to leverage JMS rather than Online Store method

Sales orders transmitted as XML over JMS in near real time

Developed JMS event gateway for ColdFusion MX 7

Uses exactly the same order processing CFC as batch files

Page 17: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Breeze Live Online Sales

Page 18: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

salesforce.com (late 2004)

Implemented sf.com for sales leads Web site captures leads, publishes them

using JMS Web Service adapters (.NET) exchange data

with sf.com JMS used to exchange data between

adapters and other systems: web site, support, marketing, analytics

Page 19: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

salesforce.com (spring 2005)

We rewrote all of the .NET adapters in ColdFusion (.NET libraries from the JMS vendor were unreliable)• Rough guesstimate: building adapters in CF is

between four and eight times easier than either Java or .NET based on development times (Java and .NET are about par)

Leverage the CFMX 7 JMS event gateway Leverage improved web service support in

CFMX 7

Page 20: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Internal Order Management

Several internal applications also capture manual orders

Already written in ColdFusion Generated orders as CSV files

Rewrote file generation custom tag to produce XML

Could easily change to use JMS now!

Page 21: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Online Store Architecture II

Replace Perl back end• Use same engine as Breeze Live Online

Sales

• Send all orders as XML over JMS

ERP ColdFusion application does not change!

Page 22: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

OLS Architecture II – Web Side

Page 23: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

OLS Architecture II – ERP Side

Page 24: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

New Order Management

Real time communication between OLS and ERP• Sales orders

• Order status

• Ship confirmation Inside Oracle we publish data in real time

• On triggers / workflow events, we publish recordsets as XML to Oracle AQ queues

• Oracle AQ event gateway (Java) consumes and republishes to JMS using JMS event gateway

Page 25: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

New Order Management (cont)

Large attachments processed in the background• Sends URL to async CFML gateway

• Async task fetches document and stores in Oracle Real time communication between ERP & CRM

• Customer details & entitlements published to a single Oracle queue as XML rowsets

• Oracle AQ event gateway consumes, reformats and publishes to two separate JMS topics

• JMS event gateway consumes , parses and stores customer details & entitlements in CRM

Page 26: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

The Big Picture

Page 27: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Future Plans

Over time, replace complex custom Java adapters with CFMX 7 JMS event gateways

Consider replacing scheduled tasks that scan directories for files with the built-in CFMX 7 DirectoryWatcher

Enhanced JMS event gateway – supports authentication, per-topic cached publishers, additional “initial context properties”

Page 28: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Conclusion

XML provides a human-readable, self-validating, structured format for complex data – and it's easy to process in CF!• XML beats CSV hands down (duh!)

JMS has reduced latency in data processing and improved the reliability of data transfers within the enterprise

A hub'n'spoke architecture makes it easier to add and replace systems without re-engineering everything else

Page 29: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Conclusion (continued)

Building JMS-based applications can be a complex, time-consuming process (and unreliable on .NET!)

ColdFusion MX 7's event gateways make it easy to build maintainable, robust asynchronous applications• JMS publish & subscribe

• Oracle AQ receive

• DirectoryWatcher

• Asynchronous CFML

Page 30: Enterprise Integration with ColdFusion Sean A Corfield Director of Architecture Macromedia, Inc

Questions & Answers?

Sean A Corfield

Director of Architecture

Macromedia, Inc.

[email protected]

[email protected]