Chapter 5 - Geocode Offline

Designing robust software means planning for every eventuality. To create a world-class product using AFC Geo SaaS Pro Soap, you need to be prepared for when things go wrong - and one of the problems you may face is an outage. Fortunately, there are ways to write your software to gracefully handle an outage.

Types of connection issues:

  • Temporary Outage: Your connection has gone offline and you need to be able to process geocode requests for a short period of time until the connection is restored
  • Intermittent Connection: Your connection works most of the time, but its behavior is unpredictable and occasionally drops unexpectedly
  • Unable to Reach AFC Geo: Your connection is up, but you are unable to reach AFC Soap because of a routing problem, a denial-of-service attack on an Internet service provider, or a temporary outage of AFC Geo

These types of outages have similar characteristics, so it’s straightforward to design a single process to handle all of them. Here is how we handle a broken connection:

  • Detect the dropped connection and prevent a crash
  • Retry the request or fall back to saved geocoding results