Monday, September 10, 2007

Declarative caching in the UI layer

In my recent post about the BestCrosswords.com architecture, I mentioned the fact that a fair amount of caching was taking place in the web UI layer. I'd like to expand on that.

The data consumed by web UI layer comes solely from the service layer. The services are injected into Tapestry components by Spring.

Let's take an example. If you look at the home page, you'll see that recently added crossword puzzles are displayed for different categories (e.g. American or British type puzzles). The Tapestry component responsible for outputting this bit of HTML uses the "constructor" (as in puzzle constructor) service, injected into the component at runtime. Since the component is located on a high traffic page, its performance needs to scale so hitting the service layer (and thus the database) on every requests is out of the question.

My first solution to this problem was to cache the service layer data in the component itself. It worked for a while but proved inflexible in the long run. For instance, depending on where a component was located (e.g. a high or low traffic page, etc), different caching strategies were needed.

My second solution (and the one I'm using now), was to configure caching proxies in Spring using Spring modules and Ehcache and inject those into the components instead of the real services. This way, I could decide to turn caching on or off depending on the specific needs of the component, without it being aware of anything.

222 comments:

«Oldest   ‹Older   201 – 222 of 222
KomalChennai69 said...

Rajahmundry Escorts
Secunderabad Escorts
Shamshabad Escorts
Vijayawada Escorts
Visakhapatnam Escorts
Vizag Escorts
Patna Escorts
Manikonda Escorts
Jaipur Escorts
Rewari Escorts

KomalChennai69 said...

Goa Escorts
Pune Escorts
Pune Escorts
Kolkata Escorts

Kohinoor Fun Club said...


Red-Hills Escorts
Street-Market Escorts
Uppal Escorts
Abids Escorts
Kukatpally Escorts
Anakaputhur Escorts
Gachibowli Escorts
Nallagandla Escorts
Banjara-Hills Escorts
Begumpet Escorts

Kohinoor Fun Club said...

Bandlaguda Escorts
Bhagyanagar Escorts
Chintalkunta Escorts
Madhapur Escorts
Vijaya-Nagar Escorts
Shamshabad Escorts
Charminar Escorts
Lakdikapool Escorts
Manikonda Escorts
Mallapur Escorts

Kohinoor Fun Club said...

Rajahmundry Escorts
Chettipunniyam Escorts
Ameerpet Escorts
Bagh-Lingampally Escorts
Chitlapakkam Escorts
Chandrayangutta Escorts
Dilsukhnagar Escorts
Doodh-Bowli Escorts
Hafeezpet Escorts
Hill-Firt Escorts

Kohinoor Fun Club said...

Hitec-City Escorts
Kachiguda Escorts
Khairatabad Escorts
Musheerabad Escorts
Serilingampally Escorts
Patancheru Escorts
Balanagar Escorts
Kompally Escorts
Alwal Escorts
Malkajgiri Escorts

Kohinoor Fun Club said...

Keesara Escorts
Uppal-Kalan Escorts
Ghatkesar Escorts
Hayathnagar Escorts
Rajendranagar Escorts
Sr-Nagar Escorts
Prakash-Nagar Escorts
Somajiguda Escorts
Saifabad Escorts
Chintal-Basti Escorts

Kohinoor Fun Club said...

Chikkadpally Escorts
Himayatnagar Escorts
Ramnagar Escorts
Nallakunta Escorts
Tilaknagar Escorts
Badichowdi Escorts
Aghapura Escorts
Boggulkunta Escorts
Chilkalguda Escorts
Kavadiguda Escorts

Kohinoor Fun Club said...

Madannapet Escorts
Minister-Road Escorts
Namalagundu Escorts
Rani-Gunj Escorts
Sitaphalmandi Escorts
Warsiguda Escorts
Bowenpally Escorts
Marredpally Escorts
Vikrampuri Escorts
Begum-Bazaar Escorts

Kohinoor Fun Club said...


Choutuppal Escorts
Indresham Escorts
Ameenpur Escorts
Gajularamaram Escorts
Izzathnagar Escorts
Ankushapur Escorts
Kanchan-Bagh Escorts
Kistareddypet Escorts
Suraram Escorts
Tukkuguda Escorts

Kohinoor Fun Club said...

Yadagirigutta Escorts
Bibinagar Escorts
Bongloor Escorts
Chilkur Escorts
Puppalaguda Escorts
Saroor-Nagar Escorts
Rajendra-Nagar Escorts
Saidabad Escorts
Rampally Escorts
Nagulapally Escorts

Kohinoor Fun Club said...

Miyapur Escorts
Chennai Escorts
Bangalore Escorts
Adikmet Escorts
Bangalore Escorts Service
Kapra Escorts
Kapra Escorts
Bangalore Escorts

Customer Service Phone Number USA said...

The HP Officejet 4630 e-All-in-One is a cheap inkjet multifunction printer (MFP) aimed at home offices with a respectable, if not flashy, set of MFP functions. The 4630 has the ability to print, copy, scan, and fax. It has the ability to function as a stand-alone copier. It features a 35-page automated document feeder (ADF) for unattended copying, scanning, or faxing of multipage documents. It comes with a 100-sheet paper tray.

Customer Service Phone Number USA said...

For detecting plugins and themes employed by a site, WP Theme Detector is a fantastic tool. Your result will be divided into three major parts.
• Child theme – You will find the theme along with the version and author.
• Theme provider – You will find the link to the company that offers the theme.
• Parent theme – You will uncover the details regarding the parent theme.
• Plugins detected – A short description having a link to the WordPress plugin will be shared.
WordPress Theme Detector

Sophia Williams said...

Get step-by-step guide to install Mcafee security program with the product key.
Geek Squad Appointment | mcafee.com/activate.

News tech new site said...

Let us be thankful to the folks that make us happy; they'll be the captivating gardeners who make our souls blossom. hotmail.com | espn.com/activate

Jones said...

This informative blog to guide how to Solve QuickBooks Error 3371 Wth Easy Method. But in case if you want any advice in terms of resolving this error then you can contact QuickBooks customer support experts.You Can talk our quickbooks expert team call at 888-XXX-XXXX

catherine williams said...

Gmail is one of the best email service provider in the world.If you are using multiple gmail accounts in corporate company. If you are forgot gmail password during gmail login in Pc.Here, It is right place.I will provide best solution to related gmail account.a piece of good news is that the process to forgot gmail passwordis super simple.If you have to acess phone number and email id then you can change gmail password.However , If you have any any issue to related Gmail then you can contact gmail customer support phone number.

yahoo phone number said...

Working in Yahoo Phone number Company everyone face Need Fix yahoo sign in error I know How to yahoo sign out of all devices without phone number and easy way to login Yahoo mail we ready to help everyone Just one click in our website Searching we help you. if I change my yahoo password, will it log out of other devices who we Fix yahoo sing in Error.

Fix yahoo sign in error
Fix Yahoo sign in error

Leo Oliver said...


Academics who want assistance with statistics assignments could seek instantly straightaway. Statistics Assignment Help is the most beneficial assistance that any student can have. For every statistics student, they establish the integrated solution. They will undoubtedly be satisfied once they have obtained their solution.

Kimsley said...

First of all, you must go to open 123.hp.com/setup and open it in the internet browser. then, you should type the model number of your HP wireless printer in the shown box in 123. hp/setup. You can download the personal drivers for your HP wireless printer. After this process, you may get insert into setting up the HP wireless of printer properly.

Xavier Axel said...

It would be pretty difficult to set up their HP Printer in a suitable way. The unprotected printer users may vary for generative instruction for the printer tool. That’s why; our technical engineers have fixed to advance a website hp deskjet 2652 wireless setup i.e., 123.hp.com to give more information concerning HP Printer setup.

«Oldest ‹Older   201 – 222 of 222   Newer› Newest»