Timeline for How do desktop applications get notified of events over the internet?
Current License: CC BY-SA 4.0
19 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 16, 2021 at 6:19 | vote | accept | LevelRin | ||
| Dec 15, 2021 at 9:46 | history | edited | JanRecker | CC BY-SA 4.0 |
edited body
|
| Dec 15, 2021 at 0:02 | comment | added | Stack Exchange Broke The Law | Because we are talking about a desktop app none of these tricks are required. The client can simply connect to the server and leave the connection open. When something happens, the server can tell the client using the open connection. Web apps and mobile apps only have more limited ways to communicate, but this is not one! | |
| Dec 14, 2021 at 21:06 | comment | added | JanRecker | @Bergi You are right. As i wrote, that rarely works. Yep the client can inform the server about his address by any request (a ping would be enough), but as soon as a vpn, firewall or something similar is in between, problems can/will occur. Therefore this is more a theoretical approach, just to mention it (in rare circumstances this may be a solution), then an approach i would advise in general | |
| Dec 14, 2021 at 19:17 | comment | added | Bergi | "Client sends his address to the server, then the server can connect." sounds weird, can you clarify? Also I don't see why the client would need to "send" its internet address - the server does automatically receive it as the sender address. | |
| S Dec 14, 2021 at 19:06 | history | suggested | jiwopene | CC BY-SA 4.0 |
WS are not another option to this.
|
| Dec 14, 2021 at 18:18 | comment | added | slebetman | @computercarguy Basically Apple's push notification works by having your server PUSH data to Apple's server and your iPhone PULL data from Apple's server. Apple manages how the data gets from Apple's servers to the device and an API manages how the data gets to your app. | |
| Dec 14, 2021 at 18:15 | comment | added | slebetman | @computercarguy Apple's push notification works by having the device (iPhone, iPad, Apple Watch etc.) poll Apple's server using a TLS connection (a TLS encrypted TCP/IP connection just like HTTPS). The difference with desktop apps is that it is not YOUR SOFTWARE that makes the poll request but the OS itself that polls for ALL installed apps. This central polling allows push notification to save power. See Apple's own docs: developer.apple.com/library/archive/documentation/… | |
| Dec 14, 2021 at 18:12 | comment | added | jcaron | iOS devices can receive notifications over cellular even if connected to WiFi (and even if WiFi is blocked) AND can receive notifications over WiFi if no cellular. | |
| Dec 14, 2021 at 17:20 | comment | added | Tim | @computercarguy 100% that's not how iOS's push notifications work. I assume Android is the same. But I regularly get push notifications via WiFi when out of range of GSM. It must be the case it's internet only, because Apple sells WiFi-only iPads, which definitely get push notifications. "Each device establishes an accredited and encrypted IP connection with the service and receives notifications over this persistent connection". There are some GSM-only "notifications" which can look like push notifications (public health alerts, severe weather, etc) but that's the exception. | |
| Dec 14, 2021 at 16:38 | comment | added | Zach Lipton | Push notifications still work without a SIM card or cellular service. The difference is that mobile devices have OS-level push notification services, where (e.g.) Apple or Google deliver notifications to devices on behalf of applications. Individual mobile apps just tell the OS they're interested in receiving notifications and the infrastructure is provided by the platform. More recently, similar services are available for some desktop OSes, such as WNS. | |
| Dec 14, 2021 at 16:30 | review | Suggested edits | |||
| S Dec 14, 2021 at 19:06 | |||||
| Dec 14, 2021 at 16:24 | comment | added | computercarguy | @Tim, even when a mobile device is on a WIFI network, it's still connected to the cellular service, which is how it would get those push notifications. I'd bet that if you lost cell signal, but managed to keep your WIFI signal, the push notifications would end. | |
| Dec 14, 2021 at 16:17 | comment | added | Barmar | Mobile, desktop, and web apps often use the same communication techniques (HTTP and WebSockets), as this makes it easier to develop and maintain all versions of the application. | |
| Dec 14, 2021 at 16:13 | comment | added | Tim | @PhillW. Phones still get push notifications when on WiFi / behind a corporate firewall. So that doesn’t explain it fully | |
| Dec 14, 2021 at 13:09 | comment | added | gnasher729 | Push notifications for mobile devices are often done on the phone network level, not on the normal networking level. That means the power consumption can be extremely low, just like for a phone that accepts phone calls at any time. That only works when you have a device with an actual SIM card. | |
| Dec 14, 2021 at 12:20 | comment | added | Phill W. | Mobile devices are "Out There" and "always on" the network and so are far more "reachable" by the servers that are trying to "push" things to them. [Corporate] desktops are generally hidden behind Firewalls that block anything being "pushed" to them from outside. This is why /polling/ is still considered a perfectly reasonable option for such machines. | |
| Dec 14, 2021 at 6:38 | comment | added | LevelRin | Thanks, so it seems it's normal to follow the general web approach for desktop applications. I was wondering if other approaches are the norm such as the push notification mechanism for mobile applications. | |
| Dec 14, 2021 at 6:25 | history | answered | JanRecker | CC BY-SA 4.0 |