|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON Web Services From Blueprint to Skyscraper
Web services and SOA revisited
By: Joseph Marques
Jan. 4, 2005 12:00 AM
As many people correctly predicted, Web services and their corresponding service-oriented architecture (SOA) have proven their promise. Companies and businesses are starting to not only integrate new components and technologies, but are also opening up back-end systems and legacy processes. The former is helping to end compatibility and integration issues of the past while the latter is working to foster growth and more forward-thinking ideas, thus exempting the need to waste time on costly rewrites of existing technology. Web services do not solely add benefits to individual enterprises; they also help to speed partnerships through quicker integration across businesses. This is a direct result of the abstract way a Web service describes itself, as it is almost completely agnostic of both medium and platform. So it is no longer a requirement for companies that wish to employ business to business (B2B) services to agree on a common language, infrastructure, or tool anymore. In this way, it is clear that Web services have been a primary player in a large paradigm shift, moving the emphasis from a technology-centric world to one that can focus purely on the business problem at hand. The success of Web services and SOA means that companies want to build more complex systems, and need to construct blueprints detailing how the different systems link together. A Map, Not a Route Thinking About The Big Picture Furthermore, no matter how well architected a system is, if the parts that produce the whole have been neglected, the deficiencies are guaranteed to show up in the final product. A Web service doesn't hide implementation issues; it magnifies them and opens up the problem for all the world to see. In other words, no tool today is going to make something happen magically, or turn a poorly architected system into a wonderfully coherent and understandable one. To reiterate, Web services provide the pathways, but not the specific direction. Making the Blueprint a Reality WebSphere BI is actually a suite of products that can model and analyze scenarios at the business process layer, not solely at the application layer as the seasoned developer is used to. Through something known as the business process engine, applications are loosely coupled with one another in tremendously flexible ways. Now, instead of statically coding the order in which applications or processes are called, instead of writing custom wrappers or communications connectors, instead of arduously and awkwardly writing exception-handling routines at varying levels of granularity, WebSphere BI brings everything together. It is an easily understood and quickly adaptable environment that provides the business analysts and developers with a tool of immeasurable value. Think of all of the factors that go into writing even small applications, which may or may not be part of a larger architecture. You need to worry about design issues, reusability and maintainability, exception handling and user-input validation, support for transactions, authorization and authentication, encryption, chokepoints that require optimizations, hidden and/or missed business rules, changing business rules, etc. The list goes on and on. The point here is that with such a diverse and complex set of issues that must be addressed, there is a high probability that mistakes will be made along the way. Moreover, because so many companies are finding ways to reuse each other's services to cut costs or to share data because of mergers or partnerships, there has been an increasingly pressing necessity to find a solution that quickly adapts to these highly dynamic business models. It cannot be stressed enough just how important understanding the big picture is. Look No Further Parallelism of Tasks However, what happens if one or more of the processes were synchronous? If a call into a method didn't immediately return, and was blocked until its completion? Essentially, it then requires the use of separate threads. After encasing each synchronous method in a lightweight thread wrapper (see Listing 2), they could be started and forgotten about just as in the asynchronous scenario (see Listing 3). Any way you look at it, there is still going to be a level of indirection. A process will have to complete and then either explicitly notify the original caller of its results, or perhaps somehow write the result to a well-known location that the caller can later poll. This may not sound too bad for the case of a simple business process where the control flow is relatively uncomplicated. However, what happens in situations where a parallel series of tasks is nested within a sequential series of tasks, which is in turn just a subtask of another series of parallel tasks? For a very complex process this could be a veritable nightmare to program by hand at the application level. There are two tools from the WebSphere BI suite that make dealing with parallel and complex nesting of tasks simple. A business analyst is going to tend to want to use the WebSphere BI Modeler tool while a developer would lean towards Process Choreographer, which is built right into WebSphere Studio Application Developer Integration Edition. Modeler is a high-level tool and does not attempt to map a process flow to any implementation, whereas Process Choreographer does. Aside from that, each tool provides a similar graphical front end, which makes working with parallel tasks a simple matter of visualizing the task and dragging and dropping components onto a palette. Figure 1 shows a WebSphere BI Process Choreographer rendering of a complex business model including both parallel and sequential processing and nested tasks, some of which require manual intervention. It was written using Process Choreographer in less than three minutes! With just a few clicks and drags, a process can be structured with highly complex control flow, composed of both synchronous and asynchronous processes. Horizontal blue lines with a shaded gray background define the parallel processing parts, whereas those grouped within a solid white background define tasks to be executed in series. When looking at it, one can clearly see that a great deal of the power and flexibility comes from the fact that links can be drawn explicitly from the output parameters of one service to the input parameters of another. In other words, the feedback mechanisms through polling and/or writing to a globally well-known location are all handled as part of the business process itself thanks to BPEL. The business process engine (the infrastructure that will eventually be executing the model) seamlessly keeps track of all appropriately labeled, contextually relevant data that needs to be communicated between two or more cooperating services, regardless of whether these services are local or hosted by external business partners. Compensation Handler The BPEL language, however, has again come to the rescue with the compensation activity. Here a "reverse" action can be programmed for any given scope within a process. If some business rule fails or a fault is generated, a series of compensation activities can automatically take place, rolling back the process to some previous, stable state. The process engine ensures that the activities are called in the correct reverse order to completely undo all uncommitted or unfinished work up until that point, regardless of whether this happened in a process that spans seconds, hours, days, weeks, or even months. The duration of the process is not really an issue anymore; the tools focus on the interaction. You do not directly see the compensation handlers in Figure 1, but the handlers can be and are associated with some task or scope. And no, these compensation activities are not exactly the same as your good old exception handlers. As I said above, they are associated with long-running business processes, not just segments of code. They go on to further dwarf their historic counterparts with their ability to span disparate services boundaries. It cannot be denied that time is saved through the ability to construct these models and all their levels of complex flow control through an intuitive, graphical environment, which can also explain why problems with maintenance would be dramatically decreased too. If a part of the model changes down the line and requires slightly different compensation activities, or needs more or less communication to or from another process, trying to look at the hundreds if not thousands of lines of code that it would take to accurately represent the entire model (had this been written by hand) should be frightening. Again, the fact that everything can be configured and quickly changed through this graphical representation not only helps to make it possible to write and maintain complex business processes, but also helps to make it simpler for fewer technical personnel, such as the business analyst, to validate and verify that each model correctly represents what happens or what needs to happen in real life. Remember how long it took for me to create the process in Figure 1? That is not necessarily uncharacteristic of the time it would take to update the model in the future. Did someone say "on demand"? Forward Thinking Staff Activity Figure 2 shows you exactly how this queue is used. An employee could log into the system and first "claim" the task; in other words, that he or she is assigned the manual work and promises to perform the required user intervention. Once the line item is claimed, the person can choose to perform the work needed, view additional information about the current item, return it to the pool for a different employee to pick up, or even transfer it to someone else who might need to do more work on it. From a modeling perspective, Figure 2 shows just how easy this is to set up. The staff activity was created just like any other design element, and so is effortlessly dropped onto the palette and quickly incorporated into the complex process. Furthermore, by integrating these manual activities into long-running processes, there is no concept of blocking in the traditional sense. The next process or service in the flow of the model is no longer waiting indefinitely to receive user data, wasting precious CPU cycles and forcing it to repeatedly switch contexts back and forth between services that have no data yet to receive. This common notion in complex models has been developed into its own feature with the full capabilities of any synchronous process (one that executes on its own, without user interaction) the matter of synchronicity is now delegated to the staff personnel interacting with the system. Java Snippet For any other shortcomings of the BPEL standard, IBM solved the problem with the Java snippet. Each snippet is compiled as a method within a Java class that is attached to the actual business process itself. Since RMI isn't actually used in this case, a Java snippet can be a form of optimization. Yes, this entire article does revolve around the fact that Web services are great for reuse, integration, asynchronous modeling, etc. However, it cannot be ignored that Web services projects come at a particular cost. Deserialization and parsing of incoming messages, as well as serialization of outgoing messages (the three major steps in Web services communications) come at a strikingly high cost, compared to other existing methodologies. Sometimes, if the cost cannot be justified, or simply cannot be ignored because of some critical functionality or chokepoint in the system, IBM's BPEL engine seizes the day and lets you refactor that slow running process into a piece of Java code, which is executed within the same container as the processing engine, has direct access to any variables in scope in the process, and can still make calls out to external resources such as databases, Web sites, or EJBs, etc. There is complete flexibility. Skyscrapers, not Mazes Where to Proceed WEBSPHERE LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING WEBSPHERE NEWS
|
|||||||||||||||||||||||||||||||||