Skip to content

No notifications for appearing/disappearing subnodes? #16

Description

@prizmod

Hello there.

First of all, I really appreciate the amount of work you've put into overhauling this library!

I have previously been using the evs-broadcast fork of this lib in a project of mine and your version has addressed many of the issues I had experienced.

However, I am facing the following issue:

What's the problem?

Suppose there is a Node X which is already known to the consumer. The consumer queries the children of X by sending a getDirectory request to the provider. The provider tells the consumer that X has one child: The Node Y.

Now suppose that after some time, the provider creates an additional Node Z as a child of X. Since the consumer previously performed a getDirectory on X, the new child Z will be reported by the provider.

The EmberClient actually handles this correctly and adds Z as a child to X. However, there seems to be no (obvious) way to receive any sort of notification about this in the node-emberplus library!

The same applies to a scenario where Node Y is removed (isOnline=false).

I would have expected to be notified through the callback I can provide when calling EmberClient.getDirectory, but that only works for Parameter/Matrix nodes.

Why is it relevant?

I have a usecase where I need to "listen" for the creation and deletion of subnodes (actually subtrees in my case) below a certain Node. Everytime a subnode appears, I instantiate an object which serves as a functional representation of the structures below this subnode. Once the subnode disappears, I need to discard this instance.

How can it be reproduced?

  1. Connect to an Ember+ provider.
  2. Query the children of a node by sending a getDirectory request.
  3. Perform an action on the provider that causes children to appear (or disappear).
  4. Go sit in a corner and cry because the Node doesn't tell you anything about this! /s

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions