We’ve developed some Dashboards for our factory floor using REST API and Web pages, and we’ve recently done a 10.1 to 10.2 upgrade and have noticed deadlock errors being recorded in Event viewer on the server.
In an effort to improve efficiency on the REST APP server we’ve added “Cache-Control”: “public, max-age=120” to the header of the REST calls in an effort to only run any BAQ’s every 2 mins, regardless of the number of client pages calling the BAQ’s.
Is there any way to monitor BAQ’s (similar to SQL profiler) to see how often they are being called? Or any better idea’s on caching data retrieved by REST calls to prevent unnecessary re-running of BAQ’s?
One option is to implement the Repository pattern. Here you would create a class that your web pages hit but the class refreshes itself every 2 minutes. It also encapsulates the REST calls all in one place so if you decide to change the way you access the data, you won’t have to redo all of your web pages.
One thing I tried is to reload the whole page after a certain time frame
In our case we have a web page that has chart scrolling charts one at the time, so I basically asked for how long would they need for the charts to show, add them up and once the cycle is complete before going back to the first one I reload the whole thing.
Hope this helps or at least point to some ideas haha