Friday, June 01, 2007

How to implement Business Activity Monitoring in an SOA

This pattern describes how business activity monitoring (BAM) can easily be implemented in the context of SOA using EDA. It is about the monitoring of "business" activities, which is not the same as "system" activity monitoring as Mark Palmer explains in his BAM Myth #2: "The problem is, it's not easy to put a system monitor on the IT infrastructure and gain business insight from technical activity." Of course system activity monitoring can (and will) be based on the same kind of pattern, but that's not what I focus on in this post.

Essence of this pattern is that services that deliver data to be monitored are decoupled from the monitoring functionality. The responsibility of the services is limited to publishing the relevant data. In a well designed loosely coupled system, this data will probably already be available as in such a design autonomous services exchange business events in a formal format to establish process flows. The services do not have any knowledge of the (existence) of the monitoring functionality. You might say in a correctly designed EDA based system, a properly configured business activity monitor can be plugged-in on the fly.

The monitor consists in its simplest form of event processing components and a dashboard for publishing alerts as depicted in the figure above.

  • Event correlation: correlate desperate event types and their occurrences based on configurable rules concerning value-ranges, comparisons and time-frames.
  • Event processing: additional processing to enrich the data delivered by the event messages.
Depending on your preference you might say that event correlation is a form of event processing. I purposely distinguish between the two because of the special time-frame based nature of event correlation in the domain of Complex Event Processing (CEP), whereas I position event processing as - more or less - straight away algorithm processing.

The event processor publishes alert events based on the correlation and processing results. A monitor dashboard subscribes to these event types and prepares them for publishing via a portal.

This is a very simplified representation of BAM functionality. BAM tools may offer extended functionality like persistency, analyzing, replay, multi-channel presentation, etc. Reporting via a dashboard is only one of the possibilities to present alerts. Custom services, email services or datawarehouses may also gain benefits of the published alert events; plug-and-play. An alert event is a special type of business event.

Example

A service in an ordering process publishes a message about the event of a customer placing an order. It is the company's policy to deliver within two days after ordering. If the delivery is delayed, the customer gets a discount of 10%. The idea behind this policy is that no customers will be lost after a delivery delay; some customers will even prefer a delay.

To monitor this process the "order placed" event is correlated with the "order delivered" event, which comes from a service at the expedition department (or an external company in case of outsourced expedition services). The occurrences of both event types are correlated based on the ordernumber. If an "order delivered" event is not detected within two days after an "order placed" event, an alert event is generated. A service of the financial department is subscribed to these event types. This service initiates a rebate for the concerning customer. Also a dashboard of the expedition department is subscribed to these event types to notify the employee on duty of the delay in order to have him take action and notify the customer. (A phone call is more customer-intimate then a generated email.)

It is easy (and better) to reconfigure the two-day time-frame in this example to an one-day time-frame and take corrective actions before the delay occurs.

This simplified example shows to power of events based systems in combination with CEP and BAM. Mature CEP and BAM tools are available on the market, but for an experienced development department it is no big deal to home-build this kind of functionality for systems that at this level of abstraction are based on EDA.

Why?
  • This pattern decouples the process flow from the monitoring functionality. By using this mechanism the process flow as well as the monitoring functionality can be changed independently, without affecting each other.
  • By using this mechanism the monitoring functionality does not influence the performance of the business process in any way.
  • By using currently available standards based CEP and BAM products a uniform generic facility can be implemented, which reduces costs and maintenance in comparison to proprietary and/or more tightly coupled system specific monitoring solutions.

Friday, May 25, 2007

The two worlds of SOA

Nick Malik posted a reaction on the idea that entity services are anti-patterns. I agree with his conclusion that it depends on where you stand.

Looking from the business side, there is the composition of business activities into autonomous business functions. These functions offer services to each other and communicate - preferably - events based to obtain their autonomy. Such a business service could easily be outsourced without any disruption of the overall business process. Such a business service can also easily be delivered (shared) to different business contexts (internal or external). I call this the Service Oriented Enterprise. This has nothing to do with IT.

On the other hand there is the composition of application constructs. The top level of such a construct preferably maps with an autonomous business function. Current standards based technologies make it possible for IT to support events based interaction between the autonomous business functions, which in turn boosts the Service Oriented Enterprise.

The idea (or pattern, if you like) of autonomous business functions can be prolongated into the finer grained application constructs which may e.g. lead to autonomous entity services or deeper layers of granularity.

See also:


So: No, entity services are not an anti-pattern.

Wednesday, May 23, 2007

Business doesn't ask for SOA

Testimony from practice: Up till now, at this very moment in time, I didn't meet one single business manager who begged me to please deliver him an SOA-based solution. They are running after deadlines and project-cost reductions, but not after SOA. They are even cynical about SOA as being yet another promise after all those previous ones. Of course all those previous promises were a step ahead, just as SOA is. And I believe SOA is a big step ahead. But our business people don't want SOA's, they want flexible and cheap solutions. And they want I.T. not to be a big hurdle when they change the way they happen to do things. But they definitely did not ask me for an SOA.

And another testimony from practice: Developers - in general - don't get the clue of SOA. The marketeers of most software companies evangelize their ability to build service oriented systems. But the people who really have to deal with the details are not educated to get a grip on the practical use of the principles of autonomous business functions, loose coupling and asynchronous design. They are trained to use the modelling tools of Websphere, Sonic and Tibco, but SOA is not their mind-set. It's the individual passionated nerds we have to rely on, not the average developer or designer.

But fortunately I can also testify about curious development teams that are slowly adopting the new wave. Development teams that operate very close to the business in a very rapidly ever changing commercial context. These are the people I enjoy working with.

And another good sign is that the builders of packaged software - like SAP - not only evangelize SOA, but are really spending big efforts to service enable their legacy. Also the SOA initiatives of SaaS-providers like SalesForce are a great boost.

All together I believe it will take at least another 10 years or so before SOA becomes mainstream and common sense to all of us. And keep in mind that we are not hired to deliver SOA's to the business, but solutions. That's what they ask for.

Friday, May 18, 2007

Do we understand SOA?

I came across this posting of Galen Gruman, contributing editor at InfoWorld. He cites Roberto Medrano, executive vice president of SOA Software:

  • "Maybe 20 percent of IT folks understand SOA and half of the rest think they do"
He might be right. Perhaps we currently understand that breaking down your business activity into a business component model of autonomous business functions is key to SOA. It is a lot less common thinking to loosely connect these autonomous business functions, events based. I tried to clarify this aspect in SOA Magazine.

And then there is the widely spread misuse of some core terminology. "Experts" tend to speak of "reusable" services. But what they mean is "shareable" services, which is quite a different thing. It makes sense to focus on shareable messages and not only on shareable services. Did you ever hear somebody talk about "shareable messages", typically representing business events? I didn't, while the use of shareable messages really is the key to success. It's shared messages that make the innovation, not shared services.

And what about the idea of loose coupling related to SOA?
I quote: "Shared services are disruptive, increasing dependencies and raising questions about what it means to own a service and who should own it." From a lower level IT-perspective this is such a very truth! However it doesn't seem to bother most of our "experts". Not to mention how and why exactly to "share" a service, if a service equates to a properly designed autonomous business function.


Wednesday, May 09, 2007

How to implement loosely coupled transaction processing



This pattern describes how to accomplish transaction processing within the context of autonomous services. The pattern is based on the idea that - by design - every action has a compensating action to undo the original action.

The autonomous services fulfill action requests from the transaction controller (see "1" in figure). If one or more services reply not to have been able to fulfill the request (see "2" in figure, fault feedback) then the transaction controller will send requests for compensating actions to the services that did fulfill the original requests (see "3" in figure).

The concerning services do not distinguish between a normal action and a compensating action. To the services compensating actions are normal actions like any other. The services are not even aware of being part of a transaction.

Examples

  • A service is designed to make, change and cancel reservations for hotel rooms. These are three equivalent types of actions. In the context of compensating actions, a cancellation can be considered a compensation for making a reservation. This compensating action results in undoing the original make reservation action.
  • A service is designed to increase or decrease the balance of an account. These are two equivalent actions. Both can be seen however as compensating actions for each other (mutual com-pensating actions). An action that increases the balance with 100 euros can be compensated with an action the decreases the balance with 10 euros.
It need not only be fault feedbacks that lead to compensation. The transaction controller may make use of a timer to detect if an acknowledgement has been received within a preset time-frame. If one of the services doesn’t respond with this preset time-frame, requests for compensating actions will be sent to the other services. If a service sends the acknowledgement after the preset time elapsed and compensation action requests have been sent to the other services, this late service will be sent a compensating action request as well. Or one might choose to resend the original action requests to the other services if that is appropriate.

Design considerations

The designer of the transaction system must for every action always design a compensating action. This is not trivial. Consider the second of the above mentioned examples. Suppose the service was not developed to increase or decrease an amount, but to replace the old amount with a new one. Compensation would then not be possible. If the action would replace the old amount with a new amount of 10 euros, this can not be reverted without endanger the integrity of the data. Not even if the transaction controller would be aware of the old amount (or if the old amount would have been returned to the transaction controller). Other amount changes (triggered by other sources) may have occurred after the replacement transaction has been executed. If afterwards a compensating action would replace the amount back to the original amount, the amount would be corrupted.

Why?

In situations where by nature the transaction processing cycle is long (minutes, hours, days, weeks, …) the described pattern of loosely coupled transaction processing allows for an adequate alternative to the well known two-phase-commit mechanism. Also in loosely coupled of decoupled environments (B2B) where minimal dependency (maximal autonomy) is pursued, this pattern offers a more appropriate solution then two-phase-commit.

Traditionally transaction systems use the two-phase-commit mechanism. All participating software components must support and adhere to this mechanism. All components reply whether or not they can honour the request of the transaction controller and - if so - retain the action until a commit- or rollback command has been received. A commit command is issued by the transaction controller as soon as all concerning components have replied that they made their preparations and are ready to commit. If one or more of the components deny the request, the transaction controller will send a roll-back command to the other components in order to allow them to release their retention state.

Because after a commit command the participating components must actual perform the action if they replied to be ready to commit, these components must - awaiting the commit - place locks on the data that is involved in the transaction. This puts a claim on the performance of the system. Such a mechanism is therefore only appropriate for (very) short running processes where a participating component can rely on the performance of the other participating components and on the performance of transaction controller.

If the processing time to complete the transaction takes relatively a long period of time, the inherent locking strategy of the two-phase-commit mechanism is not appropriate because it can hang the complete system. Also in loosely coupled of decoupled environments such as B2B the two-phase-commit mechanism puts undesirable dependencies on the environment and the proposed loosely coupled transaction processing will be more appropriate.

Sunday, May 06, 2007

Rambling thoughts of an architect

Quoted from Martin Fowler:

Complexity

  • Making something easy to change makes the overall system a little more complex, and making everything easy to change makes the entire system very complex. Complexity is what makes a system hard to change.

Limitations
  • Software is not limited by physics, like buildings are. It is limited by imagination, by design, by organization. In short, it is limited by properties of people, not by properties of the world. “We have met the enemy, and he is us.”


Know any similar wisdoms? Please drop them here...

Thursday, April 19, 2007

How to mediate semantics in an EDA



Sharing semantics

Systems that pass data to each other share commonly understood semantics. Explicit data semantics is the key to success in an EDA (and any other messaging system). In striving for loose coupling, data semantics is the ultimate level; when systems are decoupled at the semantic level - e.g. they don't share semantics - the coupling becomes useless, because in this case the systems will not be able to communicate at a logical level. Shared semantics is a prerequisite in connecting distinct systems, no matter whether it concerns EDA, SOA or any other form of EAI (Enterprise Application Integration). It should be obvious to anyone that analysis of data semantics will always be the first activity of any integration project.

In contrast to sharing semantics, distinct systems do not share formats that express these semantics. Think of different date formats or amounts (semantics: balance on a bank account) expressed in different currencies. Or think of different identifiers: CustomerName versus Custnm. The same semantics is expressed in different formats.

Mechanisms must be in place to harmonize between these different formats that carry semantically the same data from one environment to another environment. This pattern describes such a mechanism based on intermediate canonical formats for semantics representation.

Canonical Data Model (CDM)

In an EDA a business event is represented in a canonical format (presentation) with unambiguous semantics. This format and semantics are defined as canonical message types in the enterprise's Canonical Data Model. These messages are the core of the event-driven architecture and are valuable business assets that must be treated as such with regard to protection.

A message type may be invoked by several source systems in several environments. Several target systems in several environments may consume the same message. The environments that send and receive these messages don't need to know the canonical format. Every environment communicates in its own local format with the messaging system (typical the Global Dataspace implemented by an Enterprise Service Bus). A prerequisite is that every concerning environment has defined their local data formats and semantics in the CDM. The messaging system will provide services to transform the local format to the canonical format and vice versa. These services depend on the CDM.

There will always be a transformation from the local format at the sending side to the canonical format and there will always be a transformation from the canonical format to the local format at the receiving side. Even if the local format is identical to the canonical format a transformation will still be implemented. Such a null-transformation makes the mechanism generic and more agile when changes occur.

At design time, the definition of format transformation is not the only thing that must be accomplished. First of all correctly mapping the corresponding semantics from the local formats to the canonical formats is of utmost importance. Format transformation is the second step. Semantics mapping is vital to the success of the system, so in consequence defining semantics and recording these descriptions in the CDM is not an option, but a must if you want to succeed with EDA, SOA or EAI.

CDM, no commonly used datamodel

The CDM is not a storage component, but a metadata component. The CDM holds definitions of the local formats and semantics of the participating systems and the CDM holds the definitions of the canonical formats and semantics. There is not any persistent processing data in local or canonical format stored in the CDM. Also the CDM doesn't provide a common datamodel that everyone has to adhere to. Such a common model is no longer appropriate since we buy systems from the marketplace with their own datamodels and since we connect many systems from a variety of environments, old and new, sometimes in a B2B context or inherited from merging with other companies, each with their own datamodels, formats and semantics. The pattern described here, doesn't bother the systems owners with constraints on datamodels, formats and semantics. Everybody can use their own models, formats an semantics. Transformation services support the transformations of the shared semantics to and from canonical formats, using the definitions in the CDM. The sending and receiving systems are completely unaware of this; they talk in their own language.

Enrichment and translation algorithms may be part of the transformation services. This applies to different data representations with the same semantics, but it also applies to conversions of different but deducible semantics.

Example of data representation transformation

Two systems share the semantics for "railway station"; they both interpret the meaning of this entity type in the same way: a railway station involves a location and platforms and is owned by Dutch Railways; the rails are not part of it. However, one system uses alphabetic characters to identify a railway station. The other system uses numeric characters to identify the same set of railway stations. So one system identifies railway station Oudenbosch by "A" and the other system by "01". The canonical format uses even another set of identifying characters: alphanumeric. The transformation services must have knowledge of all railway station identifying sets and how they correlate. A persistent data set (e.g. a database) lies at the basis of the resolving algorithm of the transformation service.

In practise the case of this example may be rather complicated; think of how to keep the intermediate data set up-to-date if the connected systems may autonomously add new railway stations (or worse: change the railway station id's).

On the other hand there are also very easy translations, like translations of date formats or miles versus kilometer translations.

Note that all of these data representation translations can be bi-directional.

Example of correlating semantics conversion

In some cases it is possible to convert one semantics to another. Of course this is only possible if one semantics embodies the other one in some deducible way. Let's look at a strongly simplified example of a purchase order.
The canonical format of a purchase order consists of an order number with a set of order lines each with a part number, a quantity and the price of the concerning part on that line. The consuming system understands a purchase order as an order number and a total order amount. The transformation service multiplies the quantities by the prices and summarizes the resulting amounts.

You might argue that this example doesn't mention two semantics, but a different representation of only one semantics. You are right, it is ambiguous. On the other hand, the canonical format holds more data of the order than the consuming system does. So how can the semantics be same?

This is a simple example. In practise you may come across very complicated situations, where multiple complex data structures and complex algorithms are involved.

Note that the conversion can only take place into one direction.

Why?
  • Using canonical message types decouples systems at the level of message formats. Systems don't have to make assumptions or have to rely on other system's data formats. This is an important aspect in striving for loose coupling.
  • Defining canonical message formats creates the opportunity to supply the company with an unambiguous catalog of available messages about business events, representing valuable business assets. The business events in this catalog are independent from the sources that generate these messages. Based on this catalog policies can be implemented with regard to ownership and degree of free availability of data that is exchanged between domains. New business models may pop up with regard to data exchange. The catalog may contain rates associated with messages about business events. Publishing data about business events may be marketed: suppliers get paid for the published data by consumers. The IT-department delivers the market place (infrastructure) an may play a role as business events broker.
  • In a technical sense this pattern has a benefit in that at the endpoints only one transformation service per message type has to be configured. A subscriber needs to subscribe to only one message type, regardless whether there are multiple sources or not.
  • If transformations would take place directly between local formats (skipping the intermediate canonical format), transformation services have to be created for every source-target combination. This would lead to higher loads of management and maintenance efforts. Consumers would have to subscribe separately to every source of a particular message type and should in consequence have knowledge of the existence of these distinct sources.

  • Without intermediate canonical format a format change at the publishers side must be followed by changing all the transformations to the subscribers. Using an intermediate canonical format makes the transformations to the subscribers independent of changes at the publishers side.
  • Without canonical formats for semantics representation semantics would be represented in multiple equivalent formats. This obstructs the possibility to supply the company with an unambiguous catalog of business events independent from their sources. Also the lack of canonical formats will consequently cause system designs and resulting systems to be more complex and harder to change.

Thursday, April 12, 2007

How to implement service versioning in an SOA



In this pattern every versioned service has a proxy. There is one proxy for the whole collection of versions per service. The proxy decides which version of the service must be accessed.

This is accomplished by use of a version identifier in the SOAP-message. This version identifier identifies the version of the WSDL document that the calling component used to call the service. There is always a WSDL document for every service version. At design-time the concerning version of the WSDL document must be known, because the program code of the calling component must be aligned with this particular WSDL. The version identifier of the WSDL document in use at design time is added to the SOAP-message.

The services are registered in a registry. For every version of the service the registry holds the version identifier of the corresponding WSDL document. In addition, for each registration of a version of a service the registry holds a backward compatiblity list; with every newly registered version of a service a list of compatible earlier versions is registered. Backward compatibility means that a version of a service can be called by components that were built with earlier WSDL versions.

The proxy queries the registry with the version identifier from the SOAP-message and looks for the highest operational version of the concerning service that is compatible with the version identifier from the SOAP-message. Once the correct version of the service is determined the proxy passes the message to that determined version of the service.

In case of a component calling a service using an old version identifier of which no compatible service versions are operational anymore (e.g. after end-of-life of a service version) an adequate error message may be returned by the proxy to the calling component.

The specific versions of the services to which the proxy passes the messages are identified by their URI (URN and/or URL).

Why?

Support of multiple concurrent operational versions of a service leads to more flexible and robust systems. Separating the callable service name (represented by the proxy) from its version identifier has advantages:

  • Calling components automatically make use of the highest available compatible version of the service on the fly without any modification.
  • Multiple incompatible versions of a service may exist concurrently without any effect on the calling components.
  • New versions of a service can easily be tested in a production environment, without disturbing the current version. After approval just add the backward compatibility list for this version to the registry and all compatible calls are directed instantly to the new version.
  • Superfluous versions - versions of which higher compatible versions are available - won't be called anymore and can be removed without any modifications to the calling components.
  • The process needs not be aborted to pass control to the infrastructure layer if an old version identifier is detected that is not supported anymore by an operational service. If desired control can be maintained at the application level where an appropriate action or message can be generated.


Architecting for SOA: best SOA presentation I have ever seen

In this non-marketing presentation, Microsoft Architect Beat Schwegler introduces the notion of a service model as a mediator between the business and technology models. And he explains how a migration towards such an architecture could occur through a step-by-step architectural refactoring.

If you are serious about SOA, you really have to watch this refreshing video presentation that lacks any form of hype. You won't regret...

Monday, March 19, 2007

Using events to bridge decoupled service boundaries

I am honoured that my article "SOA and EDA: Using events to bridge decoupled service boundaries" is published by:

and


Tuesday, March 13, 2007

Publish-and-subscribe is not EDA

There seems to be some ambiguity when discussing the patterns publish-and-subscribe and request-and-reply with regard to the architectural approaches EDA and SOA. This ambiguity origins from a "flat" view on architecture. To fully understand the relationship between these patterns and approaches it is necessary to distinguish between two viewpoints: logical and implementation.

When designing your architecture, are you driven by business events that trigger processes? Or are you oriented on a composition of hierarchically encapsulated layers of callable business services that form processes? Probably the overall architecture will hold both approaches simultaneously. When in a particular context (see How EDA extends SOA and why it is important) your approach is driven by events you will fall into a logical publish-and-subscribe pattern. When your approach is oriented on a layered composition of interacting services, you will end up in logical request-and-reply patterns. This has nothing to do with the patterns at the implementation level.

At the implementation level there are other forces, like available infrastructure, that make you choice for a pattern.
You may choose to implement a logical publish-and-subscribe pattern in a synchronous way. E.g. an RSS feedreader implements the subscription by periodically starting a synchronous interaction by requesting newly published events and wait for a reply. These events may be published by synchronously requesting a service to add a message to the feed store and wait for a "storage fulfilled" acknowledgement.

On the other hand you may choose to implement a logical request-and-reply pattern in an asynchronous way. Simply separate the issuer of the request and the consumer of the reply and separate the receiver of the request and the publisher of the reply. Publishing a request and subscribing to the reply doesn't make the architectural style an EDA. Neither does subscribing to a request and publishing the reply, nor does any combination of these types of interaction make an EDA. It is a loosely-coupled - e.g. asynchronous - request-and-reply implementation.

Thursday, January 18, 2007

Web 2.0 meets SOA - AJAX UI for SOA

On one hand there is Web 2.0 going on. On the other hand there is SOA. The cool stuff versus the lasting robustness. Two opposite worlds. Joe McKendrick charactized the two:

The "SOA" guy is the one in a corporate suit, a bit uptight, and prone to making things more complicated than they should be. The "Web 2.0" guy, on the other hand, is the cool, good-looking one.

But these two worlds are running toward each other with the speed of light. Not to collide into damage, but to collide into fusion. Web 2.0 and SOA (or better: Internet technology and Enterprise Architecture) will come together in close harmony and in the end there will be no difference between the two anymore.

This article is a practical illustration of the convergence of emerging web technologies and emerging trends in Enterprise Architecture combined with emerging application services business models. All based on currently available components.

The components are:

  • Web Browser
  • Portal Server
  • SOA (but may also be Web Service wrapped legacy)
  • ESB (preferably)
  • B2B Gateway (preferably)
  • Portlets
  • JSR168
  • Web Services
  • WSRP
  • AJAX (yep, Web 2.0… At least, the face of)
  • DOM (Document Object Model)
What these components and their purposes are will be explained during "composing the system" (below). The terms "application" and "SOA" in this article are equivalents with no distinguishing purpose.

Composing the system

1. Connecting the portlet to the portal server: JSR168


Figure 1 (click to enlarge)


The face of the portal server is a web server a user can connect to using a browser. The portal server provides access control, personalization and presentation. In the background the portal server is served by the security services infrastructure (keywords: Single Sign-on, directories, authorization, authentication, PKI, LDAP, certificates). The portal server also provides a way of decoupling from the user devices like laptop, PDA, Smart phone, PC or whatever the browser is running on.

Portlets are the windows from the portal server to the application (SOA-based in our case). They supply functionality like decoration, application navigation and some application level session control. Portlets can talk to each other which make them suitable to aggregate multiple applications at the application presentation layer. Portlets can be programmed to offer a wide (and wild) range of functionalities; the designer's professional craftsmanship is needed to preclude poor designs.

JSR168 is an open standard to provide a standard API between the portlets and the portal server (well, in fact the portlet container of the portal server). This standard provides interoperability between portals and portlets; e.g. JSR168 based portlets can plug into any JSR168 based portal server. Today most portal servers support JSR168.

In connecting the portlet with the portal server we use JSR168 to enable independency between the portlets and specific portal server products. In this way we don't have to maintain portlets for every portal server that accesses our SOA. We can deliver standard portlets with our SOA to be used by multiple portal server products. We don't need to reprogram our portlets when we decide to replace our portal server by another product.

2. Connecting the portlet to the SOA: WRSP


Figure 2 (click to enlarge)


The portlet has to be connected to our SOA. We don't want to create a tight coupling between the portlet and the specific SOA-implementation context (technology, geography); we want technology and geography independency between the portlet and the SOA-implementation. So we use Web service technologies for this interaction. Web services are the standards based interfaces to application functionality.

We also would like functional independence between the portlet on the portal server and application specific presentation logic of the SOA. Otherwise we have to maintain application specific logic in two places (portal server and "SOA-environment"). Even worse, it would become a burden if we want to access the SOA from multiple portals, each of which would have an instance of the portlet implemented with application specific logic. Not to mention the nightmare if you happen to be an independent party offering application services to dozens of customers.
So we split-up the portlet in a generic part (at the portal side) and an application specific part (at the SOA-side). The generic part facilitates generic UI logic such as presenting personalization, house-style decoration and other mock-up. The application specific part facilitates application specific logic, such as menu-structures, application navigation, application state.

The application specific part of the portlet need not be a "portlet", but is the application specific presentation logic which is conventionally is implemented by a portlet. In figure 2 the application specific presentation logic is identified by the name "Portlet" (between quotes) to indicate the strong relationship with common portlet functionality (presentation logic). In fact this component needn't be a "portlet" in the sense of running in a portlet container of a portal server (it nevertheless can be implemented in that way). Whatever the implementation will be, in an SOA it will be exposed as an addressable presentation service: the user interaction point of the SOA.

We introduce WSRP, Web Services for Remote Portlets, for the interaction between the to portlet parts. WSRP is an open standard to allow for portlets as presentation-oriented web services that can be used by portal servers. WSRP supports the publishing and consuming interaction of remotely implemented portlets. Sometimes WSRP is referred to as UI-web services.
There is a WSRP-consumer implementation at the portal side and WSRP-producer implementation at the SOA-side. Modern portal servers offer a WSRP-consumer platform and a WSRP-producer platform. However the WSRP-producer platform can well be a separate platform without the need of a portal server-deployment.

3. Creating a controlled messaging environment (optional): ESB


Figure 3 (click to enlarge)


The ESB, Enterprise Service Bus, is the enterprise's web services platform. Of course you may use plain HTTP as a web services platform for the enterprise, but we all know that is not a very good idea (at least not until "all" WS-standards are mature and embedded in the network and OS-infrastructure).

Within the enterprise we us an ESB-infrastructure to pass the WSRP-messages. In this way we obtain a level control for security, identity, accountability, auditability, reliability, performance and so on.

4. Connecting the browser to the portal server: AJAX


Figure 4 (click to enlarge)


No we get at the "cool, good-looking guy" stuff: AJAX, Asynchronous Javascript And XML, the technology to create cool and appealing web based user interfaces. AJAX can be (mis)used in a lot of ways. We'll apply AJAX not like a script kiddie but as a professional craftsman.

The DOM is the Document Object Model, which the browser uses to controls the screen layouts and screen objects. The DOM is manipulated by the user who enters keyboard keys, who does mouse movements and who does mouse-clicks on the screen. However, the DOM may also be manipulated by Javascript (or better: an ECMA-compliant script implementation). This is why web-site builders can irritate you with popup-windows, blinking logo's and flashing sale alerts. Javascript also provides access to a very interesting object called: XMLHTTPRequest. With this object you can set up an asynchronous communication session between the browser (using Javascript) and the web server.

The idea is to create a replica of the browser-DOM (or relevant part of it) on the portal server and to synchronize between the browser-DOM and its replica on the server. In the browser on the client it is Javascript (or an other browser scripting language) that handles the DOM manipulation and AJAX-communication. On the server it may be a servlet to fulfil this role.

Once we have this instance of the DOM on the server available and the AJAX synchronization mechanism in place, we are able to support the following interaction pattern:
  • User interacts in real-time with DOM on client
  • AJAX synchronizes in real-time DOM on client and DOM on server
  • Portlet interacts in real-time with DOM on server
  • Portlet interacts in on real-time with our SOA
This is a very powerful pattern. As the SOA interacts with the DOM on the server, the SOA can see all user events and can instantly react on it. Every change of the SOA to the DOM on the server is directly propagated to the DOM on the browser and visible to the user. In this way a real-time interaction between the user and the SOA is made possible while keeping the client perfectly thin. It is recommended to keep the client as thin as possible (ultimate: only synchronization code).

Traditional client-server solutions perform input validation checks on the server as well as on the client. The reason is that we want to inform the user about invalid input as soon as possible and not have him wait until the complete screen is sent to the server and the server responds. The server performs the checks again to avoid wrong input from manipulated clients. It the developer's responsibility to keep the client-side and server-side validation code synchronized.
When using AJAX in a proper way, there is no need for duplicate validation code, because the user input is directly propagated to the user entry point ("portlet") of the SOA. A validation check service of the SOA can alert the user on invalid data by asynchronously sending back a warning via the presentation service ("portlet").

When synchronizing keep in mind to avoid bad latency experience by the user. A very fine grained server-response mechanism - at the level of distinct key-strokes - will probably not be satisfactory to the user, because he might experience inconvenient delays. The time it takes for the user to enter data and the latency of the expected response must be designed to be in the right balance. Therefore it may be more suitable to collect the key-strokes at the server and have the application reply on a complete field or a logical collection of fields by design. This is of no difference to common desktop applications. If a very UI-intensive application has to react smoothly to distinct key-strokes or mouse movements, anticipate to it e.g. by designing smart - perhaps even predictive - caching solutions on the portal server (portlet) or even at the client side (browser).

Modern portal servers support AJAX and commercial products that implement the replica-DOM solution are available today.

A very good, clarifying whitepaper on this subject is available here.

5. Extending the enterprise (optional): B2B Gateway


Figure 5 (click to enlarge)


The B2B gateway provides secure and controlled access between the enterprise and the external world. The external world can be external partners, but also highly autonomous departments in a federated enterprise. The use of a B2B gateway is not mandatory, but highly recommended to obtain a level of control. It is possible that one company uses a B2B gateway and the other doesn't; this will not fail the system. It's the responsibility of the individual companies to deploy a B2B gateway or not.

The difference a B2B gateway and a portal server is that the portal server interacts with a human user (with the help of a browser), so is User Interface oriented. The B2B gateway controls the external Web Services access (inbound as well as outbound), so is Application Interface oriented. Like the portal server the B2B gateway is also served by the enterprise's security services infrastructure in the background.

The complete chain


Figure 6 (click to enlarge)


Figure 6 visualizes the complete chain from the user to the SOA. The chain includes a separate application service provider, company 2, offering the application service to company 1. Of course company 1 and company 2 may be the same one company using a common infrastructure. In that case there is only one ESB and no B2B gateways.

The SOA at the end of the chain may be coupled with yet other applications (SOAs) of yet other companies (preferably via the B2B gateway). So a user in New York may be working with an application that is constructed of components deployed in Sidney, Tokyo and Amsterdam with the experience of a local desktop application!

Software as a Service (SaaS)

Perhaps you don't agree with the terminology SaaS and ASP (Application Service Provider) the way it is used in this paragraph, but I merely want to illustrate two different viewpoints in delivering and consuming software based functionality. One viewpoint is you as the consumer of the software based functionality and the other viewpoint is you as the provider of the software based functionality. The model of delivering software based functionality to a third party I called SaaS and the provider I called the ASP. In the context of this article it is of no importance who in fact owns the software - provider or consumer (in which case the provider is only hosting the software) - and whether it is custom coded or commercial packaged.

1. You making use of ASP


Figure 7 (click to enlarge)


When you obtain application services from an external partner (typically the Application Service Provider or a business partner who gave you access to his application) you are happy to use this software as a service. But you don't want to bother your users with different look-and-feels and logons for each distinct application. You want a common access in your company's common house-style look-and-feel, integrated on your company's own portal server. So your user will experience one uniform set of services not being aware these services are provided be multiple independent ASPs.

This appealing use case is supported by the system as we just composed it.

Mind that it is out of your control and of no importance to you whether the external partner uses an ESB and B2B gateway or not.

2. You as ASP


Figure 8 (click to enlarge)


If you are the application service provider, your customers (or autonomous departments or business partners given access to your applications) will be happy if you don't bother them with the look-and-feel and the access control you designed for your application. And you won't be happy if all of your customers want you to support there house-style decoration. And how would you implement a single sign-on requirement for access to your application and all other applications (not yours) you customer uses? And in case of multiple users?

The system we just composed provides a solution. You can deliver application services to external customers each using their own house-style decoration and access control.

It is out of your control and of no importance to you whether the external partner uses an ESB and B2B gateway or not.

Conclusion

With this - simplified - architectural description of adding a typical web 2.0 user interface to an SOA, I tried to demonstrate the convergence of emerging web technologies and emerging trends in Enterprise Architecture. I made use of components like ESB, Portal, B2B gateway, which are currently available on the market. I also made use of standards like JSR168 and WSRP, which are mature and implemented in products available today. I made use of a known programming paradigm - AJAX - to synchronize between the browser and the web server in real-time. AJAX-support is currently implemented in modern browsers and portal servers. I've positioned the architecture in the context of emerging business models like B2B, SaaS and ASP. I illustrated a globally distributed application deployment with a user experience of the application running on his local device.

Standards, products and business models will further mature. New standards, technologies and products will emerge and will encourage application services business models at a global level. I think there is no way back from the convergence of internet technologies and Enterprise Architecture. I think SaaS will have a big future making global scale profits out of these evolvements. And I think it will go faster than many realize.


Friday, January 12, 2007

What is a Service in an SOA?

A Service in an SOA meets the following criteria:

  • Multiple-use
  • Non-context-specific
  • Composable with other components
  • Encapsulated i.e., non-investigable through its interfaces
  • A unit of independent deployment and versioning

Duh...

A Service is written to a specification. It does not matter what the specification is: COM, Java Beans, WSDL, etc., as long as it adheres to the specification. It is only by adhering to the specification that it becomes a Service and gains features like reusability and so forth.

Duh...

The idea in OO (Object Orientation) is that software should be written according to a mental model of the actual or imagined objects it represents.
Services, by contrast, makes no such assumptions, and instead state that software should be developed by gluing prefabricated components together much like in the field of electronics or mechanics.

Duh...

When a Service is to be accessed or shared across execution contexts or network links, some form of serialization (also known as marshalling) is employed to turn its interfaces into a bitstream.

Duh...

It takes significant effort and awareness to write a Service that is effectively reusable. The Service needs:

  • to be fully documented;
  • more thorough testing;
  • robust input validity checking;
  • to pass back useful error messages as appropriate;
  • to be built with an awareness that it will be put to unforeseen uses;
  • a mechanism for compensating developers who invest the (substantial) effort implied above.

Duh...

No big deal to agree with these statements, is it? Now read, for fun, the definition of a Software Component where I took these text fragments from while replacing "software component" by "Service".

So, is a software component a Service and is CBD (Component Based Development) the same as building a Service Oriented Architecture? Not quite, it is the other way around: A Service in an SOA (as SOA is currently understood) is a software component, but a component with a strong business function constraint. SOA is an instance of a component based architecture. So building an SOA has always to do with CBD, but CBD has not always to do with building an SOA as we understand an SOA.

The idea that software should be componentized, built from prefabricated components (like Services), was first published in Douglas McIlroy's address at the NATO conference on software engineering in Garmisch, Germany, 1968 titled Mass Produced Software Components. A very interesting reading. Some quotes:

  • The most important characteristic of a software components industry is that it will offer families of routines for any given job.
  • He will consult a catalogue offering routines in varying degrees of precision, robustness, time-space performance, and generality.
  • He will expect families of routines to be constructed on rational principles so that families fit together as building blocks.
  • We have to begin by thinking small.
  • It will take some time to develop a useful inventory, and during that time money and talent will be needed.
  • Even before founding a pilot plant, one would be wise to have demonstrated techniques for creating a parameterized family of routines for a couple of familiar purposes
  • I think that the whole project is an improbable one for university research. Research-calibre talent will be needed to do the job with satisfactory economy and reliability, but the guiding spirit of the undertaking must be production oriented.
  • The personnel of a pilot plant should look like the personnel on many big software projects, with the masses of coders removed.
  • Very good planning, and strongly product-minded supervision will be needed.
  • the level of programming here will be more abstract
  • One instantly thinks of distribution by communication link.
  • The catalogue will be equally important.
  • Quite soon one would expect a components industry to converge on a few standard types of interface
  • but again unless the standards encompass the bulk of software systems (as distinguished from users), the components industry will die for lack of market.
  • I would like to see components become a dignified branch of software engineering.
  • I would like to see standard catalogues of routines, classified by precision, robustness, time-space performance, size limits, and binding time of parameters.
  • I would like to apply routines in the catalogue to any one of a large class of often quite different machines, without too much pain.

Fascinating similarity, these quotes from a respectable 40 years old document and our modern innovative SOA-thoughts, isn't it?




Thursday, December 28, 2006

Why ESBs are Made for Event-Driven Architecture

Recently I posted an article on how EDA extends SOA and why it is important. I am very pleased this article is gaining popularity in the SOA/EDA community. The posting is also available as a downloadable PDF, which I frequently extend with additional content.

But what I like most is that Dave Chappell of Progress Software (the inventor of the ESB) contributed a two-part article to eBizQ where he explains the most important role of an ESB to implement the ideas I defined in my article. Thank you Dave... Maybe these pictures can help you evangelizing the concept; feel free to use them as you wish.

Some interesting quotes from Dave's article:

  • "...the real sweet spot where an ESB has shown its power and flexibility is in process-oriented, event driven architectures."

  • "...the key to success is to have an architecture that allows for each application to be decoupled from the rest of the SOA by using the ESB as a form of mediation."

  • "...the event-driven interaction style is a major advantage of keeping applications decoupled from one another."

  • "...the applications themselves often need to be written or adapted to this event driven style of interaction."

  • "The course of action taken when a complex pattern of events is identified may vary, but can range from alerting a business user in a Business Activity Monitoring (BAM) dashboard or to invoke a service or a business process via the ESB."

  • "Event-driven architectures are beginning to emerge as the best approach toward implementing a SOA where applications are truly decoupled from each other. Large scale SOA projects using an ESB are broadening the reach of application integration in ways that were never before possible.

  • "...these technologies can all generally be used both standalone and pluggable into anything using Web services interfaces..."


Wednesday, December 13, 2006

SOA and LEGO, do you dare to compare?

SOA is about flexibility, which means the ability to be changed after being built.

Many people compare SOA building blocks (services) with LEGO blocks when evangelizing the concept to the nitwits. See Google, or this blog of Joe McKendrick. Or this one of Jason Bloomberg.

Well, let's try out the analogy. First start building a nice fortress with LEGO blocks. Then after you finished it, just change one little LEGO block somewhere in the middle of the wall. You won't be very happy, I suppose. Not to mention creating a new window or a door. And, o my dear, make the cellar a few feet deeper.

LEGO constructs are easy to be built, but a nightmare to be changed and so have nothing to do with flexibility.

Business people never seem to understand the IT-folks; I know why... do you?

Wednesday, November 29, 2006

ESB as the Global Dataspace

Current ESB (Enterprise Service Bus) infrastructures provide a way of message queuing combined with Web service technologies. That is why the use of an ESB infrastructure is very appropriate to implement EDA and SOA solutions and to combine both styles of architecture. (See How EDA extends SOA and why it is important)

An ESB infrastructure is very well suited to function as the container of the business events to be published. This makes the published business events widely available for subscription. The ESB infrastructure behaves as the enterprise’s global dataspace uniformly accessible by all applications, regardless of location, time and back-end technology. See figure 1.


Figure 1: ESB as a global dataspace

An ESB needn’t be a one-vendor product. As technology homogeneity increases, interoperability increases and the need for product homogeneity decreases. In a federated company multiple service bus products may be in use. This allows for local autonomy. A corporate service bus serves as the global dataspace and supports semantic harmonization for the entire organization. All business events are published in this global dataspace to make them company wide available in a canonical format; of course in a secured way. See figure 2.


Figure 2: ESB as a composite structure


Using common Web service technologies makes propagation of the messages across multiple vendor products relatively easy to implement. See figure 3.


Figure 3: Propagation of events


SOA after the hype

Quotes from an interesting article I came across the other day:

  • "Without solid architecture and governance in place SOA is basically a waste of time."
  • "Another problem is that people are focusing on the "service oriented" rather than the "architecture." However, it's architecture and discipline that will enable SOA to deliver value."
  • "We're hearing too many organizations making really bad decisions -- such as rewriting their entire application portfolio to make it service-enabled...which is exactly the wrong approach."
  • "...customers have to take a step back from their discussions with vendors and make some decisions on their own about how they want to proceed with it."
  • "...it represents more of a cultural change than learning how to take advantage of a new feature."

Read the complete article... and make up your mind!

Monday, November 20, 2006

Why to distinguish between SOA and EDA

Many people think of SOA as synchronous RPC (mostly over Web Services). Others say EDA is SOA. And there are many people who say that the best of EDA and SOA is combined in SOA 2.0.

Everybody will agree that there is a request-and-reply pattern and a publish-and-subscribe pattern. It is easy to see that both patterns are an inverse of each other. In my article How EDA extends SOA and why it is important I explained the differences between the two patterns and when to use the one or the other.

Because of the completely different nature and use of the two patterns, it is necessary to be able to distinguish between the both and to name them. You might say making such a distinction is a universal architectural principle. Combining both of the patterns into an increment of the version number of one of them is - IMHO - not a very clever act. I believe it is appropriate and desirable to use the acronyms SOA and EDA to make this distinction, because SOA and EDA are both positioned in the same architectural domain; SOA focusing on (the decomposition of) business functions and EDA focusing on business events.

Wednesday, November 15, 2006

How EDA extends SOA and why it is important

[Download extended PDF]

See also: Why to distinguish between SOA and EDA


Moving toward on-demand business

Organizations tend to change their structure frequently. The evolving focus on service orientation and globalization will enforce this trend. The world is preparing for network oriented business structures with independent autonomous service providers and service consumers. Parts of the business process will be outsourced to external partners. Departments and business units are transformed to service providers. These service providers no longer focus only internally on the organization, but they are seeking for external markets to offer their services. Everything is moving toward on-demand business where service providers react to impulses – events – from the environment. To excel in a competitive market a high level of autonomy is required, including the freedom to select the appropriate supporting IT-systems. This increasing degree of separation creates a need for loose coupling between application components to be able to have the supported business processes bend unimpeded with the continuously changing composition of the organization structure. To achieve this agility the supporting applications must be agnostic to organizational changes like reshuffling responsibilities and roles, outsourcing or insourcing, splitting up departments or the whole company, fusions and all kinds of other reorganizations. Business processes must not be limited by the supporting IT-systems to smoothly follow all of these organizational changes. If, for instance, part of the process will be outsourced to an external partner, a part of the supporting IT-system will be cut off. The remaining part of the system must start communicating with the external partner. The system must not collapse neither is it desirable that adaption to the new situation costs a lot of money or time. The same is applicable in case of changing partners or in case of insourcing external tasks.

SOA, false promise?

This requires loosely coupled application components to be able to easily put the scissors in the organization structure without disturbing the supporting IT-systems. However, the synchronous command-and-control nature of SOA is a way of tightly coupling application components which doesn’t allow for this kind of flexibility. SOA may be loosely coupled in the technical domain, where common web services technology is used, but it certainly is not in the functional domain where SOA is associated with ‘calling’ foreign (reusable) services and eliminating data redundancy. The availability of services and stored data can be vanished after an act of outsourcing, which may lead to costly consequences and high risks. This has all to do with creating dependencies with SOA. The promise of SOA delivering loose coupling, which typically is asynchronous, could at the functional level be stated as a false promise.

IT-flexibility versus organization flexibility

Of course the use of SOA has benefits. Agility in application construction by using shareable components in a well defined functional decomposition and using standards based technology can have benefits in time to market with concern to the delivery of the application if adequate tools are used. And also restructuring the application in following business process redesign can be of much less effort than in the ‘traditional’ way. The IT-department may gain benefits, which will lead to lower IT-costs for the business and faster delivery.

At the moment SOA is positioned in the market mostly as a type command-and-control architecture at the higher granularity levels of functional decomposition. To achieve loose coupling and autonomy in the context of the previous mentioned organizational evolutions EDA (even-driven architecture) is a more appropriate style of architecture at this level of granularity. EDA provides flexibility directly to the organization itself. With EDA an organization can reorganize without affecting application constructions. Changing the structure of the organization without changing the applications is a promise of EDA. So we are talking about quite a different magnitude of agility.

Granularity

But why is SOA promoted at this level of granularity? The causality of four aspects is in charge. Firstly, SOA by most people is thought of in terms of web services. Secondly, the performance of web services technology at the moment is not appropriate at the lower levels of granularity. Thirdly, web services originate from the request-and-reply pattern, and so are associated with command-and-control solutions. Fourthly, the event-driven model is not well known; people tend to look for solutions in well known domains. Unfortunately the command-and-control pattern is not appropriate at this level. SOA based on synchronous web services might be a good idea in the middle layers of functional decomposition. Here the command-and-control type of interaction may be required and may be in good balance with web services performance. But you have to explicitly investigate it during design phase. So finding the correct context where an SOA might be appropriate is not a trivial job.

When to use SOA and when to use EDA?

In contrast to SOA, EDA provides a way of loose coupling. EDA is not a synchronous command-and-control type of pattern, but just the contrary: an asynchronous publish-and-subscribe type of pattern. The publisher is completely unaware of the subscriber and vice versa; components are loosely coupled in the sense that they only share the semantics of the message.

If you are seeking to support strong cohesion in the business processes, situations where all process steps are under one control, SOA is the way to go. The command-and-control style of SOA - in general – is applicable to:

  • Vertical interaction between the hierarchical layers of functional decomposition
  • Functional request-and-reply processes such as man-machine dialogues; the user waits for an answer
  • Processes with a transactional nature which require commit and rollback facilities
  • Data enrichment in a message to be published to bring the message to its full content in a formal format
If you are seeking to support independency between business process steps, EDA is the way to go. This style of architecture is appropriate in federated and autonomous processing environments. Recognizable situations where EDA might be applicable are:
  • Horizontal communication between tiers in a process chain
  • Workflow type of processes
  • Processes that cross recognizable functional organization borders, external (B2B) as well as internal
To find points of decoupling look for parts of the business process of which you are sure they always will stay together in one organizational unit (strong cohesion, atomic business function). In this way a functional composition of the business will arise. The borderlines between the business functions are the points of decoupling. If atomic transactions cross the decoupling borders, then implement compensating rollback transactions at these points.

Striving for loose coupling – and so for flexibility and agility - always is a good idea at all levels of granularity. So a rule of thumb might be: use loose coupling whenever possible and only use command-and-control if required. All of this with respect to the functional dimension for Both EDA and SOA. Of course these principles always must be challenged with performance aspects like required and feasible response times.

Redundancy: strong design

Loose coupling means independency. Loosely coupled components do not rely on each other. Not even on each others stored data. Each loosely coupled environment maintains its own copy of (a relevant subset of) the data and services. In loosely coupled environments redundancy must not be seen as poor design, but as strong design. Banning redundancy across decoupling borders makes the coupling more tightly. Maintaining redundancy across the decoupling borders makes the loose coupling more robust. EDA is perfectly suited by its nature to support automatic data synchronization mechanisms in redundant environments while maintaining loose coupling.

Visualization

Figure 1: SOA versus EDA

Figure 1 visualizes the relationship between SOA and EDA. The circles at the top of the picture denote decoupling points (events), the linking pins between loosely coupled systems. At these decoupling points components can be connected and disconnected without any change of the connected systems (peers). All data exchange between the domains takes place only at this point and not at the lower levels.
Within a reuse domain (see figure 1) a finer grained EDA may be implemented. The more fine-grained EDA, the more flexible the IT-systems are, but also to smaller the reuse domains will be.

If using web services technology (SOAP) at those points of decoupling combined with a common infrastructure (Enterprise Service Bus), it is possible to easily connect heterogeneous systems. Downstream systems are not only SOAs, but also SOAP-wrapped legacy systems, commercial of the shelf software (COTS), ERP systems and gateways to external systems. Figure 2 visualizes an EDA.


Figure 2: EDA

Components are no longer directly coupled, but connected via decoupling points (events).

Implementation


To implement EDA with web services technology today, an additional SOAP-aware message queuing infrastructure is required, whereas this is not the case for a web services based SOA implementation. SOA in its basic form can be implemented solely by web services over existing network infrastructures like the HTTP-layer. This is where the current ‘SOA-hype’ originated from and this also might be the reason why SOA is overwhelming EDA. Current ESB (Enterprise Service Bus) infrastructures provide a way of message queuing combined with web services technology. That is why the use of an ESB infrastructure is very appropriate to implement EDA and SOA solutions and to combine both styles of architecture.
Evolving web services standards like WS-Eventing, WS-Notification, WS-MetadataExchange, WS-ReliableMessaging, WS-Security, WS-Choreography, and lots more, combined with the emerging SOAP-aware infrastructure components like network devices and operating systems will in future provide much of the ESB-functionality which at the moment we have to obtain from ESB-vendors.

SOA and EDA implementations must be regarded in the context of Business Process Management (BPM). Modern BPM-tools are based on BPEL (Business Process Execution Language). The current BPEL implementation focuses strongly on the command-and-control model, the orchestration of services, and so on SOA. Beside orchestration BPEL - to a certain extend - also supports workflow, a kind of choreography, which goes in the direction of EDA. BPEL, however, has a procedural nature and runtime implementations need a controlling BPEL-engine. This is not a problem in case of SOA, but to achieve the aimed loose coupling of EDA it is. Good support for EDA would rather be a declarative model than a procedural model. A model where the designer – simply said – can connect events to publishers and subscribers by a point-and-click mechanism. Runtime implementations should be independent of a controlling engine, but rather be based on the earlier mentioned web services standards. It is obvious that solutions evolve in this direction. At this moment in time it is appropriate to use SOAP over JMS or other SOAP-based alternatives provided by the ESB. By creating current solutions based on commonly recognized, understood and implemented web services technology the systems will be robust in following technological, economic and organizational (r)evolutions in the future.

Thursday, November 02, 2006

Identity 2.0

As more of our interactions take place online, clearly establishing whom we are has become essential. How do you prove you are a legitimate user, let alone that you should be treated specially? In the sequel to his Identity 2.0 talk, Dick Hardt - Founder & CEO of Sxip Identity - shares his vision for how users and sites will communicate identity.

Watch this very impressive video presentation. Once seen you'll never forget.

Or download the presentation here.

Tuesday, October 31, 2006

What is an ESB?

Mark Richards tells us what an Enterprise Service Bus is, its role, what capabilities it provides, and the various ways an ESB can be implemented. He takes a close look at the JBI specification (JSR-208) and explains what impact it will have with the ESB world. This will teach you how to determine your own specific requirements for an ESB and then match these requirements to the product space.

Watch this entertaining video presentation...


Sunday, October 22, 2006

The worldwide pitfall of SOA

The promise of SOA is better integration, cleaner data and a higher level agility. But the promise of SOA also is decoupling. The decoupling promise is in contradiction with the way most people are promoting SOA: synchronous services calls. The problem with this current SOA-hype is that we are tightly coupling our systems in stead of decoupling. I mean: it is all about reuse of functionality, so "calling" foreign services and rely on foreign data via service calls. This makes the performance of your business process dependent on external entities. That is a way of tight coupling. Be aware of this pitfall. Don't misunderstand me, SOA is not a bad idea. You can rearrange processes rather quickly with reusable building blocks. But on the other hand, the granularity level where the hype wants us to implement SOA - the business process level - is not well fit for reusability and thus dependency. At that level we want to be specific in stead of generic. And we want to be independent on that level. Reusability fits better at the lower levels of granularity. Think of what happens when we have woven our business processes together with reusable components to share functionality and data resources. What will happen when higher management decides for instance to outsource a part of the business or reorganizes the business into value chains including external parties? It will be a hard job to put the scissors in the neatly integrated processes and shared data resources. Our perfectly built SOA will turn into a nightmare.

A better approach at the business process level is to decouple business processes by inversing the grand design:

  • Stop thinking that calling foreign (reusable) services is the best design pattern
  • Embrace data redundancy
  • Concentrate on synchronization
  • Decide what processes in the information domain contain the master data
  • Have the master publish its changes and have your interested processes subscribe to it
Here you start thinking event-driven. It is about reuseable data (events) in stead of reusable services. Some call it SOA 2.0. But unfortunately the hype is still continuing promoting SOA 1.0 (...) at the business process level. So think twice before running after the hype and dare to say "STOP! Wait a minute..." to your CIO.

The inversion of the grand design works as follows. The initiative for data exchange is not taken by the consuming application as in the pattern of calling services, but the producing application takes the initiative. It decouples your applications (and so the supported business processes) and it reduces the load on the data supplier and the network. This also avoids scalability issues. You can add and remove consuming processes as much as you like without effecting any of the other applications. And the same applies to publishing processes. The consumer's datastore can be viewed as a kind of cache which is automatically synchronized with the publisher's datastore in real-time. And at the same time the consumer is completely independent of the availability of the publisher. So no problem to put the scissors in the processes.

A SOAP oriented ESB infrastructure gives you full reliability and security of this process. And above that the dataflows are a source for real-time business activity monitoring, if you like that.

My vision is that you can obtain decoupling (independency), reliability and performance at the (low) cost of redundant data persistency. When you stick to "calling services" you gain benefits at the level of application construction, but at the cost of higher loads, less predictable performance, scalability issues and higher costs in business level reorganizations.

See also: How EDA extends SOA and why it is important for better insight.

Monday, September 11, 2006

SOA governance, what's in a name?

"...it's architecture that drives agility first, not reuse that drives development. Write that on your hand."
"...focus on architecture, which brings agility, and less on reuse."

On Infoworld Dave Linthicum posted two very short articles on the state of SOA governance tools. He is not very amused...(part I, part II)

Linthicum stresses that SOA governance vendors focus too much on software development support and too little on an architecture that brings agility, too little on the ability to leverage foreign services and too little on standards.

I believe he is right. But I want to add yet another viewpoint: SOA governance should also support organizational aspects of the SOA life-cycle. If your company has a centralized software development department with profound mandate, things may go smooth. But in a federated organization with redundant systems, highly delegated ownerships, multi development/deployment departments and full departemental autonomy, things may not go as smooth as you would like. In order to implement an SOA, all departments have to agree together on functionality of common services, on ownership, on mechanisms for semantic harmonization, on security implementations, on performance, on accountability, on coordination processes, on common infrastructures, on error handling and routing and so on. All of these requirements must be fulfilled, otherwise you will not be able to build enterprise wide SOAs, if that's your ambition at all (well, I think it should be). To organize these aspects in a decentralized organization is a tremendous political effort which goes far beyond the capabilities of many CIOs. In practice it's not so much about bringing order in an environment of high entropy, but it's more about surviving in such an environment.

How can SOA governance tools support the requirements of highly decentralized organizations? So, maintaining local autonomy and at the same time leveraging SOA? I think by delivering methodologies, guidelines, standards, sample processes, best practices and development mechanisms that support federation. What might be a good starting point is the idea of merchandizing business events between the autonomous departments and - at this level - focus on synchronisation rather than on reuse of software components.

What do you think?

Saturday, September 09, 2006

Noah takes a photo of himself everyday for 6 years


This posting is completely off-topic. But I'm so fascinated by what this guy produced that I just want to share it. It shows how genius and creativity go together with ultimate simplicity.

Watch the video an listen to the matching music. It's hypnotizing.

Wednesday, September 06, 2006

Why not start with simple events?

There are SOA evangelists and there are EDA evangelists. Some SOA evangelists are starting to discover EDA and some EDA evangelists are starting to discover SOA. Most EDA evangelists concentrate on complex event processing (CEP: recognizing patterns in events) and event stream processing (ESP: take time related actions on patterns in fast streaming event-flows), with David Luckham as their Godfather. Most SOA evangelists struggle with the idea of decoupled one-way communications; "what the heck is an event?" and "don't I loose control?".

But I don't see a focus on the big advantages of using simple events, yet. Forget for a while about explicit correlations between events and pattern recognitions. After you are familiar with events, you can always add complexity to do more sophisticated and exciting things. You don't always need to recognize patterns in event-flows or to process huge numbers of events in very short time-frames. The contrary is true. In most cases simple events will already give a lot of opportunities and above all: ease.

Let me tell you a story

We implemented an ESB infrastructure as a platform to start building SOAs. We are creating roadmaps to implement SOAs. We are looking for pilot projects. We are evangelizing the concepts. But we don't have an SOA yet.
We are also implementing an employee-portal. And the portal uses an enterprise directory to control access, among other things. We also have an SAP-system in which we maintain employee data. And it seemed to us that it would be a good idea to feed the enterprise directory with employee data from SAP when a new employee is employed or when an employee gets retired. What we do now - using our common sense - is publishing the new employee data as a one-way SOAP-message in our ESB. And we also publish a one-way SOAP-message in the ESB when an employee retires. Not a big deal, is it? But guess what... Other departments in our company are starting to ask: "Wow, can we use these published employee data as well? It would save us a lot of work if we didn't need to handle and check all those FTP-files every week. And our database would always be up-to-date." Another department (maintaining work-schedules) asked us if it could be possible to publish the employees that are sick and to publish when they recover. Well, of course, at your service.

You see what happens? We don't have an SOA, but we see arise an EDA without even mentioning the acronym. Isn't that wonderful?

And I have another interesting story

We would like to know the occupation of our trains. These figures are interesting for several reasons. For instance to optimize material planning, but also to recognize trends which may trigger new business opportunities. We designed sensors in the trains to count the number of passengers boarding and leaving the train. These data are parameters to a piece of software that calculates the occupation of the train. The data is planned to be stored in a data warehouse.
But... in stead of collecting records to a file to be loaded into the data warehouse, we designed to publish the calculated occupations directly in real-time as one-way SOAP-messages in an ESB. The data warehouse will be wrapped to collect and store the published data. (You must know that we are working on a mobile infrastructure which gets ESB-components onto the train, which makes it possible to have the software on the trains participating in our global application-infrastructure.)
What is the big deal now? Well, of course I explained that the transport of data using this generic application-infrastructure in place would be much cheaper than any other form of transport. But when I explained that the messages floating in the ESB can be captured by any other application wherever in the organization, for instance by an easy to program little tool to display the occupation of every train in real-time, it became quiet. "So, when there is an obstruction on the railroad, we can see how many passengers will strand at the station... in advance?" Yes sir, you can! It's a free spin off.
"Wow..."

This is all about EDA with simple events. It just happens and it will continue...