Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define general behavior for object notifications #193

Closed
alexvanin opened this issue Feb 11, 2022 · 5 comments
Closed

Define general behavior for object notifications #193

alexvanin opened this issue Feb 11, 2022 · 5 comments
Assignees

Comments

@alexvanin
Copy link
Contributor

NeoFS Storage node should support notification extension: optional notification channel to produce events. This channel and event structure defined depending on extension implementation. API should define general behavior for object notifications (maybe in neofs-spec?) and well-known object attributes.

General behavior:

  • Notification event consists of topic and message
  • There is only object notifications for now
  • Object notification message is always object address (format defined by notification extension)
  • Object notification topic is defined in __NEOFS__TICK_TOPIC header (UTF-8 string)
  • Node produces object notifications at epoch defined in __NEOFS__TICK_EPOCH header which is Base10 encoded number
  • Node produces object notification if both __NEOFS__TICK_TOPIC and __NEOFS__TICK_EPOCH are set in object attributes
@carpawell
Copy link
Member

@realloc, btw, should the attributes be separated?

what behavior is expected when there is only one of them presented?

@realloc
Copy link

realloc commented Feb 15, 2022

If there is only TOPIC attribute set, it will have no effect and will never be taken into account.
If there is only TICK attribute set, it should send event to the default topic, as configured in Storage Node settings. The default notification settings may be different depending on the transport and are out of the scope of API description.

@carpawell
Copy link
Member

If there is only TICK attribute set, it should send event to the default topic

what should a node do when there is no default topic in the config:

  1. do not start at all;
  2. start and try to fetch topic from attributes, if there is no such attr, skip it with a warning?

@realloc
Copy link

realloc commented Feb 15, 2022

what should a node do when there is no default topic in the config:

That's incorrect configuration. Since each config parameter must have a default attribute (if it makes sense in each particular cease), such situation can't arise normally.

For node's default topic default value let's use it's node id.

@carpawell carpawell removed their assignment Feb 17, 2022
@cthulhu-rider
Copy link
Contributor

Moved to neofs-spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants