Updating Multiple instance of the same page in real time
What is the currently best way to achieve that in C# (be that .net core or mvc projects) without relying on third party / nuget tools ?
For example: Pressing a button to create a cell will do it across all instance of the same page be that 2 3 4 5 etc without having to refresh it.
18 Replies
What exactly is an instance of a page here? Do you mean in multiple clients (aka browsers)?
Like, Pobiega and I have
coolapp.com/table
open, you click a button, and we all see a new cell added?
If, so then SignalR or some suchIf thats the case, SignalR would be the go-to answer, but thats a nuget
With JS in the frontend
Or Blazor
Like let's say a simple page that adds something to it but if i have it open twice if i interact with one it updates on both
SignalR.
so if the client has multiple identical instance open they are all updated real time
or Blazor, which uses SignalR/websockets under the hood
i have to do it without third party tools / nu gets
but then your entire FE is blazor, which may or may not be what you want
is that possible ?
its gonna be a nightmare, but sure
:owodespair:
just roll your own websocket implementation
so websocket is the goto then?
HTTP is entirely request/response based
you cant do live updates or the server pushing anything with normal HTTP
thats why websockets exist
Does SignalR and/or Blazor count as 3rd party...?
Well, you could technically do long/short polling
Or even SSE
So Websockets are not the only way
hmmm
Maybe SignalR could work with the requirements
Thank you for the info / suggestion