Closed subodhpareek18 closed 7 years ago
The replicator is intended for use with WebSocket clients only.
WebSockets can do anything a REST client can, but more efficiently
Yes that's true, WS would be my first choice as well. But I was currently facing issues with the authentication bits with the WebSocket client, @marshallswain is helping me debug that issue in this repo https://github.com/zusamann/feathers-socket-auth-issue.
Which is why for now I was trying to set this up using the REST client. But I won't be trying to do that anymore and probably create my own little replication engine helper in the meantime.
Implementing long polling is not currently on the roadmap.
Though the documentation already contains a section for periodic inspection https://docs.feathersjs.com/guides/offline-first/configure-realtime.html#example-using-periodic-inspection
I think it'll be really useful if the engine can do it on it's own internally. First check if the client transport is rest and if so start longpolling with a sensible default of
N
seconds, which can obviously be overridden via options.It could seem like magic at first, but I guess that's the entire point of this realtime engine, to simply replicate the records without us having to worry about how its doing so.