0

I am working on a web application. It has a page which loads information releated to people(name, surname, telephone, etc). In addition to this default information there exists an icon which represents the status of the person in another external system.

Each time the person page is loaded our system invoke a WS for updating the icon:

  • State = 1 implies icon_color=red
  • State = 2 implies icon_color=blue
  • State = 3 implies icon_color=grey

An important point is that the external system interacts with the person by means of his/her mobile phone whereas our system does not. That means that the person may change its stataus on the external system at any moment.

The problem is that the external server receives a huge number of calls for retrieving the status information. Our goal is reducing as much as we can the number of calls to the WS.

We are evaluating the following approach. Add the status information in our database. We would update it once a day. The problem with this approach is that the status information could change since last update, so the icon colour may not be the actual one.

In a few words, we have one approach that is completely up-to-date all the time resulting in many calls to the external WS. On the other hand, we have an approach that will call the WS once a day but the information stored in our system may not be up-to-date.

My question is whether there exists a tradeoff approach.

pafede2
  • 1,626
  • 4
  • 23
  • 40
  • 2
    This is somewhat like maintaining stock levels with eCommerce -> ERP. The way we handle it is have a webservice call that provides `Modified/Created < 30 mins from now`, run that every 15m so you have an overlap for consistency then each night perhaps run the full amount for consistency. If you don't have access to this then your approaches will have to be one of the answers. 2 Questions need to be answered. 1.) Can we webservice handle all these requests you are throwing at it and when will it be crippled 2.) How important is to-the-minute information to your customers. That is your answer.. – Matt The Ninja Dec 04 '15 at 08:07
  • 1
    You might want to add a proxy in between which does the caching for you. Or you cache yourself like Matt described. – Marged Dec 04 '15 at 08:13
  • Thanks to both. Actually the two questions proposes by Matt are very helpful. In my opinion the answers are 1) is yes, it can. 2) It is not highly important. I will discuss with the technical and functional teams. – pafede2 Dec 04 '15 at 08:22

0 Answers0