Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
max199313682ySaving 97% of the bandwidth used is not unnessesary as that bandwidth can be used to support more users or reduce costs for using less bandwidth.
How was the Ajax structured, longpoll or individuele request every 1 second(or more)? -
@darkwind unfortunately it doesn't appear to have a JavaScript implementation and this is a web dashboard.
-
max199313682y
-
@max19931 still not seeing the advantage of gRPC over native websockets with well defined, JSON based packages (C# backend, TypeScript frontend).
-
@kwilliams @darkwind
"Best" option.
I really wanna take a frying pan and hit you with it...
There is hardly a best approach unless you do a very in depth analysis.
GRPC is nice, without a question.
It is highly optimized for the use case of "making the most of bandwidth" - which is for companies like Google / ... the most important criteria.
For any regular web application, small service or anything else that doesn't do much it's less important.
What the author did, which was a wise choice, is take the low hanging fruit and replace a constant polling approach with an even driven approach.
That's a change of paradigm. Websockets are still the common HTTP - thus not even the technology changes.
Putting GRPC inside is an entirely different thing.
It's changing technology, transport and paradigm.
Extremely costly for what won't provide a meaningful benefit in a regular standalone app that probably doesn't have a high frequency usage...
"Best" option is what triggered me here, as "best" would mean burning time and money with most likely no gain (yes it will be faster, yes it will have less traffic - but most likely no one cares (except for the invoice for hours spent)). -
@IntrusionCM
The OP said it was "unnecessary" and that he just wanted to do some dev with websockets. As there's a dramatic increase in performance, I think that can be said to have gone well. No-one's spending time on an "in-depth analysis", which truly would be a waste of effort and resource. -
@spongegeoff you should have read the fine print.
My comment was about GRPC - not about what the author did.
Reread it. :) -
-
@spongegeoff that was meant for dark winds comment regarding best option.
My bad, brain is funky fluffy at the moment.
Managed a 97% reduction in bandwidth usage for our internal host monitoring tool by converting the dashboard from using AJAX polling to websocket events.
Completely unnecessary but wanted an excuse to do some development with websockets. (:
rant