I was wondering about the best practices in synchronizing multiple azure instances that run the same role. More precisely, I want to prevent several worker roles to work on the same work-unit.
Azure queues do not seem to help on this matter. One option is to use an sql table with locks and stored procedures; but using sql synchronization in Azure seems a bit awkward.
Any ideas?
Edit, my detailed(but simplified problem) is as follows:
The idea is that I have a scheduler that puts units of work in an Azure queue, and each of the m workers will read these and process them.
The problem:
I have some ideas, but they don't seem cloudy enough, so I am interested to see what solutions would you apply for this problem.
I've just written a couple blog posts about using blob leases to do this sort of thing. See http://blog.smarx.com/posts/managing-concurrency-in-windows-azure-with-leases and http://blog.smarx.com/posts/building-a-task-scheduler-in-windows-azure.