Comments
litl_phil wrote: While it's nice that Google and Acer share the vision of cloud-based computing, it's also worth noting that we at litl already have a webbook on the market (available at litl.com) that runs our own cloud-based OS. Unlike Chrome, litlOS is focused on creating a new and better web experience for the home, so we don't have the usual browser interface, we have our own innovative UI. In conjunction with easel mode (litl's inverted-V position) and our growing cohort of litl channels (special apps t...
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
Everyone wants to lower their capital expenditures and increase operational efficiency - it's a sign of the times. The economy of the past 12 - 18 months has forced all organizations to do more with less and become more efficient. While everyone can identify with the request to do more with less, th...
SYS-CON.TV
SOA Patterns: Basic Structural Patterns - Part 1
Solving some of the more common issues related to services

How can an Active Service Pattern help us solve the problems mentioned earlier? As Pat Morita playing Mr. Miyagi said in "Karate Kid" - "Best defense: no be there." If you want to avoid waiting for another service, your best defense is not to get to that situation in the first place; you can actively, periodically, go and fetch data from other services to refresh your caches. You can also save other services the trouble and proactively publish your own state changes. Caching data locally can seem to induce a data duplication problem but it doesn't (see callout for details).

Caching and the Data Duplication Problem
I am sure that several of you, especially those of you with a database background, who read the suggestion to actively go and fetch and cache data from remote services, jumped out of your seats and questioned my sanity for promoting data duplication. However, the way I see it, this is not really the same data. The data that is cached in a service is that service view of the data. It can be aggregated, processed, or otherwise altered to fit the service needs. Naturally, one caveat you must keep in mind is that the service that caches the data is not the master of the data.

A thread with a timer can take care of most of the other temporal events (you can have a timer per event if you have few events or wake up every known interval, see what events needs to be handled, and process them if you have a lot of possible events).

A thread in the Edge Component(s) is a good way to deal with contract-related temporal issues (e.g., make sure we publish state on time, timeouts, etc.), while a thread on the service takes care of purely business-related concerns such as sending monthly bills or handling incoming message queues.

Let's look at how the situation shown in Figure 3 can be redesigned using the Active Service Pattern. To recap, Figure 3 shows a flow for a proposals service that needs to get external data from an internal customer service and an external publisher service to produce a pro-forma for a customer (see Figure 5). Now the Proposals service actively goes to fetch discounts on a regular basis and caches the results, thus when a request to produce a pro-forma arrives, the proposal service can immediately calculate the discount and return a reply more quickly, plus it doesn't depend on the external services to be there when the request for producing the pro-forma arrives. Using Active Service, the coupling between the proposals service and the other services are decoupled in time.

The Active Service Pattern is mostly a mindset pattern and doesn't have a lot of technological implications.

Technology Mapping
The technology mapping section usually talks about how the pattern is implemented using SOA-related technology; however, since there aren't real technological challenges in implementing the Active Service Pattern this section will be brief.

The technological idea behind the Active Service Pattern is simply to have an active thread on the service and/or the Edge Component that will provide some specific functionality that you will have to code. Basically, the Active Service Pattern relies on threading technologies that are available in any language you may want to use. The real trick is to decide what you want to do with this thread. The previous section showed some ideas for that such as caching data from other services and handling recurring reports.

The next question is when do you want to use the Active Service Pattern? Let's look at few scenarios that may make us consider this pattern.

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 the scenarios where these attributes are manifested. The scenarios can also be used as a reference for situations where the pattern is applicable.

Active Service is the prerequisite for few other patterns such as decoupled invocation and blogjecting watchdog mentioned earlier, and those patterns help handle many quality attributes such as reliability and availability. Nevertheless, even applied alone the Active Service Pattern helps satisfy several quality attributes.

Active Service helps satisfy latency aspects by allowing data to already be available for the service to consume. It helps with deadlines by making sure that the service will perform its tasks when needed in order to meet deadlines (such as producing monthly bills on time). Another quality attribute that benefits from the Active Service Pattern is availability, since polling other services and caching their data means the service's availability is less dependent on other services availability.

Table 3 lists a few sample scenarios where the Active Service Pattern can help.

Quality Attribute (level1)

Quality Attribute (level2)

Sample Scenario

Performance

Latency

Under normal conditions evaluating the profitability of an offer will take no more than 2 seconds

Performance

Deadline

Under load and normal conditions the system can update stock prices at least twice a second

Availability

Uptime

While disconnected  from the WAN, the users can still produce quotations

The architectural scenarios that can make us consider using the Active Service pattern.

This excerpt dealt with few of the basic structuring patterns for building services: ServiceHost, which makes a common wrapper to host service instances and reuse across services, and ActiveService, which has at least one independent thread in the service so it can initiate

Resources

  • Liskov, B. Data Abstraction and Hierarch [Conference] // Proc. of OOPSLA conference.1988.
  • Anderson, R.W., and Ciruli, D. Scaling SOA with Distributed Computing [Journal] // Dr. Dobb's Journal. - 2006.

•   •   •

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
If you are like me, you are regularly receiving unsolicited email from various quarters, telling you about the latest and greatest SEO solutions on the planet. Just buy the book, or guide, or download the promotional whitepaper and this expert will offer you the latest "Secrets" to sea...
There's a lot of talk about how we need to focus on our buyers' issues and provide them educational insights to help them learn what they need to know to make buying decisions. Heck, I say it in my book...in several places, I think. I've said it on this blog, and I'll continue to say i...
This past weekend I set out explore some of the extension capabilities of Google Wave. One of the weaknesses that have been identified by many is the lack of integration with email. For me, in particular, because Wave is new, many Waves are being orphaned as those playing and testing o...
More good news for cloud computing! Google last week released its once mysterious Chrome Operating System to open source. Chrome OS, available in 2010 – is a web-based operating system that promises to boot up super-fast on a netbook – way faster than the time it takes to start your ba...
In CloudBerry Lab we are striving to make our customer service better. In this competitive market with the abundance of free offerings this is the only way to stay afloat. One of the ways to keep customers happy is to be very responsive when it comes to support request resolution. Shou...
We talk a lot about social media on Marketing Trenches. And for good reason – Social media seems to be at least one item on the agenda for about 90% of the meetings we have these days. Everyone wants to run 100 miles an hour to do something on Facebook, LinkedIn and Twitter. I wrote...
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