Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    111

    Unanswered: Row Level Locking For "queue" Table To Get Rid Of Concurrency Problem

    Hi all

    We are writing a web-based multi-user call centre application application.

    we are getting concurrency problems as you would expect with a multiuser application.

    the application is made for callers who will bring up a different contact to call based on some predefined priority. now because the algorithm that prioritises the contacts takes a good 2 seconds to run, if 2 different caller request for the next prioritised contact, they will retrieve the same contact.

    The only way that we think can resolve this problem is by building a queue. The queue would be implemented as a table, the particular implementation of this queue would be, when ever someone retrieves an entry from the queue, a background process will go on and generate a new queued item, i.e. in a FIFO manner. So that's how we think we should implement the queue.

    Now come the question how to implement it. My idea is to have row level locking and a trigger to remove queue items from the queue. so that once one caller have looked at one of the item in the queue, another user can't look at the same item.

    Any suggestions as to how i might be able to avoid concurrency problems?

    What do you all think of my idea of implementing the FIFO queue?/
    Is it possible to do row level locking in such a way that other users won't even be able to read the locked entry??



    James

  2. #2
    Join Date
    Aug 2003
    Posts
    111
    OK

    MAYBE I SHOULD SIMPLIFY THE QUESTION

    Is it possible to do row level locking in such a way that other users won't even be able to read the locked entry??


    James

  3. #3
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Couple of articles for your reference to resolve the issue :
    http://www.sql-server-performance.co...ocks_hints.asp
    http://www.sql-server-performance.co...cing_locks.asp

    Above all review information about LOCKS, distributed transactions topic from books online.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •