Comments
yourfanat wrote: I am using another tool for Oracle developers - dbForge Studio for Oracle. This IDE has lots of usefull features, among them: oracle designer, code competion and formatter, query builder, debugger, profiler, erxport/import, reports and many others. The latest version supports Oracle 12C. More information here.
Cloud Computing
Conference & Expo
November 2-4, 2009 NYC
Register Today and SAVE !..

2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
In many cases, the end of the year gives you time to step back and take stock of the last 12 months. This is when many of us take a hard look at what worked and what did not, complete performance reviews, and formulate plans for the coming year. For me, it is all of those things plus a time when I u...
SYS-CON.TV
SOA Patterns: Basic Structural Patterns – Part 3
The Workflodize and Edge Component Patterns

As Figure 11 demonstrates, the main idea behind adding an Edge Component is separation of concerns. The Edge Component takes care of all the cross-cutting concerns and other concerns that are not in the core business of the service. These concerns can include areas such as load balancing, format transformations, and auditing. The business logic of the service is then handled in another component that focuses solely on the business logic and remains free of the other concerns. This separation allows supporting all the scenarios mentioned earlier since the separation allows each component to evolve at its own pace. For example, to support a new technology (scenario 1) just add an additional edge component, but the business logic doesn't have to change. When you change the behavior of the business logic and add a new usage plan (scenario 2), the Edge component doesn't change.

In a sense the Edge Component Pattern can be used to provide a façade, proxy and AOP patterns for SOA.

We still have to show how the problem in scenario 3 of implementing cross-cutting concerns across services can be taken care of. The best approach for doing that is to take the single responsibility principle further and remember that the Edge Component is, indeed, a component and it doesn't have to map to a single "monolith" class. For example, you can apply a pipes and filters architectural style and chain several classes/components, each dealing with a specific concern, to create incoming or outgoing pipe-lines. For example, Figure 12 shows a sample Edge Component that applies a validation filter to make sure the message is correctly formatted. Then there's a transformation filter to translate an external contract format into an internal one. Last, there's a routing filter to send the message to the correct component within the service. These subcomponents can be reused from service to service as needed as well as change and evolve independently.

While it is tempting to define an inner contract between the Edge Component and the Service at the onset, there is no real reason to do that unless, maybe, you have to support multiple external contracts (be weary of implementing a contract per consumer though - see PTP Integration anti-pattern). When the service evolves and newer versions of the contract are created like in scenario 1, such as adding a new technology, you may have to add inner contract when you still want to support the older versions of the external one.

The edge component is very useful and I've introduced it in most of the SOA projects I architected. Many of the structural patterns mentioned in this book expand and build on the Edge Component Pattern.

Let's take a look at the technological aspects of the Edge Component Pattern.

Technology Mapping
The technology mapping section takes a brief look at what it means to implement the pattern using existing technologies as well as mention places where technologies implement the pattern.

There is no technology that will take care of all the concerns the Edge Component can fulfill automatically. The upside is that no technology that I know of prevents you from implementing the Edge Component Pattern and some technologies will even handle some of the concerns for you.

For example, JAX-WS or Windows Communication Foundation (WCF) basically implement the Edge Component pattern for you, but they only handle lower-level concerns, which they sometimes call bindings. The concerns handled by JAX-WS and WCF are those mentioned in the various WS* standards; for example, WCF can handle MTOM encoding or Security for you. However, as I already mentioned, you still need to code high-level concerns such as routing and contract translations by yourself.

An interesting technology option is a Java engine called Restlet. Restlet has a few built-in classes that sets it as a good example for implementing the Edge Component Pattern.

Edge Component Example - the Restlet Engine
The Restlet engine by Noelios Consulting, which is a Java library for implementing RESTful services, has some built-in classes, such as filter and router, that allow for easily building an Edge Component. Consider the example in Figure 13.

Figure 13 shows a possible Edge configuration on an Orders service whose contract has two operations: getLast, which returns the last order, and getAll, which returns all the orders for a specific customer. However, before the call actually makes it to the business logic we have to log it, handle statuses or problems, then make sure the correct host was used and finally route the call to the appropriate business functionality. Adding an Edge Component lets us achieve all that without affecting the business logic, which just processes the business requests.

Listing 2 provides an excerpt of the above-mentioned configuration in code.

As we've seen, The Edge Component Pattern is supported by all current technologies and even implemented internally by some of them. You can take a look at the Further reading section at the end of the chapter for links to resources that expand on the technologies mentioned in this section.

Quality Attribute Scenarios
The quality attribute scenarios section talks about the architectural benefits of utilizing patterns from the requirements perspective. Most of the architectural requirements are described from the perspective of quality attributes (scalability, flexibility, performance etc.), through the use of scenarios where these attributes are manifested. The scenarios can also be used as a reference for situations where the pattern is applicable.

The Edge Component Pattern can be associated with a lot of quality attributes. Most of these attributes are the result of applying the Edge Component Pattern along with another pattern. There are, however, two quality attributes that are directly related to the Edge Component Pattern. The first is flexibility - making it easy to change and enhance the external properties of the service without affecting the business logic. The second is maintainability - separation of concerns makes it easy to understand what each component is doing. Recall the three sample scenarios - adding a new technology to an existing service, changing business behavior without changing the contract, and solving cross-cutting concerns only once - with the Edge Component in place, we were able to solve the problem without affecting the rest of the solution or at least minimizing it. Table 2 shows a couple of sample scenarios for using the Edge Component.

Quality Attribute (level1)

Quality Attribute (level2)

Sample Scenario

Maintainability

Backward Compatibility

As contracts evolve, the services should be able to support consumers using older versions of the contract (at least the last 2 revisions)

Flexibility

Extension points

Within the next year the customer is expecting to need SOX compliance and add auditing across the board

The Edge Pattern is the last of the basic structural patterns for SOA. To wrap this excerpt up, let's take a look at the patterns that were covered - before we take a look at additional structural pattern for  availability and scalability patterns.

Summary
This excerpt dealt with a few of the basic structuring patterns for building services. The patterns covered were:

  • Edge Component: Separate interface (contract) from implementation to enable flexibility and maintainability
  • ServiceHost: Make a common wrapper to host service instances and reuse across services
  • ActiveService: Have at least one independent thread in the service so it can initiate
  • Transactional Service: Handles messages inside a transaction to gracefully recover from crashes
  • Workflodize: Add a workflow inside the service for added flexibility

Reference

1. Web service - is a method that is exposed over http. This is an unfortunate term since it overloads the word service for something that can easily be abused to create

•   •   •

This article is based on the book SOA Patterns (http://www.manning.com/rotem) scheduled to print February 2009. This article is courtesy of Manning Publications (http://www.manning.com). The ebook is available and sold exclusively through Manning Publications.

About Arnon Rotem-Gal-Oz
For the past 10 years Arnon Rotem-Gal-Oz has been an architecture and system designer of large distributed systems including C4ISR systems, IP customer care and billing systems, and BI engines. He has experience with a variety of technologies (.Net, J2EE, CORBA, COM+, X-Windows) on diverse platforms (Unix, Windows, Dos, AS/400). He currently works for Rafael as the Biometric line development manager.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

SOA World Latest Stories
In his session at 20th Cloud Expo, Mike Johnston, an infrastructure engineer at Supergiant.io, discussed how to use Kubernetes to set up a SaaS infrastructure for your business. Mike Johnston is an infrastructure engineer at Supergiant.io with over 12 years of experience designing, dep...
SYS-CON Events announced today that DatacenterDynamics has been named “Media Sponsor” of SYS-CON's 18th International Cloud Expo, which will take place on June 7–9, 2016, at the Javits Center in New York City, NY. DatacenterDynamics is a brand of DCD Group, a global B2B media and publ...
Most DevOps journeys involve several phases of maturity. Research shows that the inflection point where organizations begin to see maximum value is when they implement tight integration deploying their code to their infrastructure. Success at this level is the last barrier to at-will d...
DevOpsSummit New York 2018, colocated with CloudEXPO | DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City. Digital Transformation (DX) is a major focus with the introduction of DXWorldEXPO within the program. Successful transformation requires a laser focus ...
"We do one of the best file systems in the world. We learned how to deal with Big Data many years ago and we implemented this knowledge into our software," explained Jakub Ratajczak, Business Development Manager at MooseFS, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8...
CloudEXPO New York 2018, colocated with DXWorldEXPO New York 2018 will be held November 11-13, 2018, in New York City and will bring together Cloud Computing, FinTech and Blockchain, Digital Transformation, Big Data, Internet of Things, DevOps, AI, Machine Learning and WebRTC to one l...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE