Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    OTOH scanning a database may be very efficient if the table to be scanned is small enough to fit in RAM and is properly indexed, or even index-organized. Commented Jan 24, 2017 at 19:26
  • @9000 That's definitely true, but I would worry about having issues scaling. I would definitely consider scanning, but the added complexity of creating extra processes (Windows services) and added load on the database makes me wary. Also, parallelism, performance, and scheduling are an unholy trinity of debugging pains. A problem that only shows up under load, with processes racing in a certain way, and intermittently would be a pain. Commented Jan 24, 2017 at 19:42
  • 1
    It would be great if the problem could be solved by queues alone. The consistency is eventual: several agents could say they're picking a task, then notified whether they succeeded, or another agent sent a request earlier and was given the task. Storing the picture of actual tasks underway in a DB table could still be useful for many things, and looking at it occasionally might speed things up. Depending on load, of course. A light query once in 5 seconds is peanuts for any serious DB, provided that it's really one query, not e.g. one per client. Commented Jan 24, 2017 at 19:56