Anonymous
At one of my projects at my previous employment, there was a scenario where the user would upload a file to process it, and it showed different stages of statuses while it was processed. The user would refresh multiple times to see the changed status. That's why I was assigned to implement auto-fetching the statuses periodically. One of the senior engineers advised me to poll data at regular intervals. His idea was this would be easier and quicker, and we could focus on the next issue quicker. But I respectfully argued with his decision, suggested that it would increase server stress, and as a result, the cost of the client might increase. Instead, I was insisted on implementing websocket, as it is better for this kinds of use cases. He also understood the situation, but he insisted on polling data because it is easier to implement. We talked to the PM about this issue, and the PM agreed on implementing websocket API for this scenario. I then implemented the API, took some time to learn and understand more on how to implement websocket API, and work with them.