Reputation: 409
My backend system serves about 10K POS devices, each device will request service in a sequential style, however I am wondering how the backend guarantee to handle requests of a given client in sequential style.
For example a device issues a 'sell' request, and timeout(may DB blocked) to get response, so it issue a 'cancellation' to cancel that sale request. In this case, the backend may is still handling 'sale' transaction when get 'cancellation' request, it may cause some unexpected result.
My idea is to setup a persistent queue for each device(client), but is it OK to setup 10K queues? I am not sure, please help.
Upvotes: 0
Views: 67
Reputation: 33197
This is an incredibly complex area of computer science and a lot of these problems have been solved many times. I would not try to reinvent the wheel.
My advice:
Both your existing system and your proposed idea sound like they could potentially be violating ACID:
Not to mention, you have scalability issues as well. Combine scalability and ACID and you have heavyweight situation requiring serious expertise.
If you can help it, I would strongly suggest relying on existing systems, especially if this is for point of sale.
Upvotes: 1