User Friendly Video Review with Locking

Posted by James Cori on Stack Overflow See other posts from Stack Overflow or by James Cori
Published on 2011-01-04T14:47:55Z Indexed on 2011/01/04 14:53 UTC
Read the original article Hit count: 269

We have a jquery/php/mysql system that allows a user to log in and review videos built by a system for online viewing. When a user begins reviewing a video, the video is marked as such. But now we've cornered ourselves into the classic browser-based application problem of the user navigating away or closing the browser without completing review. That video would then enter a state of limbo of constantly being reviewed, but never completed, and never re-entering the queue.

Options we have are:

  • Build a service (which we already have others) to find review sessions that are outside a duration boundary and reset them back into the queue.
  • Reset review sessions outside a duration boundary when that user logs in. Essentially, if a user locks out a video for review, it'll be unlocked the next time they log in.
  • A suggestion made to me was to use the php/apache session length and on expiration, reset any pending review jobs. I don't even know where to look to implement this as this is one project on a shared server, so it shouldn't be an apache config, but the reset mechanism would need to know the database credentials to be able to reset it...
  • The worst solution everyone hates is preventing the user from navigating away with javascript, asking "Are you sure?!"

This system is used by a few hired reviewers, so I'm not exactly dealing with the public here, but I can't prevent users from sharing logins for speedier review, which would knock out the 2nd option above because it would unlock a video being reviewed by someone else using the same login.

© Stack Overflow or respective owner

Related posts about php

Related posts about jQuery