Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
seregrail7
Nov 3, 2006

Ochowie posted:

Does anyone have any good SignalR resources? Or has anyone used SignalR and can provide some feedback? I'm trying to send messages with different subsets of a dataset to different clients and I'm not seeing any good guides on how to do that. As an example, I'd like to update stock quotes only for stocks in a given clients portfolio rather than just send all stock quotes and have the client decide which ones to display. I'm not sure that SignalR is the right method for this task but I wanted to play around with it and this seemed like a decent learning application to try.

I've worked on something similar where I need to push out data from a data set where it's different content for each user. What I did was treat the user as a group using their ID as the group name and then build up the data that they should see and send just that in the update(I presume if you're dealing with user portfolios you have what they should see stored some how). You will be repeating some of the data you send out for sure but it was the least messy method I could come up with. I set up a Hub to deal with security for users connecting and handling all the updates to the dataset since it's all data that's constantly changing.

You can read more about Hubs here: http://www.asp.net/signalr/overview/signalr-20/hubs-api/hubs-api-guide-server

My system only has about 30 users currently though so I have no idea if it will scale up well.

Adbot
ADBOT LOVES YOU

seregrail7
Nov 3, 2006
It was SingalR 1 that I used and I followed this guide: http://www.asp.net/signalr/overview/signalr-1x/getting-started-with-aspnet-signalr/tutorial-server-broadcast-with-aspnet-signalr

Essentially you create a Broadcaster that's a Singleton which holds onto all the information while your Hub just tells it about new connections etc.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply