Sunday, October 21, 2007

Need to integrate your applications? Collapse the stack!

Each technology addresses a specific set of problems. It is common to see various functional overlaps in these solutions. In the integration world it is even more messy. Ooh Ooh Ooh! MoM, JMS, ESB, Adapters, BPEL the jargons keeps on growing. Each vertical stack adds further complexities. In many cases it may make sense, in many other it does not. Ask a few questions? Do you really have to XMLify all your conversations? Are your applications all Java, .NET or a mix? Are you overkilling the solution and performance for no specific gains?
Let me take a popular and a simple business scenario. You have a web-site and you sell your products. A user starts a shopping cart, adds some items in it and checks out. Expects a delivery and may be some contract. Now, we have three systems here, your Web-app, your quote approval and the contract system. A Quote is not very different from a shopping cart. A Contract is not very different from a Quote. That means an object which represents a Shopping cart can be mutated to a quote and then to a contract object. Now the fun part - Integration!
Instead of building a huge vertical stack of solutions, deploy Oracle coherence. Configure a Partitioned cache topology on some cheap commodity hardware. Configure 50-60 JVMs (depends on the volume to be supported) to be the nodes of your grid. Now, create three distributed Caches - Cart, Quote and Contract. Attach MapListeners on the cache your specific application will be interested in. In our example, the quoting system would be interested in the checked out shopping cart. The quote system can read this cart, apply a set of business rules and converts it to a quote. After the quote has been verified and created, the quote system can put it in the Quote Cache. The contract system does the same. Reads the quote from the Quote Cache, mutates it to a Contract. It can then put the contract in its database (Write-Behind at Close of Business day). Add the contract object in the Contract Cache for other systems to use. Any worries yet?
What if not all the systems exist in one reliable network? Do you have a .NET application sitting some place working on your objects? Use Coherence*Extend whenever you have WAN or any unreliable network. Use Portable Object Format if you worry about the serializations. Try to get rid of XML communication as long as you are okay to distribute the same application libraries. Keep your system management team lean. Take a hard look and find why this simplification won't work for you? Don't burn yourself writing XML Schema for each system. Collapse your fat stack.

No comments: