0

How would you design a caching architecture that minimizes the trip to the web service

Hi Every One i have a question please , Assume that you are developing a web application that shows currency exchange rates for a bank web site. The rates are stored in an IBM Mainframe in the bank and rates are available through web services. Each time a user accesses the rates page, the page makes a request to the mainframe. This generates too much load on the mainframe. Especially most of the time the rates delivered is the same. How would you design a caching architecture that minimizes the trip to the web service. But at the same time rates may fluctuate within the day and if rates have changed the rates web page should not display the cached values but make another request to the web service. How would you design such a caching architecture and make sure it is invalidated on rate changes?

by
1 Reply
  • Since your currency rates may change intra-day, on the mainframe side I would look at developing a mainframe app that notifies a .NET-based currency caching app whenever a currency rate has changed. The easiest approach would be for the mainframe to update a database table that your .NET-based caching app monitors for changes, but your cache will be out of date based on the database monitor interval time you have specified in the caching app.

    A better approach would use whatever integration technology is available on the mainframe and have it notify your .NET-based cache app that an currency rate has changed. Your .NET-based currency caching app would then update its cache by reading the mainframe data. Your currency rate web service would be programmed against the .NET-based currency rate cache. This approach would ensure the cached currency rates are always up to date.

    Good luck!
    0

Recent Posts

in .NET Development