Hacker Newsnew | past | comments | ask | show | jobs | submit | Chaosvex's commentslogin

The same Netflix that's been spats with Apple over avoiding app store fees by flouting policies that had other apps kicked out of the store? I'd suggest that it was, in fact, not good enough for Netflix.


No, those are abstraction over a TCP socket and introduce more complexity than you'd need for something like this. There's nothing wrong with occasionally polling for updates.


Web push, FCM, APNS, etc are free because they only have a single systemwide TCP channel open - and that channel is already open whether or not your app chooses to use it.

Your app can also be ready to receive notifications even when the app isn't running - using zero RAM. Inetd on Linux allows similar stuff (although no ability to handle ip changes or traverse NAT makes it fairly useless in the consumer world).

This stuff is important because polling dominates power use when idle - especially network polling which generally requires hundreds of milliseconds of system awakeness to handle tens of network packet arrivals simply for a basic http request.

Did you know, a typical android phone, if all polling is disabled, has a battery life of 45 days?


An android phone on airplane mode has a battery life of 45 days?


Airplane mode and the scheduler disabled, yes (ie. So Apps don't wake up every 5 mins and attempt to contact the network).

It's actually required by the qualification process for lots of carriers. The built in apps have pretty much no polling for this reason.

During the qualification test, it's actually connected to both LTE and WiFi, but not actually transferring any data.

They cheat a little - the phone is not signed into a Google account, which makes pretty much all Google apps go idle.


How does a user disable the scheduler?


That's quite oem specific, but usually 'battery saver' does it.


That's a lot of abstraction to implement a simple update check and I suspect it's very much not worth it to save a minuscule amount of battery life on a laptop. This is ignoring that you're incorrect about how Web Push works, so you'd need that extra TCP connection anyway and at that point, there's no point in bothering with Web Push. FCM is the same deal (and now you get to pay for extra stuff for a trivial problem, woo) and APN seems like the wrong solution to auto-updates.

Just poll every launch or 24 hours and move on.


I'm #1 and #2 ranks. ChatGPT is a bit loosey-goosey with translations and interprets 否例 as "negative example". It took a little messing with characters in Google Translate to come up with. Good fun.


Interesting that nobody brought up Discord, who recently(-ish) changed the typeface for chat messages in favour of a worse alternative, allegedly to avoid licensing costs.


> If you do some reading on how antenna on phones work combined with websockets heartbeat ping/pong and you should get the idea.

The implication is that the ping/pong keeps the system active when it wouldn't otherwise be necessary, but else are you receiving data or detecting lost connection with the other mechanisms? The lower layers have their own keepalives, so what's different?

I looked into it a little since it didn't make sense to me, unless you're comparing apples and oranges, but the only research I could find either didn't seem to support your stance or compared WebSockets to the alternative of just simply not being able to receive data in a timely manner.


Thanks again for this comment. Consider Cereal copied, now only a single function is required.


.h is the more common convention even in the C++ world.


Cool!! Did not know :)


I'm biased but in my experience, no, not at all.

I don't use the amalgamated version, though (that only exists for this standalone version) and the library overall is significantly smaller than either of those and doesn't drag in nearly as many standard library headers.


Thanks for the interesting link. :)


Agreed but just to clarify, Hexi sits at a level below something like MessagePack because it doesn't impose any particular encoding on you since the use-case was handling arbitrary binary protocols that you might not have any control over. You could build support for MessagePack on top of Hexi but not the other way around. They're all very different use-cases.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: