realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.69k stars 563 forks source link

Add fallback for web-sockets based connectivity #4492

Open untoldbyte opened 2 years ago

untoldbyte commented 2 years ago

Problem

We need to run our application behind proxies. Proxies can have web-sockets disabled Which leads to issues like below. The realmjs sdk should fallback to long polling or similar

Connection[1]: Connection closed due to error Connected to endpoint '65.0.217.240:443' (from '172.28.1.146:63305') ERROR: Websocket: Expected HTTP response 101 Switching Protocols, but received: HTTP/1.1 401 Unauthorized cache-control: no-cache, no-store, must-revalidate connection: close content-length: 212 content-type: application/json date: Wed, 13 Apr 2022 11:43:32 GMT server: envoy vary: Origin x-envoy-max-retries: 0 x-frame-options: DENY

Solution

The realmjs sdk should fallback to long polling or similar

How important is this improvement for you?

Dealbreaker

tomduncalf commented 2 years ago

Thanks for the suggestion @untoldbyte – I'll discuss this with the team and we'll update you with our thoughts