Service Oriented Applications (SOA) Application architecture (part 1)
There is a lot of interest in Service Oriented Applications (SOA) at the moment. Not really surprising as this architecture has a lot of benefits if used properly :-) Basically a good SOA architecture should consist of a number of different and semi independent applications (services) that work together through messages. Each service has its own responsibility, for example:
- An order entry application.
- A CRM application to manager customers.
- A financial application to register financial flows.
Now each application/service has a specified role. For example: If a user wants to enter a new order into the order entry system he/she van only select existing customers from the CRM application. When the order is complete a message is send to the financial application so the required journal entries can be made.
Now the order entry application needs to be aware of the known customers of the CRM applications. Basically there are two approaches to take here; either it requests a list of customer from the CRM application or the CRM application notifies the order entry application of new customers and the order entry application maintains its own list of known customers.
I believe the notification system is the better of the two. Why you might ask? Well for a true SOA application you want as little coupling between services as possible, you doesn’t want the order entry application to dependent on the CRM application. In fact you want to be able to replace the SOA application with a completely different one without breaking the complete system. Well broadcast notification is the way to achieve this. If the CRM application updates/adds a customer it broadcasts the fact through a predefined message. Other parts of the application like the order entry and the financial application receive this and extract the data they are interested in and save a local copy. Another part of the application, lets say the purchasing application, might not be interested in the application and can just ignore the message altogether.
So does that mean that all messages in a SOA application are broadcast notifications? No it doesn't. Suppose an order entry clerk wants to add a new order for a new order and the business allows this to happen. In that case the order entry application sends a message to the CRM application requesting a new customer to be created. The CRM application does so and returns the new customer data as well as broadcasting the fact to all other interested services.
So we basically need two different kinds of messages:
- Fire and forget notification messages to multiple endpoints.
- Request and response messages to a single end point.
That leaves us with how the route the messages. Next blog
entry more about message routing.
Maurice de Beijerwww.TheProblemSolver.nl