Optimising Currency Exchange Rate Caching with Real-Time Updates
Posted: Wed Dec 04, 2024 6:42 am
Hi,
Assume you are tasked with developing a web application that displays currency exchange rates for a bank's website. The exchange rates are stored on an IBM Mainframe and are accessible via web services. Currently, every time a user accesses the rates page, a request is sent to the mainframe, creating excessive load.
Most of the time, the rates retrieved are unchanged. However, rates can fluctuate during the day, and the webpage must always reflect the most up-to-date values if they have changed.The rates table on the mainframe supports triggers, allowing any update to the rates table to invoke a trigger that can call a web service. How would you design a caching architecture to reduce mainframe load while ensuring cached values are invalidated promptly on rate changes?
Assume you are tasked with developing a web application that displays currency exchange rates for a bank's website. The exchange rates are stored on an IBM Mainframe and are accessible via web services. Currently, every time a user accesses the rates page, a request is sent to the mainframe, creating excessive load.
Most of the time, the rates retrieved are unchanged. However, rates can fluctuate during the day, and the webpage must always reflect the most up-to-date values if they have changed.The rates table on the mainframe supports triggers, allowing any update to the rates table to invoke a trigger that can call a web service. How would you design a caching architecture to reduce mainframe load while ensuring cached values are invalidated promptly on rate changes?