I’ve been reading a lot about different architecture approaches to solve a problem I’ve been working on. I’ve read about polling, event driven, websockets
The application I am designing allows users to send requests (ex: request to purchase) to stores. The stores can only handle one request at a time (but would like to know when others are pending), and they can choose to accept or reject the request. The users wait for a response from the stores before they can proceed and the response from the store is all they care about. There is no further communication needed. The stores will likely be receiving a few requests per minute.
The simplest solution to me seems like polling. However, as the number of stores increase, this will linearly increase the number of requests to my server. I’d have to poll every, say 5 seconds, which quickly adds up as the number of stores increase. And depending on the timing of the messages coming in, users could wait up to 10 seconds (which isn’t bad, but gets worse) for a single second response.
Does anyone have any articles I can read or suggestions on architecture pattern I could use for this problem? I prefer something simple over something elegant