which one is better to use SignalR or requestanimationframe? - signalr

I have been developing an application which contains instant notifications but I am a little confused about what is the best to use to get instant notifications, is it better to use the client side requestanimationframe method or to use signalR?.
so please could anyone explain which one should I use and why.

This is one of the best use cases for SignalR. Create a Hub on which you connect your client and send notifications from there.
You can have a look here - http://www.codeproject.com/Tips/672433/Real-time-Notifications-with-SignalR
Hope this helps! Best of luck!

Related

Feasible to extend WebChat control to connect with Signal R

I have a use case where I want to build a portal for Agent Login and Registry and allow conversation to be transferred from Bot to an agent.
Looking at this article for possibilities -
https://blogs.msdn.microsoft.com/jamiedalton/2017/08/10/microsoft-bot-framework-handing-off-to-a-human-for-agentssupervisors-with-c-and-the-botbuilder-sdk/
The handoff should happen from customer using webchat and bot logic is coded in C#. The steps that I could think of -
User asks for handoff
The Bot logic connects the conversation to signalr hub on server side
The next conversation takes place directly using this hub.
Need to know if someone implemented such use case. What should be approach for creating this?
Look over the intermediator bot sample. It is designed to work with v4 of the BotFramework demonstrating bot-to-human hand-off in C#. You will, of course, need to adapt it to work with SignalR. But, I don't see any reason it couldn't be configured to do so.

Architect website/mobile notifications generated by users activities

I am working on a mobile application, this application has some features like users can follow each others, adding comments or reviews, like something .. etc.
So the requirement is we have notifications icon in the app, when the user click on it a list of notification will show up, taken in consider those notifications should be real time.
Many things comes to my mind will reviewing this feature, like using firebase to send the notification, or I can develop internal notification service for this purpose.
The question is what do you suggest guys, do you think using firebase is a good idea for such case? or there is something else you recommend for such case
Thank you in advance.
You can try signalR more manageable than firebase but you need to know programing to manage signalR

Send push notifications with PHP

I am thinking of trying to implement push notifications into my website. Essentially I would just need to message individual users of personal updates not everyone that has agreed. I have looked and researched a lot and its confusing where to start, what I need, what language to use etc.
I use 1and1.co.uk for my hosting and would like to use PHP to instigate the push. Is this possible from what they offer and if so where do I start?
All the paid stuff seems to offer just bulk notifications and that is not what I need and why should I pay for it if its possible to do myself.
Also how difficult and time consuming is the process?
If I get enough advice and manage to get it working, I will write a step by step tuition as there is nothing out there with a simple answer and instructions.
Thanks and regards
If you don't need it in time, you can do it using Ajax polling, which means executing Ajax requests every few seconds.

How to Push some data from Database to asp.net webform?

I want to push some thing (like Notification) to user's page, i tried a function that search database and then DB had new notification, it showed the Notification to us, but it was a bad way, someone know how i can do it better?
You can use Comet or SignalR. This is a LINK to explain how use it
You need to implement Client side side based code, so use ajax and java script to that...

Turn by Turn game: Use SignalR or both SignalR and REST API?

I'm write a turn-by-turn mobile game. Each game have 2 minutes. So every two minutes server will calculate rank and generate next game to clients. I use Asp.net to write server.
I choose SignalR to communicate between client and server. I have 2 choices for implementing games:
1) Use SignalR only to communicate with clients
2) Use SignalR to notify client, and use REST API to get or update information of game.
Could you please advice me what choice is better and please explain detail.
Thanks in advance.
While I am not a SignalR expert, I can definitely tell you this:
Since you have chosen SignalR, use it for all the tasks it can perform.
Sending updated information about the game to the client definitely seems like a task for SignalR. Having a separate REST api is unnecessary.
Sending a message via SignalR that the state has updated, and client should make a REST call to get the updated information, is an unnecessary extra request. I would avoid it and use SignalR to send the updated information.

Resources