reTHINK-project / dev-registry-domain

Domain Registry
Apache License 2.0
1 stars 1 forks source link

notification about entities that are back to live #32

Closed pchainho closed 7 years ago

pchainho commented 8 years ago

As discussed here

rjflp commented 8 years ago

One possible way to do this, maintaining the REST interface:

To request notification

When there is a change:

rjflp commented 7 years ago

Status update: -Methods mostly implemented in the Domain Registry. Still missing database storage. -Connector still Work In Progress -Runtime still WIP

rjflp commented 7 years ago

@pchainho When the runtime receives the notification, from the message node, that the hyperty is back, what should happen?

nunofmn commented 7 years ago

@pchainho, what do need to implement here from the connector side? The specs only define a message to the Message Node Subscription Manager.

pchainho commented 7 years ago

As far as I remember, the connector only has to publish status changes:

nunofmn commented 7 years ago

But there is this message also: https://github.com/reTHINK-project/specs/blob/master/messages/registration-messages.md#subscribe-to-receive-notifications-about-registration-status-changes

Is the Subscription Manager that contacts the Domain Registry directly?

pchainho commented 7 years ago

No, it is the MN that broadcasts the published status change to all subscribers using pub—sub

nunofmn commented 7 years ago

In order to this to work is still necessary to implement the "notification" functionality in the Runtime side. Our proposal of API that should be exposed by the Service Framework is simple:

From the Runtime <-> Subscription Manager comunication, this will have the following interactions:

@pchainho seems ok?

pchainho commented 7 years ago

As discussed in Slack I would propose a more developer friendly API in the service framework discovery lib, where each returned discovered object will support a onLive() and a onDisconnect() event handler.

BernardoMG commented 7 years ago

This issue is complete.

The changes are in branch: hyperty-notification (service-framework); disconnected-hyperties (runtime-core); connector-release-1.0.0 (msg-node-vertx); 32-connector-sm (registry-domain).

This issue will be closed after the next release.

BernardoMG commented 7 years ago

We are replicating the notifications feature to data objects.

BernardoMG commented 7 years ago

Notification feature is now available not only for hyperties but also for data objects.

The changes are in branch: hyperty-notification (service-framework); disconnected-hyperties (runtime-core); connector-release-1.0.0 (msg-node-vertx); 32-connector-sm (registry-domain).

This issue will be closed after the next release.

pchainho commented 7 years ago

I've found some issues when testing with UserAvailability Hyperties at hyperty-notification branch from dev-hyperty repo:

  1. when unregistering HypertyAvailabilityReporter, executing runtime.registry.unregisterAllHyperties(); in the browser console I receive a "not found" response:

pasted image at 2017_06_21 01_01 pm

then, if from HypertyAvailabilityObserver side I try to discover this Hyperty, I got results with "status = live":

pasted image at 2017_06_21 01_03 pm

  1. when the expires is set to 30 sec in the UserAvailabilityReporter Hyperty configuration, and after the UserAvailabilityObserver subscribes the reporter, if I close the windows browser without explicitely unregistering the hyperty (ie sending an update message with status = disconnected), the UserAvailabilityObserver does not receive the onDisconnect event when the Hyperty registration expires (after 30 secs)
BernardoMG commented 7 years ago

Hi @pchainho .

  1. The resource field is wrong. Should be only: hyperty://localhost/cc5a34be-d08b-4ff6-a21b-7859690b85b5.

  2. And that is correct, according to the implementation. The HeartBeatThread runs only after one hour. So, unless you make a GET request for the hyperty that validates the expire field, you should wait for the HeartBeatThread.

BernardoMG commented 7 years ago

This issue should be fixed in later versions.

Closing for now.