Ticket #323 (new enhancement) — at Initial Version

Opened 4 years ago

Last modified 4 years ago

Notification message

Reported by: dread Owned by: dread
Priority: blocker Milestone: v1.1
Component: ckan Keywords:
Cc: Repository:
Theme:

Description

Which events to notify on

Listed by domain object, these are the notification message 'change types' that will be sent:

  • Package - 'new', 'changed' (include changes to a package's 'related' objects: tag, group, resources, extra), 'deleted' (for when 'state' becomes 'deleted' or object is completely purged)
  • Group - 'changed' (Group metadata changed), 'packages' (the group's package membership has changed), 'deleted'
  • Tag - 'changed' (List of packages that use this tag has changed)
  • Rating - 'changed' (a user has provided a new or changed rating)

Also it is clear that it could be useful to know when db-wide maintenance is carried out:

  • db - 'clean', 'rebuild' (db is wiped and replaced with new data), 'upgrade' (migration)

Ignored domain objects

These parts of the domain model will not carry notifications as no use case has been identified for them:

  • User - list of users is sensitive info
  • Relationships - complicated
  • Authz - complicated and sensitive info
  • License - change of a license's metadata is a question for the 'license service'

Message format

A notification message's header contains the routing key, identifying the object and ID. The client is probably interested in the object (all use cases so far), so it makes sense to send the object in the payload. This should be the JSON-encoded dictionary exactly as provided for the object's REST Entity.

For the 'db' notifications there shall be no payload.

Note: See TracTickets for help on using tickets.