Ask HN: Best way to keep users interested? as my search takes time

1 debrajpal 6 7/28/2025, 3:07:09 PM
Hey,

so on my product Minar we search in real time across site on the internet for what sites have the product you want. on average for a product you have asked for we search in 10-20 stores, and some stores are faster to response, while others may be slower. Irrespective, the full search takes between 8-10 seconds which is when we serve all the results to the frontend. Now, I have wanted to stream this for a while, where as we collect products for a site, we send that over to the frontend. Essentially serve the results to the API.

But how will the streaming work, in terms of how it is presented to the user is what I am wondering for the next update. Any ideas people?

For reference, you can take a look at the product and search at: https://www.theminarnet.com

Comments (6)

PaulHoule · 3d ago
Websockets.
debrajpal · 3d ago
Does that require a unique id generated for each search request? assuming that should be from the frontend?
sfmz · 3d ago
You can use the websocket pointer itself on the backend if you want.

.NET looks like : Dict<WebSocket, List<resultObj>> webSocketConnections

debrajpal · 3d ago
Right. But also from a streaming PoV in the frontend: how does that look? Have a bunch of products from X site (not ranked at all), have a bunch of products from Y site all come in sequentially. Been thinking of how to display them.

Right now I get all products from all sites then rank and classify and categorise them.

sfmz · 3d ago
As you get the results send them out (using async methods). As they arrive auto-sort them according to default user preference which is probably sort-by-price. Users will notice the scrollbar has increased in size or some other visual cue.
debrajpal · 2d ago
hmm makes sense. I have some more thoughts on top of that in terms of exact product display UI