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.

216 comments:

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

Contact With Independent Escort Call Girl in Hyderabad. Avail Her VIP Hyderabad Escorts Service At Your Home Or In Hotel. Contact 24/7 available Call girls. Book now - hyderabadescortsagency.co.in
Hyderabad Escorts
Banjara Hills Escorts
Charminar Escorts
Gachibowli Escorts
Hi Tech City Escorts
Jubilee Hills Escorts
Madhapur Escorts
Mallapur Escorts

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.

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