[guardian-dev] why Firefox needs GCM

Hans-Christoph Steiner hans at guardianproject.info
Fri Dec 15 09:43:37 EST 2017


I don't follow what SIM cards have to do with GCM?  These same NAT
limitations apply to non-mobile networks.

IPv6 should change the NAT part, but telecoms don't like to give up
control like that.  For example, IPv6 addresses are limitless so there
is no good reason to not just assign a block to each customer.  My ISP
still dynamically allocates IPv6, and that allocation changes every
couple of weeks.  My guess is that they do that so they can still sell
"static IP" as an extra add-on.

And NAT is probably still needed for IPv6 tunnels to IPv4.

.hc

Nathan of Guardian:
> IPv6 changes all this perhaps? Again though, GCM works just fine on any
> random wifi network, too, with tablet devices without sim card receiving
> "pushes". 
> 
> On Fri, Dec 15, 2017, at 04:16 AM, Hans-Christoph Steiner wrote:
>>
>> There is one piece of push services that only big companies can offer,
>> because only they can get the big telecoms to work with them.  Big
>> telecoms use "Carrier Grade NAT" throughout their networks.  NAT means
>> routers have to keep a table of the mappings between the real IP and
>> each client.  That table needs to be garbage collected so it does just
>> grow endlessly.
>>
>> When a TCP connection is open while a device drops off the network or
>> switches to wifi, then the NAT router can't know that the TCP is no
>> longer valid.  So they just have a timeout, they kill all old, inactive
>> TCP connections.  They might do that quite aggresively.
>>
>> Apple and Google then negotiate a deal to give special handling to the
>> TCP connection of their push services.
>>
>> Now, looking back, I've heard this from a number of people but I have
>> never seen data on what this actually looks like.  So maybe this is just
>> conjecture that has never really gone away.  It would be nice to have
>> some real data on this.
>>
>> .hc
>>
>> zoki:
>>> It's not so easy to just open a websocket and forget.
>>>
>>> You are loosing internet connection on a mobile device a lot of time and so
>>> you have to have a good logic behind to detect when your websocket is dead
>>> (pinging) and smart reconnecting logic.
>>>
>>> And if that's not enough you have a problem with background execution
>>> (restriction) and with every new version of Android with keeping wakelocks.
>>> Device will go to sleep and traffic bypasses you.
>>>
>>> Have gone through that path and it was pain :)
>>>
>>> On Thu, Dec 14, 2017, 14:29 Nathan of Guardian <nathan at guardianproject.info>
>>> wrote:
>>>
>>>> Yeah, but this perception always irks me:
>>>>
>>>> "Firefox for Desktop runs its own custom push service called `autopush`
>>>> that keeps long-lived Web Sockets open.  As you surely know, that's not
>>>> viable on a phone"
>>>>
>>>> Holding open a socket that has no data traversing it consumes almost no
>>>> power. GSM is essentially doing this themselves, how else does it work
>>>> on a wifi only device like a tablet?
>>>>
>>>> Perhaps a patch could be written for Fennec/Firefox to use the autopush
>>>> desktop service?
>>>>
>>>>
>>>> On 12/14/2017 03:39 AM, Hans-Christoph Steiner wrote:
>>>>>
>>>>> Finally, an answer to why Firefox needs GCM push services:
>>>>>
>>>> https://forum.f-droid.org/t/making-it-easier-for-f-droid-to-package-mozilla-firefox/1649/13
>>>>>
>>>>>
>>>>> -------- Forwarded Message --------
>>>>> Subject: [F-Droid Forum] [Apps] Making it easier for F-Droid to package
>>>>> Mozilla Firefox
>>>>> Date: Tue, 05 Dec 2017 18:33:53 +0000
>>>>> From: Nick Alexander <forum at f-droid.org>
>>>>>
>>>>> [quote="hans, post:12, topic:1649, full:true"]
>>>>> @nalexander about Google Play Services, what is the push stuff used for?
>>>>>  I never understand why Firefox needed its own push services.  But I do
>>>>> understand why push requires GCM on Android.
>>>>> [/quote]
>>>>>
>>>>> This I can answer, 'cuz I built most of this integration for Fennec :)
>>>>> The Firefox product family wants push services to support the [Web Push
>>>>> HTML5 spec](https://developer.mozilla.org/en-US/docs/Web/API/Push_API).
>>>>> This is a big part of the Progressive Web Apps initiative that aims to
>>>>> make developing rich App experiences possible using the Web Platform.
>>>>> Firefox for Desktop runs its own custom push service called `autopush`
>>>>> that keeps long-lived Web Sockets open.  As you surely know, that's not
>>>>> viable on a phone -- the OS is best positioned to do that work,
>>>>> potentially using side-channels from existing (carrier) channels.
>>>>> Therefore, Firefox for Android uses an `autopush` bridge to Google Cloud
>>>>> Messaging (and eventually will have to migrate to Firebase Cloud
>>>>> Messaging), and Firefox for iOS uses an `autopush` bridge to Apple Push
>>>>> Notification Service.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
>>>>> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
>>>>>
>>>> _______________________________________________
>>>> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
>>>> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
>>>>
>>>
>>
>> -- 
>> PGP fingerprint: EE66 20C7 136B 0D2C 456C  0A4D E9E2 8DEA 00AA 5556
>> https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE9E28DEA00AA5556
> 
> 

-- 
PGP fingerprint: EE66 20C7 136B 0D2C 456C  0A4D E9E2 8DEA 00AA 5556
https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE9E28DEA00AA5556


More information about the guardian-dev mailing list