Last post Jan 08, 2015 12:13 PM by IbrahimIslam
Jan 04, 2015 12:26 PM|wavemaster|LINK
Looking for ideas on how to improve the robustness of the core functionality of my application with regards to application and user errors.
My application is build in Web Pages, with Razor C, using the the SQL CE database, and the application is hosted on Azure.
I have Elmah up and running which logs errors.
The core application starts when a user submits a form and ends with an email being sent to a third party. This constitutes a transaction which gets marked complete after the email has been sent and no error message was received.
Sounds simply enough, however there are a few challenges that make me think it is all pretty fragile.
1. The are at least two but possible five physical files involved.
2. I am making 2 calls to third party apis.
3. There are about 30 steps from start to finish spanning 2000 lines of code.
4. And most importantly, each individual step could cause the whole workflow to fail.
Looking at those 30 steps, I could say it consists of:
data gathering (from the form)
storage of transaction in progress
redirect to one file:
api call to Bing Maps
redirect to one of 6 new files:
data gathering from transaction in progress entry
data gathering for supplemental data
data assembly (including a second api call)
mark the transaction as complete.
I am using session variables to move data between pages.
Jan 08, 2015 12:13 PM|IbrahimIslam|LINK
Few options come to mind:
1) You can use client side (browser) persistent storage mechanisms like LocalStorage or SessionStorage to save the state of users progress in those steps and towards completion. Since you have data you can use it to handle the situation as you want.
2) You can make use of cache stores in server side like Redis or Memcached to store these temporary data (since they are faster than full-blown databases) and handle accordingly.
3) Break your app workflow somehow (if feasible) to not be a continuous 30 step process to complete or fail.
Hope it helps.