|
July 2007
July 22, 2007
SOA, Intermediation, and Long Running Transactions
In Nick Malik's follow up post The value of intermediation, part 2, he describes "composable services" as follows:
I would suggest that a service, when composable, (a) provides information in a manner that can be readily reused without requiring multiple calls to other services for interpretation, and/or (b) provides functionality that can be executed to produce specific semantics in an encapsulated manner without requiring references to multiple other services and without unknown or undesirable side effects.
I woud state that a service that does not comply with the above "suggestions" is not a service in the SOA sense. I don't care much for the "composable" or "reusable" qualifiers that are being placed on the term "service". I believe that it creates fractured definitions that don't improve understanding.
Nick continues with assertions about the connection between SOA and Canonical Data Models:
I argue, passionately, that a service that does not leverage a Canonical data model (explicit or implicit) is not useful outside a small handful of very specific situations. Such a limited service provides some small benefits, but probably not more than a COM+ component would, and certainly not enough to justify all this interest in SOA. We get no business agility from this kind of service. Therefore, as an Enterprise Architect, you can create it, but I will not use it, nor will I look kindly on another application that does. Poor integration is just barely a half step up from no integration. Some would argue it is a step down.
Just to be clear, a Canonical Data Model is something that exists without dependence on any service. That is why I don't agree with its use in SOA. Each service has its own message schema which makes use of its own data schema if you will. A data schema is the definition of structures that are used in more than one message type. The service controlls both of these schemas and decides when and how to version them, which versions to support on which endpoints, etc. It's all part of the service's autonomy. I'm not quite sure what an implicit canonical data model is.
I'm also unclear as to the "benefit" a service provides. Services are the way we model our business domain - they are therefore a part of our business. In my previous post on intermediation and SOA I gave an example of a Purchasing Service. This service does not really exist to provide something external to it with a "benefit", it's an inherent part of the structure of the business, much like the Purchasing Department of the company is. It participates in business processes but is not ruled by them. I really don't see how you could compare that to any kind of technological component. In that respect, you don't "use" a service. Neither do you really "integrate" them. Each service decides which processes it needs to be a part of, simply by choosing which events (of the EDA kind) it subscribes to. This leads to a kind of "distributed integration" that maintains service autonomy and has no single point of versioning or failure.
One of the comments quoted includes the statement "Intermediation greatly complicates any message exchange pattern other than request-response and pub-sub". Like I described in my previous post, intermediation, if it even does occur, occurs behind service boundaries. Between services, you have the basic message exchange patterns of duplex request/response (one way messaging each time, with correlation between them) and pub/sub. You really don't need anything else, and yesterday's middleware already handled all of that for us. Most of the advanced ESB functionality isn't needed between services.
The next example given discusses a banking scenario (well, more of an HR one really), which brings Nick to the following conclusion:
This process is neither pub-sub nor request-response. It is a long-running orchestration with compensating events. The process is NOT complicated by the ability to intermediate.
In fact, I would argue that nearly all valuable long running transactions MUST have the ability to intermediate in order to allow them to be composed, and recomposed, and orchestrated.
Long running anything, is a series of message exchanges that are tied together in some way. This could be as simple as having all the messages contain the same process ID in their body. "Compensating events" are just the result of business logic being run in a service, possibly changing its own state (updating those backend systems and applications), and sending out other messages. If there's any intermediation of the kind Nick describes, it occurs within a service between its backend systems and applications. He also implicitly states that there is value in composing/orchestrating these "long running transactions", apparently without having the service be involved. I don't see it. Not the way I do my services. Once again, each service is responsible for itself - its part of the global "long running transaction", ie business process. If one service were to choose to implement its cross-application workflows in a hard-coded manner, that should have no impact on any other services, nor should they be aware of it. That service may have been implemented poorly and as a result have difficulty responding to changing business conditions quickly, but that's its own business. That implementation could easily be upgraded in the future, without changing the overall Service-Oriented Architecture.
Nick's conclusion follows:
In conclusion, I don't say that intermediation is a requirement of a service oriented architecture. But I do say that intermediation is a requirement of a service oriented architecture designed to deliver composability, and therefore, business agility.
Mine is a little different. When your SOA is made up of autonomous business-level services, you will have business agility. The implementations of some services may benefit through the use of intermediation, but it is not a top level concern.
Posted by Udi Dahan at 05:03 PM Permalink
|
July 13, 2007
[Podcast] How does Extract, Transform, Load fit with SOA?
This week's question comes from Jayan, who asks:
Hi Udi,
I just went through your Blog which talks about not creating entity services, but instead creating a business service. I understood why you would want it to be a business service, although I am still struggling to fully define what a business service is.
Currently what we have requested is to have a single service, extract, transform and load master data. From your explanations it seems like this is a business service and not just an entity one. What one of the sales guys from an SOA company is saying that this is very possible and would be easy to do.. What I wanted to get your perspective is if this is the right thing to do. What we requested is below:
1. To create a business service that will extract, transform and load data (One service for user, one for customer and one for product?)
2. This service will then be called by the different applications we have (3 Java applications, 1 .Net Application and 1 Siebel Application as well as a host of VB/Excel Applications)
3. The service will be calling on different backend sources for data from SAP systems, Access DBs, Excel Files, Web Pages & Oracle Systems
They say that creating this would produce a.) a reusable service and b.) cost savings. Although I am still apprehensive because it seems as you mentioned in your podcast, each system would have slightly different set of rules for the data entity (and btw you are right).. would this still matter? The thing we want to eliminate is the replication of extracting and loading, although each system would transform the data in its own specific way..
Appreciate any perspective that you might have.
Thanks,
Jayan
Get it here.
Additional References
Podcast on Master Data Management and SOA
Podcast on Business and Autonomous Components in SOA
Posted by Udi Dahan at 06:28 AM Permalink
|
July 08, 2007
On Intermediation And SOA
Nick Malik has an interesting post on The value of intermediation in SOA where he starts out suggesting a couple of books that stand at the basis of much of today's SOA thinking. I agree that far too few people seem to have read them.
In his previous post Is it service-oriented if the message cannot be intermediated, Nick defines intermediability as "SOA should give us the ability to intercept a message going from point A to point B, and react to that message without informing either end of that pipe.". I'll respond to this in due course.
Anyway, he continues on by saying "SOA [is] an architecture for Enterprise Application Integration."
I can't agree with that statement. The main reason is that EAI puts the application in the center, and that integrating existing applications one of the primary purposes of it. It is my assertion that in order to solve many of the problems that we are having today, we need to take a broader, business based view of the enterprise and model that with services. A service may be implemented with one or more applications. However, my experience has been that these services tend to use parts of existing applications, with multiple services using different parts of the same application. The reason for this is that the applications we have today, especially the ERP monoliths, do a lot, and at the same time, not everything. This is part of the reality that EAI tried to solve, but then got mired down in cross system hell. You just can't solve poor business decomposition in the technology domain.
The value of putting services at the fore makes it possible to gradually phase out and evolve legacy applications, and migrate costly mainframe apps bit by bit without having these changes ripple out and break other services. The same is true for those systems' data - backup strategies are defined at the service level, impacted primarily by their Service-Level Agreements.
While I whole-heartedly agree with what Nick has to say in terms of OO intermediation of the Dependency Injection variety, and that scaling up those same concepts in terms of messaging is the right way to go, I take issue with orchestration in the intermediation area. These "tactical changes" need to be done in the context of the top, business-level service strategy. That means that all logic belongs within a service. The "network" between services is just that, a "dumb" network - no business logic of any kind, just technological capabilities like knowing which physical server to route messages to.
In this spirit, I'd like to suggest an alternative solution to the example Nick gives. Here's the scenario:
Let's say that system 1 generates an invoice. It sends an event to the world saying "invoice here" and system 2 captures that message. System 2 asks for details about the invoice... perhaps it will place the information on a web site for internal support teams.
Let's say that we are moving to a CRM solution in our internal support groups. We want to create the information in the CRM system related to the invoices that specific customers have been issued. We need to integrate these two systems. The existing web app needs to have a link to the CRM system's data, to allow the user to move across easily.
And here is the solution he prescribes:
We can intercept the request for further information from the web app to the publisher. When the publisher responds with information about the invoice, we can insert the invoice in the CRM system, add a link to the CRM record for that invoice to the data structure, and resume our response to the web app. Assuming that our canonical schema has a field for 'foreign key', we have just integrated our CRM and web information portal... without changing either one.
Without getting into the business-level analysis of what the correct service decomposition might be, here's what I suggest (although all of these "systems" might just end up within the same service, or having parts of them being used by multiple services).
First of all, have all information about the invoice available via the message only. This could be done by actually putting all the invoice data in the message, or by placing a URI instead where other systems can HTTP GET it from - REST style. This decreases coupling between the publisher and its subscribers. However, we haven't solved the problem of our web apps getting access to the relevant data in the CRM system.
The solution presents itself at the business level. The invoice is not "complete" without the appropriate CRM data. Therefore, it does not make sense for a service to publish it that way. Let's call this service the Purchasing Service. It would handle the workflow of receiving the first system's event, adding the invoice to the CRM system, and taking the resulting full invoice data and publishing that. All external systems like the web apps would see just the final event. Orchestration, if there even is such a thing, occurs within the service boundary. This technological level intermedation isn't even a blip at the business level. We can also imagine other services, say a Sales Service, that would use the CRM system as well.
In summary, when moving to SOA, intermediation provides many technological benefits in getting data and behavior to work across existing systems and applications, however it's laregly a NO-OP at the service level. After phasing out many of those existing applications behind the service boundaries, the same service-level interactions would persist. Your Service-Oriented Architecture would not be any different. That's the technical agility aspect of SOA.
Posted by Udi Dahan at 05:01 PM Permalink
|
|
November 2007
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
|
|
|
1 |
2 |
3 |
| 4 |
5 |
6 |
7 |
8 |
9 |
10 |
| 11 |
12 |
13 |
14 |
15 |
16 |
17 |
| 18 |
19 |
20 |
21 |
22 |
23 |
24 |
| 25 |
26 |
27 |
28 |
29 |
30 |
|
|