Skip to content

Notifications subsystem #192

@CMCDragonkai

Description

@CMCDragonkai

The notifications subsystem allows nodes from different gestalts to send messages to each other.

This is the way that users can tell other gestalts that they have shared a vault with them.

  • Number of messages must be limited possibly 10,000, afterwards the messages are dropped
  • Must use the ACL notify permission action
  • Need to consider that once a message is read by any, that message is kept around in the notification queue, but is considered to have been read

See https://gitlab.com/MatrixAI/Engineering/Polykey/js-polykey/-/merge_requests/204

Specification (from node notifications MR!161 in js-polykey):

  • Agent GRPC exposes sendMessage and readMessage.
  • Node GRPC exposes receiveMessage.
  • Client will trigger sendMessage to Agent.
  • Agent then connects to the node using NodeId and triggers a Node GRPC which is recieveMessage.
  • Other Agent will push messages to the Notification object.
  • Other Client can now shift all messages from the Notification object using readMessage that is a GRPC stream.

Note: gPRC calls should follow style outlined in #218

TODO

  • New domain notifications
  • Create Notification class
  • Inject ACL, DB, NodeManager as dependencies
  • Create the send and receive calls
  • Make a limit on the number of messages allowed
  • Check the ACL for permissions
  • Create the Agent GRPC calls to receive messages
  • Use the NodeManager to send out messages
  • Create tests for Notification class
  • Create pk notifications sub commands to introspect notifications
  • You might want to have a "read" status attached to each message indicating
  • Create tests for the pk notifications

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions