ably / ably-js

Javascript, Node, Typescript, React, React Native client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
312 stars 55 forks source link

Disable comet by default for react native? #710

Open SimonWoolf opened 3 years ago

SimonWoolf commented 3 years ago

Replaces https://github.com/ably/ideas/issues/437

Prompted by a customer querying why we were starting connections with comet. (Plus a question about whether connections were upgrading to ws correctly; needs more information).

@paddybyers:

I'd be inclined to say that we should just use ws by default on React Native, because we know that the underlying platform will support it.

@SimonWoolf:

I don't disagree, but that reasoning does also apply to modern browsers, and you've said before that you want to keep the comet->websocket upgrade sequence for those because of proxies that break websockets. Is there any reason react-native should be an exception? (Alternatively, do we now think that proxies that break websockets are now rare enough that we want to get rid of the upgrade sequence for browsers that do support websockets?)

┆Issue is synchronized with this Jira Story by Unito

paddybyers commented 3 years ago

do we now think that proxies that break websockets are now rare enough that we want to get rid of the upgrade sequence for browsers that do support websockets?

Nobody has complained of native apps being unable to connect when ws is the only available transport. Is the browser different (in that there can be a proxy configured there by some work policy, which doesn't apply to native apps)? If the browser is different, and it's valid to leave it there, then does that also apply to react native?