3 ms·
This is great news. I'm on iOS but I hope it will come to Android soon. I have a technical question: > We immediately realized that protocols like SIP, which
by weinzierl 10y ago
This is great news. I'm on iOS but I hope it will come to Android soon.
I have a technical question:
> We immediately realized that protocols like SIP, which traditionally required holding open long-lived connnections in order to receive incoming calls, were not going to be compatible with the mobile environment.
Ok, so far so good.
> Instead we built our own simple REST-based signaling protocol [...], and used push notifications instead of long-lived connections to notify the client of incoming calls.
So, no long lived connection but a "simple REST-based signaling protocol". How is that supposed to work without a long lived connection?
> Actual push notifications hadn't been invented yet, though, so we created our own push infrastructure by sending encoded SMS messages that the app would silently intercept and interpret instead.
OK, that's pretty clear again.
> Over time, we switched to push notifications when they were created by Google and Apple [...]
But don't push notifications basically work over a long lived connection?
Of course it's better to have just one long-lived connection to Apple instead of one for every communication App, but in the end if you want real time signalling in a mobile environment you won't get around a long lived connection, don't you? At least that is my understanding, but I'm always happy to learn something new.
- ymse 10y ago> But don't push notifications basically work over a long lived connection? Of course it's better to have just one long-lived connection to Apple instead of one for every communication App, but in the end if you want real time signalling in a mobile environment you won't get around a long lived connection, don't you? I think part of the convenience is on the server side. The server also only maintains a single connection to Google/Apple, instead of keeping millions of idle ones.
- maskz 10y ago> Today's Signal release for Android and iOS includes beta support for video calls. Android users like me can enjoy it too ! :)
- ploxiln 10y agoApple and Google make exceptions for their blessed push-notification services - just those services get reliable long-lived connections (and also have re-connection of course). Other applications, even with processes using some official API to run in the background, can be suspended or otherwise cut off to save power.
- josecastillo 10y agoMy read was that the SIP protocol was just less well suited to a mobile environment. Not merely that long-lived connections are bad, but that it would be inappropriate to use a long-lived connection that requires keepalive packets or loses user data every time the user goes underground (SMS queues up for delivery when the connection is re-established, and APNS will at least deliver the most recent push). Technically even the SMS solution requires a persistent connection, it's just the device's persistent connection to the cell network, which is presumably better tailored for the mobile use case.
- rixrax 10y agoSIP is unsuited for any environment. It is a disgrace of a protocol and a hot mess at that. At it's foundation it was designed to be 100% NAT incompatible and since it's inception bandage has been added to address this and it's other shortcomings. Faster we replace it with some/any alternative the better. From protocol design standpoint, SIP is so bad that it makes H.323 feel like a sane VoIP protocol (which it isn't). </rant>
- biot 10y agoYes, if you want real-time signalling you're generally going to need a persistent connection, long polling, or at minimum near-continuous regular polling depending on how "real-time" you want to get. For example, if your phone polls Apple/Google for any new push notifications every 3 seconds, does it matter that a Signal call takes 1.5 seconds (on average) to start ringing on the recipient's end? What they're mainly talking about, however, is that it's inappropriate to have a persistent connection (as would be required with SIP) continuously running in an app while the app is doing nothing but waiting for a call. Once that notification comes through and the call is accepted, then of course a persistent connection is required for the duration of the call. When the call is over, the Signal app can shut down all network traffic and wait to be reactivated via a mobile push notification when the next call comes in.
- NoGravitas 10y ago> But don't push notifications basically work over a long lived connection? It took me a while to understand this, and while other people have answered the question, I want to chime in in hopes it helps other people understand. Yes, push notifications work over a long-lived connection. The way push notifications in iOS and Android work is that all of your push notifications for all of your apps get sent over one long-lived connection, instead of one per app. Also, (at least on Android), the notifications can be held and batched, so that the device doesn't have to wake up as often to receive notifications. And finally, push notifications are handled by a system service that can wake up other applications, so that messaging applications can be aggressively hibernated to save power, and still receive notifications. The downside is that your notifications are all centralized. And while a well-designed app like Signal will only send a "wake-up" packet over the push notifications channel, it's still a worrying dependency for some people. There's a proposed RFC called webpush that would let you implement/choose your own push to be used by multiple apps: https://datatracker.ietf.org/wg/webpush/documents/ https://datatracker.ietf.org/wg/webpush/documents/