Sharepoint List Handlers Under Load
For Domino developers, the idea of creating an event handler that logs every change to a view (either via the UI or through the backend) is a pipe dream. So when I saw how easy these handlers were to create and deploy in Sharepoint, I thought somebody must have been listening. Alas, I wish it was really that easy.
For our content management project we deployed list even handlers to keep an audit trail of changes made to lists and document libraries. Any status change, value change, deletion, you name it, we were tracking it. Then I wrote a program that will automagically create sample data into an empty template (part of our SDLC) when we realized that the audit trail was not catching all the adds/updates/deletes. Quite simply, if you bombard a list with transactions, the event handlers do not fire appropriately. Worse still, the missing events are not random, but all transactions after a certain point!!
My testing seems to indicate it is a load issue since a freshly booted Sharepoint server will perform the best, with respect to catching a large number of closely spaced transactions, whereas a server that has been running for a while misses up to 75% of transactions. I also realize that if I structure my import so data is being added to lists in a round-robin fashion (list-a, list-b, list-c, list-a, list-b etc..), the handlers seem to keep up so it has more to do with a single list being hammered and not the server.
For the time being, I have placed some sleep timers strategically throughout the sample data importer, and that allows the event handlers to get caught up, but this is silly. We will most likely have to implement our own audit trail layer, which although not difficult, is just something we wish did not have to be done.
Message to Sharepoint Development Team: More research on multi-threading needed!
_
March 5th, 2007 at 6:58 pm
Exactly my problem. I did a lecture on best practices in the last Canberra SharePoint User Group, and mentioned this issue.
March 5th, 2007 at 9:16 pm
Was there any other behavior that you noticed that I did not mention? I am gathering details to report to MS.
March 7th, 2007 at 7:08 am
“For Domino developers, the idea of creating an event handler that logs every change to a view (either via the UI or through the backend) is a pipe dream.”
Ummm… not for the last two years. Damien Katz solved that problem for us a while ago…
http://www.openntf.org/Projects/pmt.nsf/ProjectHome?ReadForm&Query=Trigger%20Happy
March 7th, 2007 at 8:17 am
I stand corrected.