You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Developers need to poll the filesystem to detect changes.
Impact
Extra work and complexity for developers.
Solution
Add an interface to subscribe to any change to WNFS. The interface should notify developers when a change occurs locally and remotely.
Detail
It's currently possible to add a callback to the WNFS publish hooks, which are called when a change is made locally. We can likely use the existing work as a starting point or hook into it.
The text was updated successfully, but these errors were encountered:
A couple of rough ideas for how we might implement this feature:
Add an event emitter that emits local and remote change events
Make the event emitter available to developers at webnative initialization
Emit local events based on existing publish hooks
After each local event, poll internally for remote changes and and emit an event when change is confirmed remotely
Note that this would be a first quick implementation with a focus on getting it working and establishing a good interface. A subsequent implementation could set up PubSub with the server over a websockets channel to remove the internal polling.
Summary
Problem
Developers need to poll the filesystem to detect changes.
Impact
Extra work and complexity for developers.
Solution
Add an interface to subscribe to any change to WNFS. The interface should notify developers when a change occurs locally and remotely.
Detail
It's currently possible to add a callback to the WNFS publish hooks, which are called when a change is made locally. We can likely use the existing work as a starting point or hook into it.
The text was updated successfully, but these errors were encountered: