Hacker News new | ask | show | jobs
by debrajpal 325 days ago
Does that require a unique id generated for each search request? assuming that should be from the frontend?
1 comments

You can use the websocket pointer itself on the backend if you want.

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

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.

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.
hmm makes sense. I have some more thoughts on top of that in terms of exact product display UI