I develop an application, server side technology is asp.net web api, client side is javascript. In my application, I use Signalr to notify clients of updates - push notifications from server to clients.
All the signalr interaction happens outside of the Hub class, due to the pushes coming from HTTP requests and not from a client push to the server through signalr.
After proccessing a successful HTTP request I want to let all the clients beside the one who comitted the request to be notified.
Who should be responsible for those notifications? After processing a legal request, should my server just push a notification to the clients? (This is what I do at the moment) if this is the way to go how can I notify all the clients besides the one who made the request? Reminder - because the request was Http and not signalr push, the pushes to client side happens in a class outside of the Hub. Therefore I can't use the Context, or the Client.Others property as you would have probably suggested. How than could I know which clients should be notified? At the moment I just use Clients.All and the one who made the request is also notified which I don't like.
Option 2 is that after my server responses with a success status code. The client who made the request will be responsible to notify the other clients - meaning he will push message to the server, and the server will than push that notification to all the other clients (this time it will be within signalr Hub so I could use Clients.Others).
Which approach should I take?