So recently we broke XTRF. It's true. We totally thought it it was the upgrade to XTRF 7, but turned out something in our data combined with some pretty constant and large Browser API calls was breaking things. The folks at XTRF helped us sort it out and suggested that rather than do a Browser API call that downloaded a CSV, we should be doing a plain Browser call and then loop through the resulting pages (since you can only have a maximum of 100 results on a page).
We were able to figure that out and wrote a connector that did just that and then dumped everything into a mysql database. So basically we are pulling a copy of a view into databases so we can run analytics and other things on it, because we don't have live access to the data in XTRF.
The XTRF team also made a great suggestion that instead of pulling all the data from forever (which is a lot of tasks in our case), we should just pull the recently modified tasks and do an incremental update, or use api-caching or something else.
This worked great! I have not asked XTRF for an update on the load our API calls are putting on the server, but it was significantly higher (to the point of crashing our system once or twice) before.
We have run into one issue though. Doing such an incremental pull misses a crucial thing: deleted data. We ran into this when one of our financial reports was off by a few thousand. Upon closer inspection, the culprit was the (now obvious) fact that if someone deleted a task or project (and they did) that previously had receivables and value, that task/project would not come up in the view when the script next pulled the data because deleted tasks do not show up in views. Our script currently does an UPSERT into mysql, so it either updates existing records or adds missing ones. Since the deleted tasks don't show up in the view, it can't update them with a deleted status or dropping them from the database.
We could possibly do a periodic audit task that pulls the whole view and compares it to the database and drops records that are not in there. Or we could give up on the incremental update idea and just UPSERT on the whole view every time it runs, but the idea (and it was a good one) that the XTRF team gave us was to streamline things by doing incremental updates. Going back to grabbing all data everytime does not seem like the best solution.
So would there be a way to show deleted tasks in a view? I couldn't find a way to enable this. I was hoping it would just be a status, like Opened, Closed, Cancelled, Deleted, etc. But so far looks like it is not, or at least smart views are excluding deleted tasks.
Anyway, any other ideas that would allow us to keep the incremental approach but still deal with deleted records would be appreciated! We have considered internal processes that say you cannot delete tasks, but clear receivables and then change the category to "To Be Deleted" or something, and then have a daily task that looks for those tasks and deleted them. But not sure a) if API allows for deleting of tasks and b) if that is the right approach.
And for anyone thinking "gosh this guy is kinda going to the extreme! you don't need that much data." Trust me, once you have almost realtime analytics and dashboards that execs can consult when making decisions, it's hard to go back. :)
Customer support service by UserEcho