This Article is About
pitfalls
Soa: Data Caching To Avoid Performance Pitfalls
Join 1000's of Authors at StreetArticles Today!

Soa: Data Caching to Avoid Performance Pitfalls

Service-Oriented Architecture (SOA) provides an attractive alternative to conventional, monolithic applications. With a shared, multi-tiered infrastructure comprised of enterprise business services, SOA is increasingly seen as a way to improve agility, enhance productivity, reduce costs, and achieve full interoperability. Those benefits are attractive to the many organizations fighting for competitive advantage in a tough global economy.

Flexibility vs. Performance

While SOA can yield desirable flexibility, the downside is often decreased performance. In this article, we focus on data access in an SOA and prescribe a way for architects to avoid performance compromises. Performance considerations are a key part of a successful SOA strategy. Stand-alone applications have the advantage of being isolated and tunable without impacting other applications. In an SOA, all the applications share a common infrastructure and common services. As the number of applications in the SOA increases, shared services become the bottleneck, particularly the services that access databases. What might not appear to be a problem in the early stages turns into a production nightmare at the worst time, impacting many or all the applications, not just the last one. This particularly causes problems for those applications built to deliver instantaneous response, and large-scale applications with high throughput demands, especially during peak loads.

Making SOA work without a performance penalty requires careful consideration of where and how data is accessed. To begin to see how performance can be recovered by carefully architecting data management, consider the layers of processing involved in SOA.

Although terminology may vary, an SOA is typically composed of three processing layers:

- The presentation tier interacts with users and calls upon services—either directly or, more likely, indirectly— through a business process.

- The middle tier executes business processes, business services, and data access services.

- The enterprise data tier consists of the existing data sources and packaged applications.

Applications in an SOA are referred to as composite applications because they’re “composed” of middle-tier services. Essentially, an application isn’t a static collection of compiled logic but a more dynamic invocation or orchestration of shared services that create a unique application from the user’s perspective. A tool is needed that enables developers to build composite applications by graphically wiring together services.

Since no application logic executes on the client’s workstation, the presentation tier is most likely using a Web browser-based user interface, often referred to as a thin client. Any status or “state” of the conversation between the user and the application must be stored in the middle tier and made available to any service involved in the business flow. Services can take many forms in an SOA, generally encapsulating a logical unit of functionality that can be reused across applications.

Services can also be comprised of other services, making it possible to assemble higher-level composite services that map to business processes.

Data services deliver enterprise data through a service interface independent of the source of the data. Data access can be highly concentrated, as multiple applications converge on the same enterprise databases and additional data stores are created in the middle tier to support the SOA infrastructure (such as for session state). Access to enterprise data is where performance problems are likely to occur, due to the concentration of requests through a small number of data access services, and limited network bandwidth. This article outlines a solution that injects high performance into data services using middle-tier caching technologies.

Data Caching

In any application development, including SOA, there are many caching solutions available across the tiers and technologies used. Caches are used to minimize the amount of traffic and latency between the service using the cache and the underlying data provider. The data provider could be the back-end data store directly or it could be a data access service. A cost is associated with each call from a service to its data provider. If this cost can impact the performance or scalability of the service and the data volatility from the source permits, it’s possible to cache the data for some time and make use of it without retrieving it again.

The challenge with the introduction of any additional caching between the enterprise data store and the user of the SOA application is the potential for stale data. The introduction of caching means that either the caching solution itself needs to address consistency with its parent data provider or the developer must add metadata and application logic to properly leverage the caching solution and address the potential for stale data.

Examples of caching options include:

- Web caching: This takes the pressure off Web-based applications by storing frequently accessed content in memory, eliminating the need to repeatedly process requests for those pages on mid-tier servers and databases. HTML pages, page fragments, and dynamic content can be cached using custom tags. Invalidation rules help to ensure that content is kept fresh.

- Service caching: This typically involves a non-durable cache used by the service to cache retrieved objects. Some products provide enterprise Java developers with Object-Relational Mapping (ORM) and object-XML mapping as well as a rich in-memory and cluster-coordinated caching solution.

- Middle-tier data management: A memory-optimized database system that resides in the middle tier for self-contained, in-memory databases or cached subsets of back-end databases.

As an example of what’s involved in dealing with caches, we’ll first discuss the use of an ORM cache. This in-memory, non-durable cache is controlled by the Java service and the metadata provided within. Java developers use it to map their relational database structures onto a set of business objects. These objects are cached as close to the service’s business logic as possible so they can provide the most immediate access with the potential for no data conversions or requests to the data provider. These caches are efficient for maximizing access to read-only or read-mostly data. As the volatility of the data increases, the developer must address the potential for stale data by using a locking strategy with the data source (optimistic or pessimistic), configuring the cache to minimize storage of volatile types, configuring time-based expiration or invalidation notification, and forcing refresh operations at appropriate times.

While service caching has proven to provide excellent performance and scalability for individual or clustered services, it doesn’t address a complete middle-tier data management strategy. Service caches still rely on underlying databases for locking and don’t have scalable mechanisms to stay consistent with the enterprise database. Adding a middle-tier, in-memory data management solution that can process relational requests next to services can maximize the benefit of ORM caching.

Middle-Tier Data Management

Database products have emerged that are designed to manage data in the middle tier, both to offload the enterprise data tier and to provide light-weight, high-performance, stand-alone data management for session state and other infrastructure data. In particular, in-memory databases are optimized for execution in the middle tier, bypassing network access and providing memory-optimized response times. Some of these products include caching extensions that connect the middle tier to enterprise databases.

Although enterprise databases can be large, most companies can easily describe the relatively small subset of data that’s most active: your best customers, open orders, reference data, and the like. This is the data most advantageous to cache in the middle tier. If the 80:20 rule applies to data (80 percent of the access is to 20 percent of the data), intelligent data management in the middle tier could have a profound impact on the performance of the SOA.

Even if data access isn’t predictable, caching can still apply. An example would be to load a subscriber’s data into the middle tier when that person first contacts a call center. While the call is active, the customer’s data resides in a middle-tier data cache, offloading enterprise systems and reducing the number of times data needs to travel across a network connection. Since call center interactions can be several minutes long, the extra cost of loading the cache is amortized across numerous subsequent faster interactions with the cache.

SOA architects will need to achieve the right balance of processing between the middle and back-ends (enterprise tiers), depending on their performance requirements. Higher throughput may be achieved by spreading the processing, in parallel, across both tiers. Faster response will most likely be achieved, however, by performing more of the processing in the middle tier and avoiding frequent network trips to enterprise resources.

An effective SOA needs middle-tier data management. A middle-tier data management system—particularly one that doesn’t compromise on qualities such as standards, reliability, and availability—offers significant advantages when coupled with traditional enterprise data management. With data located in the middle tier, applications have much faster access to the data they need, enabling more-intelligent services and faster response times. Data operations no longer require constant access to enterprise systems or their supporting databases; this eliminates excessive network load that can negatively impact the performance of all services, not just data access.

Middle-Tier Data Management in Action

On-demand caching of personalization metadata: A fast-growing provider of hosted applications wanted to maintain the ability to dynamically personalize all interactions at the individual level but found its homegrown caching infrastructure couldn’t keep pace with its soaring volumes. As response times grew longer, the user experience was threatened. The homegrown approach also didn’t provide for high availability in the event of a middle-tier server failure. By replacing its homegrown cache with a commercial in-memory database that included data replication functionality, the company was able to improve response times and availability.

The system now consists of a Web-based presentation tier, a middle tier of dozens of application server platforms, and an enterprise data tier with several large, disk-based databases to hold all user data and metadata. When a user logs into the application via the Web, the personalization metadata for that user is copied from the disk-based database into the in-memory database in the middle tier on an active/standby pair of systems. So, every page view is dynamically customized until the user logs off. Changes to the user’s preference data are captured directly into the cache on the active system and replicated to the standby. In the event of a failure to the active system, the Web Services requesting personalization information are automatically redirected to the standby.

Periodic caching of hotel room availability: A large online hotel reservations system has challenges providing fast responses to user requests for room availability. Its architecture is designed to guarantee the accuracy of the information by connecting directly to the hotel’s inventory at the time a request is made. Since most requests require lengthy network hops and data transformations, users often abandon their searches and go to other reservation sites or directly to the hotel location. In addition, the “look to book” ratio on the site has been increasing, putting more importance on responsiveness than on accuracy. By changing its architecture to periodically poll the hotels for room status changes and updating a cached version of the data on the reservation servers, the latency was significantly reduced, and the occasional vacancy inconsistency was easily caught during the booking process.

Middle-Tier Data Management Technical Requirements

The requirements for a general-purpose, middle-tier data management system are both numerous and demanding, due to the variety of purposes it serves. In some cases, the middle-tier repository is the sole store for the data, so persistence and availability are critical. In others, there’s an enterprise system that serves as the permanent repository, so short-term availability may be all that’s needed. Some data, such as click-stream traces, need not be highly available while data such as session state demands a high degree of availability. Relatively static data may reside in multiple places, while highly dynamic data may be stored in a shared repository.

A middle-tier data management solution needs all the qualities of a traditional database—scalability, availability, robustness, and standard interfaces—while also providing for new types of applications with a different set of qualities—cache functionality, options for durability, embedding, and low maintenance. A well-designed solution easily and efficiently supports numerous types of applications and data. Here are some key issues to be aware of:

- Real-time performance and scalability: A shared data management capability supporting the application tier of an SOA must be responsive and scalable. As services roll out, user bases increase and new business processes are added, so it’s crucial that data management not become a bottleneck. A middle-tier data manager should support maximum throughput on each node in the application tier and should scale well with multiple CPUs. Effective communication between nodes should also be possible for partitioned loads.

- Direct access to data and client/server options: Traditional data management systems operate in client/server mode. This isn’t always appropriate for middle-tier data management in an SOA, however, where network bandwidth is a limited resource and frequent access to data may demand lower latency. SOA requires both client/server and shared-memory access with simultaneous types of access possible on a given data store, enabling applications to choose the best type of connection for their usage pattern.

- Continuous availability: Availability has many facets, including code robustness, non-blocking operation, and replication. Applications should never crash, return errors, or even block, due to data management issues in the middle tier.

- Standard interfaces: An SOA is built on standards, and the middle-tier data management component should be no exception. A standards-based system doesn’t require any compromise on standards or ease-of-use, doesn’t result in vendor lock-in, and doesn’t necessitate hiring especially skilled talent.

- Caching for the enterprise database: Most persistent data resides in relational databases or legacy data stores. Getting the best performance in multi-tiered SOA applications requires caching data as close to the services as possible and, in some cases, storing the data permanently in the middle tier. This form of “stored forward” caching in the middle tier must be flexible in the configuration of what data is stored and the lifecycle of that data. Specific usages of the cached data must allow management or minimization of stale data between the cache and back-end data store, ensuring proper locking and data consistency.

- A full range of persistence options: Many types of data are stored in the middle tier, not all of which require full durability or availability. Providing options for persistence enables much better throughput for data with less stringent requirements.

- Near-zero administration: It’s hard to overestimate the importance of manageability. SOAs are complex systems, integrating disparate applications on heterogeneous hardware, and they serve demanding business units and clients. Data management cannot add to the already heavy management burden the system engineers and architects face.

Conclusion

As companies look to make SOA the foundation for business operations, the role of middle-tier data management becomes an important consideration. Eliminating potentially crippling data latency or network bottlenecks in SOA requires “compatible” extensions of the SOA concept to pull information from the back-office layer into the middle tier. Within this tier are a range of options for caching application data and managing infrastructure data. Using in-memory data management products for middle-tier data management accelerates access to subsets of corporate and customer data, reclaiming lost performance and ensuring the full benefits of SOA’s promise.

An effective SOA needs middle-tier data management that doesn’t compromise on qualities such as performance, standards, reliability, and availability. If the middle-tier data management is also connected and coordinated with the enterprise databases, this offers significant advantages and will support numerous types of applications and data. With key data located in the middle tier, performance-critical applications have much faster access to the data they need. This enables more intelligent services, more rapid response, and better scalability.


Street Talk

No comments present
You May Also Like
Watering My Lawn – the Pitfalls Of Over Or Under Watering
When, and how much water do I need to irrigate on my lawn? These are the questions I am going to attempt to answer in this article. The exact amount required by the lawn grass and when, would need a private consultation, and then the answer could only be given…
By: Rob Ainslie in  Home and Family  >  Gardening   Jan 31, 2012  
3
  Likes: 3

Should I Make My Ex Jealous? - The Pitfalls
There is no easy way to overcome a breakup and completely turn the tables on the process by winning back your ex's heart. There's no guidebook that's guaranteed to win in every scenario. If there were, you would already be well on your way, and you wouldn't need to search…
By: Isabella Rose in  Relationships  >  Reconnecting   Nov 10, 2012  
0
  Likes: 1

10 Pitfalls Of Any Diet Plans for Weight Loss
Who has not faced this problem: you use a diet plans for weight loss, deny oneself, but those extra pounds have no intention to leave! .. What is the reason? It turns out that there are "pitfalls" which we are unaware. 1. Sweetener. Many people think that artificial sweeteners do…
By: Viktoriya in  Health and Fitness  >  Weight Loss   Dec 31, 2011  
0
  Likes: 0

Three Pitfalls To Avoid When Writing Your Online Dating Profile
Knowing how to do something in order to accomplish the best result is important. But that isn't enough in itself; it doesn't stop there. It's also extremely important to know what you should NOT do, what mistakes to avoid. One of the best approaches to reach that goal is finding…
By: Grace in  Relationships  >  Dating   Jul 25, 2011  
1
  Likes: 2

Cash Back Card UK – Cash Back Reward And Pitfalls Does it Help With Budgeting?
We all like the idea of receiving some cash back reward when spending money; you could look at the cashback card as a way to receive discounts on purchases you would make anyway, but which cash back card is the best one for you? With any type of cashback card…
By: TC_WebTime in  Finance  >  Personal Finance   Oct 06, 2011  
0
  Likes: 1

6 Pitfalls to avoid when designing a Group Coaching Programme
You have to be careful in respect of the number of participants you include in any one programme. The reason being is that if you have too many people at one time, there may come a point where they get frustrated if they don’t get the amount of attention they…
By: Christine Marmoy in  Business   Jun 07, 2011  
0
  Likes: 0

Is cheap web hosting good for your business and what are their pitfalls if any?
In this discussion I want us to be as sincere and down to earth as possible because when you come to the issue of anything cheap there are many connotations to it. What do we really mean by cheap web hosting? Does it mean that there is a type of…
By: Austin Okonji in  Internet and Businesses Online  >  Web Hosting   Jul 20, 2011  
0
  Likes: 0

Making Your Ex Jealous - Will It Work If You Want Them Back?
Learn exactly how to make your ex jealous so that they will want and desire you again and chase after you to give it another chance. Also learn about the best methods to make your ex jealous and what to avoid. You have probably heard a lot of good and…
By: Charlotte Jane in  Relationships  >  Conflict   May 26, 2012  
1
  Likes: 1

The Number One Reason Affiliates Fail, Know How To Avoid it
I started knowing about affiliate programs for 4 or 5 years now, I was very excited to start doing it thinking it was a piece of cake and that I was going to achieve millions when I post my ad as if the world was waiting for me to start.…
By: asmaa moussa in  Internet and Businesses Online  >  Affiliate Revenue   Nov 10, 2011  
0
  Likes: 0

Kaizen Training: Continual Improvement Through Continual Learning
In the physical world, according to Newton, once something is in motion, it tends to stay in motion, until something happens to slow it down. In the case of a car, cruising at the speed limit, if you were to cut power from the engine, it would begin to coast…
By: John Robert1 in  Business  >  Change Management   Jun 03, 2016  
1
  Likes: 1

Want To Keep Lean Information Flowing? Visual Management Online Training Courses
Once you have finished your first Lean initiative, you face the question of; what’s next? Lean is a very comprehensive system with dozens of methodologies that can be used to improve productivity. The question is, which to choose.One approach would be to consider which path will produce the most long…
By: John Robert1 in  Business  >  Change Management   May 24, 2016  
0
  Likes: 1

Quick Learning Kits Can Speed Up Lean Implementation:
From the smoke of the recent economic crises and widespread recessions, the Lean Management system has emerged as a leading choice for businesses trying to combat bad financial times through restructuring their organization. Basically, by becoming Lean. Lean is Simple, But Not Easy: The basic concepts behind the Lean philosophy…
By: John Robert1 in  Business  >  Change Management   May 16, 2016  
0
  Likes: 0

5s Training Packages – Lead Your Ways to Success
At the core of any Kaizen processes implementation are the five most important principles – the 5 S’s (referred to as 5S), which stands for Standardize, Sort, Straighten, Sweep, and Sustain. Those five elements comprise what lean processes are all about – simplification and cleaning of your current manufacturing processes…
By: John Robert1 in  Business  >  Change Management   May 03, 2016  
0
  Likes: 0

Lean Custom Japan Tour for A Targeted Experience In Lean Developmental
If your company has been working with Lean for some time now, you have probably advanced to the point where you are considering a Lean trip to Japan to bring your understanding of the Lean methodologies to the next level. And yes, a trip to Japan to study Lean in…
By: John Robert1 in  Business  >  Change Management   Apr 26, 2016  
0
  Likes: 0

Ennacom Universal Kaizen Blog Posts for Honing Your Lean Management Systems
If you are involved in Lean methodologies at your company, chances are you have done business with Enna. Whether it is innovative video and on line courses on a variety of Lean topics, or high quality 5S supplies to support Lean communications, Enna is there to supply your needs. But…
By: John Robert1 in  Business  >  Change Management   Apr 18, 2016  
0
  Likes: 1

Article Views: 2059    Report this Article