by Jerod Johnson | March 08, 2017

Strategies to Mitigate SaaS Service Interruption

Consistent data access is critical to data-driven applications and services. However, unlike RDBMS operations or flat file integration, SaaS service integration relies heavily on network connectivity.

As we all know, networks are subject to certain issues - DNS failures, network configuration issues, even cable disconnects. So how do users deal with the reality that Web APIs calls can fail? Luckily for our customers, our drivers embed advanced capabilities that allow users to handle these situations gracefully and without service disruption.

An easy way to work around potential API failures is to maintain a temporary data cache. Our Drivers include this capability out of the box and enable customers to seamlessly switch between live data and cached data. The cache can be configured to store data internally or externally with any RDBMS.

Caching With CData Drivers

All of the CData Software products come with built-in caching functionality, allowing you to both implicitly and explicitly store data locally for the queries that you are running. By adding a simple check to your work flow or source code, you can react to an API failure and trigger the driver to go into "offline" mode and use the local cache instead of the original data store.

In the remainder of the article, we will be referencing a CData ODBC Driver. The exact data source is not largely relevant, as the caching connection properties are uniform across all of our products.

Caching the Data

In order to cache the data, we need to set the caching connection properties for the driver. Depending on which technology you are using this can mean modifying the connection string programmatically or using a connection wizard to modify the connection properties. Below you'll find a sample connection that includes basic caching configuration:

With the AutoCache property now set to true, the driver will cache the results of SELECT queries to the file-based cache specified by the CacheLocation property. It is worth mentioning that non-queries (such as UPDATE/INSERT/DELETE statements) will not affect the data cache, regardless of the value set for AutoCache.

Accessing the Cached Data

There are many ways to detect and manage an API failure. With CData Software products, developers and data admins can make use of the Timeout connection property (available in all products) or intelligently handle specific error codes and messages. Regardless of how you detect an API failure, you can work with the locally cached data by setting the Offline connection property to true:

Once connected in "offline" mode, any queries run based on that connection will be run against the cache and INSERT/UPDATE/DELETE statements are considered invalid. Based on your own requirements, you can test the connectivity to the Web API and set the Offline property to false and begin querying live data once again.

Uninterrupted Data

With the driver configured to automatically cache the data for SELECT queries and to use the cached data in the event of an API failure, we have created an uninterrupted data source, meaning that you and your customers will always have data to work with, even if live data connectivity is not immediately available.

All of the CData Software drivers have caching functionality built-in, which means that whether you are using our ODBC Drivers in the BI, reporting, or ETL tools of your choice, using the ADO.NET Providers or JDBC Drivers to build custom data applications, or using any of our other products, you have the option to bake uninterrupted data into your services and applications.

Enhanced Performance

As an added benefit, customers can leverage caching to offload requests to operational systems and increase performance.

Consider the user building a server application with our drivers. At any time the server application may be handling multiple requests for the same data. Instead of making multiple request to the same SaaS service for the same SaaS data (perhaps even running into API request limits) the data can be pulled once, on-demand, and distributed to clients in pseudo real-time.

Learn More

Our Drivers go far beyond basic API connectivity, embedding enterprise features that are critical to building data-centric applications. Thousands of man hours have been poured into providing simple interfaces to integration challenges (that are anything but simple).

Download a free trial of any of our products and start working with uninterrupted data today! If you have question, or just want to learn more about the advanced capabilities embedded in every one of our CData Drivers, please let us know.