Lawo / ember-plus

Ember+ control protocol - Slick and free for all!
https://github.com/Lawo/ember-plus/wiki
Boost Software License 1.0
109 stars 41 forks source link

No method for the provider to tell the consumer that a node has been removed #80

Closed stian-barnfind closed 5 years ago

stian-barnfind commented 6 years ago

Let us say that your provider has dynamic configuration, due to for instance insertion of plugin-modules.

When a module is inserted, the provider can simply send the node information to the consumer, and the consumer happily knows about the new nodes. But if the module is removed, there now are some issues:

If the consumer tries to re-scan a node that no longer is present, you can not return an error. The only way a consumer can detect removal of nodes per today is to rescan the tree, and see for branches and nodes no longer present in their parents GetDir call.

astedler commented 6 years ago

Be careful, a node MUST NOT be removed in a running session, but you may set this node to be offline at any time. As long as a consumer holds the connection it is not allowde to remove it. You may force ALL CLIENTS to rescan the tree structure by disconnecting them. If you do not want this, just set the node to be offline.