This Forum is ARCHIVE only
For LightSwitch questions,
please use the official forums at:

http://social.msdn.microsoft.com/forums/en-US/lightswitch/threads


pushing server generated notifications onto the HTML Client via signalR
Last Post 10 Jul 2013 08:46 AM by Dedoone. 5 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
DedoOneUser is Offline
New Member
New Member
Send Private Message
Posts:14
Avatar

--
09 Jul 2013 08:12 PM

    I am trying to push server generated notifications onto the HTML Client via signalR.

    Mat Sampson has a great Blog posting on how to do it here: http://blogs.msdn.com/b/rmattsampso...witch.aspx

    However, his example pushes the notification to ALL clients, rather than to the specific client which created/updated the record.

    Unfortunately to achieve this, the task becomes much more complicated as the User’s connection now has to be mapped. I have been unsuccessful in achieving this via a ConcurrentDictionary approach towards the context.Clients.Client(connectionId).send(message)method, at least within a Lightswitch context.

    After many hours of efforts, I fear it is currently beyond my ability to implement.

    Any help would be most welcomed.

    Cheers,

    Roger

    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1313
    Avatar

    --
    09 Jul 2013 09:24 PM
    We will post a new SignalR example next month.
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    DedoOneUser is Offline
    New Member
    New Member
    Send Private Message
    Posts:14
    Avatar

    --
    10 Jul 2013 06:07 AM
    That would be tremendously cool Michael, as there currently exists nothing out there in which to example from within the context of Lightswitch.

    Even if I did manage to get it to compile correctly, the static dictionary is not the optimal route in which to take. Holding these connections persistently within a table is the best approach.

    It would simply be very, very, very cool to push validation notifications on to a specific client.

    If I manage to accomplish this, I’ll post it here. In the interim, I’ll wait with baited breath for yours Michael.

    Once again, thanks so much for all your wonderful help.

    Roger
    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1313
    Avatar

    --
    10 Jul 2013 06:22 AM
    It will not be posted by me but another of the Blogger, Richard Waddell. He has working code but he is polishing it and he plans to write a detailed article about it. He has a full-time job outside of LightSwitch so he works on it on the weekends. This is the reason for the delay.
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    Michael WashingtonUser is Offline
    Send Private Message
    Posts:1313
    Avatar

    --
    10 Jul 2013 06:23 AM
    -----------
    Michael Washington
    http://LightSwitchHelpWebsite.com
    DedoOneUser is Offline
    New Member
    New Member
    Send Private Message
    Posts:14
    Avatar

    --
    10 Jul 2013 08:46 AM
    I thought about using single user groups, although via a hub. The draw-back to single user groups are noted here: http://www.tugberkugurlu.com/archiv...tion-users

    Using persistent connections is certainly another approach in which to use, rather than creating a hub. David Fowler notes the advantages of using a hub over a persistent connection here: http://stackoverflow.com/questions/...connection

    Thank you for the link Michael, I’ll grab a cup of java and settle into it for a read.
    You are not authorized to post a reply.


    Microsoft Visual Studio is a registered trademark of Microsoft Corporation / LightSwitch is a registered trademark of Microsoft Corporation