Timeline for Multi-Thread Return Single SQL Result
Current License: CC BY-SA 3.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 28, 2013 at 6:59 | comment | added | Matt S | I thought about the single thread approach but I don't think it is suitable because the processing the thread is required to do requires access to Internet resources where the latency is unknown therefore the thread could be waiting some considerable time. There was also a misunderstanding over the "checked_out", I didn't mean there were three states but I also misunderstood your comment. I understand now what you mean about a "checked out" and a "processed" flag. | |
| Aug 27, 2013 at 21:15 | comment | added | GrandmasterB | see edited answer for other approaches | |
| Aug 27, 2013 at 21:14 | history | edited | GrandmasterB | CC BY-SA 3.0 |
added 699 characters in body
|
| Aug 27, 2013 at 21:10 | comment | added | GrandmasterB | I dont think a true/false can handle both a selected and checked out status as there are 3 states - unprocessed, being processed, and processing done. Otherwise if the server goes down, you may miss items in the queue if they are prematurely marked as completed. Thus separating them into two columns, one for processing state, and for checked out state. | |
| Aug 27, 2013 at 20:35 | comment | added | Matt S | A message queue would be a sensible approach. I was wondering if, when implemented I might have problems with multiple threads making the same query repeatedly and slowing the server down. This should help mitigate that. As a side note, the bit field was supposed to be "checked out" field. | |
| Aug 27, 2013 at 20:02 | history | edited | GrandmasterB | CC BY-SA 3.0 |
deleted 8 characters in body
|
| Aug 27, 2013 at 19:22 | history | answered | GrandmasterB | CC BY-SA 3.0 |