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...

Thursday, August 31, 2006

EDA is Lame and SOA is Blind

If you compare EDA and SOA with the human body, you might say that EDA is like your eyes and ears and SOA is like your hands and feet. When your eyes detect a lion jumping on your path, a message is send to your brain which figures out that your feet have to be notified to run.

Amlan Debnath, vice president for Oracle Server Technologies and a evangelist for event-driven architecture, talks about SOA and EDA. Read the clarifying interview...

Sunday, August 27, 2006

Granularity of Services

I notice a misconception spreading around at a large scale between SOA-bloggers and article-writers, even by the great gurus. They keep a discussion alive about the optimal granularity of a service. But they are mixing up services which are functional components, and "Web Services" which is an interface implementation technology.

To me it makes more sense to discuss at which levels of granularity the use of web services technology is appropriate. And that depends on system implementation characteristics such as degree of distribution and heterogeneity and desired openness.

The granularity of functional components "goes to the bottom". It's just common modular and structured design and programming practice, originating from the 70's, every developer should now about. A nice pdf on this subject is available here. So nothing new to SOA. Read, for instance, "Reliable Software through Composite Design" by Glenford J. Myers, 1975.

Or study Yourdon's DFD (Dataflow Diagrams) method; very interesting is part III and chapter 22.

Thursday, August 24, 2006

EDA is not just technical implementation

Some SOA-specialists tend to see events and event-driven architecture as a technical implementation; at a lower level of design. Well, it may be, but it needn't be. I'm thinking of EDA as modeling real-world events; at a higher level - even at a top level - of design. An event is a change of state: a certain condition coming true. Business events are the interesting real-world events that a company wants (has planned, is forced) to respond to. The response to the business event is the business process, which can generate new business events, and which can change over time. Business processes handle the life-cyle of the captured business events. Interesting is that a business event (real-world event we planned to respond to) mostly is stable, while the way we are responding (business process) mostly is not.

What I believe is that you can only start modeling business processes when you know the business events you want to respond to. You can only start modeling SOAs (which might be seen as a way to model business processes) when you defined the business events to focus on.

So in my vision events are not technical elements at all. Fortunately we have an ESB to capture the business events and publish them to all interested business processes which are implemented as SOAs. And fortunately we can use the same ESB to build an environment to monitor the state of our business in real-time. This state is represented by the collection of current business events. All based on open standards. Yes, that may be called technical, but with huge business benefits.

Tuesday, August 22, 2006

The starting point for SOA is...

I just read a blog of Steve Jones, called The starting point for SOA is... Where he comments a blog of CIO Magazine by Christopher Koch. Let me join the party.

I think events happening in the real world should be the starting point of an SOA-design. Real-world events are the triggers for the business processes by nature. When you support a business process with IT, then of course you must get the event into your IT-system. You may call this a service, but it can be all kinds of components (both software and hardware). What we do is starting with modeling the events. We describe events in canonical formats and we publish the events in a "global dataspace" (implemented by an ESB). We use web services interface technology to publish these events. Again, you may call these publishers services, but I'm not sure if that is always appropriate. And yes, the publisher uses a web service interface. But I wouldn't call that an SOA yet. In my opinion SOA starts with recognizing the real-world events (what to react on) that will be the basis for defining generic functional building blocks to compose SOAs (how to react; the process). It's a kind of contract-first design.

Modeling events is what we call an event-driven architecture (EDA), the layer between the real-world events and artificial IT-systems (SOA). So (business) events are our starting point. It's the way we obtain optimal alignment of our business and the supporting IT-systems.

Here is how the entire design-model looks:







Speak aloud (experiment)

Friday, August 18, 2006

In Search of Insight - the future of IT

Charles Nicholls wrote:

It is akin to asking you to drive a car where your dashboard has a speedometer showing the average speed yesterday, and the fuel gauge gives the fuel remaining in the tank at the end of last week. Oh, and you can only use the rear view mirror because there is no windscreen!
Clearly you wouldn’t drive your car like this – well at least not for long! But this is how we run businesses today, based on a rearward view of the business.

And this:
A key component of SOA is the underlying asynchronous message infrastructure; an Enterprise Service Bus (ESB) or Enterprise Application Integration (EAI) system. ESB’s are typically based on Web Services standards and provide foundational services for SOA via an event driven messaging engine.
At the heart of this architecture are events, specifically XML messages. Ultimately the processes themselves, perhaps managed in a Business Process Management tool, are actioned by events.

I read Nicholls' paper on the future of IT and I felt very delighted.

Friday, August 11, 2006

The Da Vinci Code and EDA

What has the Da Vinci Code to do with EDA?

I came across this link. Click on Play Video and enjoy...

Friday, August 04, 2006

Are you an old-style or a new-style developer?

Heard what Gartner said back in 2005 (or was it earlier)?

  • The best designers of SOA applications are the architects that understand EDA
And another quote of them:
  • Learn EDA to best understand SOA
I absolutely agree with Gartner; developers need to break out of synchronous request-reply thinking. Let me explain...

When I read all those SOA articles and hear all those SOA-gurus talk enthusiastically I see only part of the story, and unfortunately not the most promising part. I'm not sure if those gurus are driving us to deliver the right - or better: complete - designs yet. When they tell you about "calling services" they think RPC-style and that is old-style. The thing is that we have to think in events, even if we decide to implement a request/reply call-stack. To be able to judge when to "call a service" in stead of publishing an event, you need to know EDA. Events are the starting point of the design, the services are not. You don't agree? Well, than you are an old-style developer.

Did you ever notice that EDA is an inverse of RPC-style SOA? (RPC-style SOA, may I nowadays call that SOA 1.0 since the raise of SOA 2.0, huh?) Okay: in EDA the data-supplier takes the initiative in contrast to RPC-SOA where the consumer does. In EDA the supplier and consumer do not know anything of each others existence, they are decoupled. On the other hand in RPC-SOA the consumer calls the supplier by name and even waits for a reply. If the reply doesn't come, the consumer falls into an error procedure; that really is tightly coupled, isn't it? Not in your case? You use asynchronous queues to perform service requests? Well, you are tricking around, probably for good reasons, but it is not EDA; EDA is asynchronous by nature, you can't trick it to act synchronously. EDA has focus on data (message) while RPC-SOA has focus on function (service). Want more? EDA is declarative while RPC-SOA is procedural. That is in EDA you can tick to connect events to processes; in RPC-SOA you built algoritms with If-Then-Else and DoCase constructs in order to fire the appropriate calls. You don't agree? Okay, old-style developer.

What about granularity? How big must a service be? Our SOA-gurus say: not too big and not too small. Depending on what? Some gurus say: depending on performance. I think they are mixing up services which are functional components, and "Web Services" which is an interface implementation technology. To me it makes more sense to ask at which levels of granularity the use of web services technology is appropriate. And that depends on system implementation characteristics such as degree of distribution and heterogeneity and desired openness. So in fact there is no conceptual granularity-issue. You start - top down - designing focused on business events, which are events with business significance. When you reach a level too fine grained to recognize neat real-world events you leave the business oriented approach and enter the application oriented approach where RPC-SOA may become adequate. This is the level to compose adaptive business solutions - i.e. ways to handle business events - using independent generic components. So at this level you start creating SOA building blocks to construct modular applications. Though, that doesn't mean you must drop the even-driven paradigm here, preferably not. Don't agree? You old-style delevoper.

As you might have read between the lines, EDA has affinity with business processes and SOA has affinity with application construction. Taking into account that the EDA approach is an inverse of the well known SOA approach you might say the two paradigms are complements by nature.

Do you recognize the huge business potential of asynchronous, event oriented design? And do you believe that EDA by its nature will be the paradigm to realize the ultimate alignment of business processes and the supporting IT-systems? That the ultimate layer between our real world-events and artificial application constructs will be an EDA? And do you recognize the possibilities offered by the current IT-technology evolutions to support this paradigm? Then you truly are a new-style developer.

Wednesday, August 02, 2006

Context Sensitive Subscription - a pattern

We have a lot of trains - over 2000. On these trains we also have a lot of personnel like drivers and conductors. A main characteristic is that the trains and the personnel move across the country and so their locations change as time progresses. Another characteristic is that the movements of the physical entities do not have a stable pattern; one day a train runs from north to south and the next day the same physical train may run from east to west. And personnel change trains every few hours and they also have days off. This means that the context is changing all the time.

Trains have standard applications for instance to collect data about delays of other trains and to provide the passengers with relevant travel information. The same applies for the PDA's of the personnel on duty. So there are thousands of instances of the same applications deployed and running. Now it's getting interesting: how do I distinguish between the different instances of the same application when it comes to communicating with these applications? Sending messages from these moving application instances in changing contexts is not a big deal, but consuming just the right messages relevant in the specific and frequently changing context is another story.

All of our new application system designs take the event-driven architecture paradigm as a base. We are very keen on that. So what we need is a way to implement context sensitive subscriptions. We keep the application-layer independent from the network-layer by using an Enterprise Service Bus between the two layers. We therefore don't allow to identify or address our applications at the IP-level, so a unique logical identifier (name) per instance is required.

We already use the context aware services of Appear Networks (see video) to be able to deploy (or eliminate) business software depending on the - predefined - context of the concerning devices (owner, time, role, location). In trains, for instance, these context aware services may take advantage of on-board GPS-equipment. A pre-installed generic client initiates this process. Based on the use of these context aware services that we already got, we developed a very simple design-pattern for context sensitive subscriptions. Here is how it works...


The idea is as follows:

  1. There are a lot of instances of the same application (one on every device or train)
  2. Every instance of the application has the same name (identifier) on every device or train
  3. To be able to have the infrastructure route the correct messages to the correct application instances, the instances must be distinguishable
  4. Use a uniquely identifiable proxy (Subscriber) in front of the application instance (id based on predefined context characteristics)
  5. On change of context (published by context services) generate a new proxy based on a template - including subscription parameters and an identifier both based on the context - and replace to old proxy
  6. Have the proxy subscribe itself to the relevant publications (may be content based)
So the idea is to re-subscribe. In this pattern the "context sensitive" part is not a filter but a context-unique subscriber. We want the endpoints only to receive relevant messages. This makes the solution more scalable and - compared to a filter solution - it decreases the load on the mobile network and at the endpoints tremendously.

The pattern is not only of use in wireless mobile environments, but also in plug-and-play devices like gates and information displays on our railway stations. All gates on all stations function in the same way with the same software, but they differ in location. The same applies to the information displays. To be able to receive only the messages relevant for their own specific location, the devices must be uniquely identifiable at the application-level.

It as an enormous effort to pre-configure all those devices separately for the specific location where every device is planned to be installed. It's much cheaper and much more flexible when all devices are generically configured with general software such as location detection software (e.g. context aware service) and context sensitive subscription software. The location detection software may use detection appliances like a GPS-receiver, or it may make use of a simple user-interface to get a location-code. Once the location is determined, the generic software in the device generates a context sensitive subscription. In this way it doesn't matter which device is installed at which location. And devices can be moved to other locations without reconfiguring the software.

An example of the use of this pattern is an information display at a main railway station, which can be installed on the fly and can show information of other main stations in the country by a simply entering the desired location-code.

Another example is a traveler who buys a ticket via Internet. The Internet application issues an event which is published on the ESB. The ESB supports some enrichment by adding the location-codes of the railway stations on the route. Only the gates on this route receive and store the message of this traveler and allow passage (only today and only once) when the traveler puts his id-card in the reader of the gate; without any travel-rights loaded on the id-card and without querying a central database.

At this very moment of writing we are merely discussing the abstract - implementation agnostic - pattern of context sensitive subscriptions; the idea. But we think that an implementation of this pattern will bring us a lot of flexibility and ease.

Please feel free to react.