Push events, NAT TCP connection timeouts, and device sleep
blog.fastmail.com
blog.fastmail.com
It is a tool that allows any number of clients behind NATs to communicate with a server behind a separate NAT with no port forwarding no DMZ setup, and no 3rd party involvement. The server does not need to know anything about the clients trying to connect.
It's basically a security vulnerability that became a de-facto standard because NAT was concocted by demons who gargle ball sweat. To kill kittens.
Am I reading that right? Safari permits a malicious web page to trivially keep the screen on your iDevice active until the battery is drained, or you navigate away from Safari or the web page?
If I am reading that right, that's a terribad decision on the part of the Safari folks.
I've also experienced "unwanted sleep" while reading lots of text in a browser or other app - having to keep a finger on the screen quickly gets rather annoying. I understand the desire to conserve battery, but I prefer to act in the I will sleep the device when I am done looking at it manner.
If you want the screen to not sleep, create a "Don't let the screen sleep" call in WebKit and encourage folks to use it. I mean "DPMS powersave toggle" seems to be a better -and easier- feature than "Tell this webpage my physical location".
The JMAP spec provides for eventsource and webhooks, but obviously an individual provider can offer more than that via an extension. When we do switch over to JMAP, we'll continue to use our custom method to register platform notifications.
> If the client sent some data down the connection to the server. Unfortunately the eventsource specification doesn’t provide any way to do this;
Solution: use websocket, which the client can actively ping the server.
You will need to detect this and apply a fallback mechanism.
Which goes back to the point of this post: easy in theory. Much harder in practice.
Where I work we ended up using Microsoft's signalr-library to avoid having to learn and tackle all of these issues ourselves.
Yet we still needed to add some additional Band-Aids around the libraries provided to be able to support all cases we wanted seamlessly.