coralnet
coralnet copied to clipboard
Annotation tool: Notify if another user is annotating the same image
Thought there was an issue for this, but I guess not. I wouldn't put this at super-high priority compared to other things we have going on, but I had a couple of ideas, so I'll dump them here.
The motivation is that there are often teams of annotators to split up the manual annotation work, since it's quite time-consuming. Since CoralNet doesn't give users super-good control over image sorting and navigation, it takes careful coordination to make sure team members don't visit the same images. If they get unlucky, they can end up annotating the same image at the same time.
For the implementation, we can use the Django cache. Have a cache lookup key that tracks which users are on the annotation tool for a particular image ID - say, ID 1234. When someone enters the annotation tool for image 1234, the cache value is updated. While their browser is still on the annotation tool page, there can be a Javascript function which runs once every 60 seconds (via setTimeout()
) to send an Ajax request updating the cache value. The cache value has an expiry time of slightly more than 60 seconds, perhaps 80 seconds.
When a second user enters the annotation tool for image 1234, if the cache value hasn't expired yet, then we show a prominent message saying that someone else is annotating this same image right now.