-
Notifications
You must be signed in to change notification settings - Fork 5
Closed
Labels
designRequires designRequires designdevelopmentStandard developmentStandard developmentenhancementNew feature or requestNew feature or requestepicBig issue with multiple subissuesBig issue with multiple subissuesr&d:polykey:core activity 3Peer to Peer Federated HierarchyPeer to Peer Federated Hierarchyr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicesEnd to End Networking behind Consumer NAT Devices
Description
Specification
Unattended discovery was added in #320, however, there is no concept of priority within the queue. There are three ways that a vertex (a node or identity) can be added to the discovery queue, and they should follow this order of priority:
- Manually, via the discovery methods
queueDiscoveryByNode()andqueueDiscoveryByIdentity()(these are called in the commandsidentities discover(explicit discovery) andidentities trust(explicitly setting a permission, so we want the Gestalt to be updated via discovery). - As a step in the discovery process whereby child vertices are added into the discovery queue in order to discover the entire connected gestalt.
- Automatically by a process of rediscovery when we want to update existing Gestalts in the Gestalt Graph (to be addressed in Discovery - revisiting Gestalt Vertices and error handling #328).
Vertexes with a higher priority should be discovered first, either by being placed at the front of the queue or by modifying the traversal method of the queue. The priority queue could also be further optimised by grouping vertices from the same gestalt together when this is known (for example when adding child vertices).
Additional context
- Original PR for implementing Unattended Discovery: Growing the Gestalt Graph and Implementing Social Discovery #320
- Issue for re-adding discovered vertices into the queue to update the gestalt graph Discovery - revisiting Gestalt Vertices and error handling #328
- Indexing Domains and DB Levels for Faster & Flexible Lookup #188 - Indexing the LevelDB may be required to be able to implement a persistent priority queue
- Integrate Automatic Indexing into DB js-db#1 - general indexing into js-db
- https://nicolas-van.github.io/modern-async/modern-async/1.1.0/Queue.html
Tasks
- Modify the existing Discovery Queue to be a Priority Queue
- Ensure that when a user interactively wants to discover a gestalt vertex that it becomes the highest priority and gets executed first
- Look into the potential for further optimising the priority queue, for example by having multiple points of comparison with varying levels of importance that can influence the priority of a particular vertex in the queue
Metadata
Metadata
Assignees
Labels
designRequires designRequires designdevelopmentStandard developmentStandard developmentenhancementNew feature or requestNew feature or requestepicBig issue with multiple subissuesBig issue with multiple subissuesr&d:polykey:core activity 3Peer to Peer Federated HierarchyPeer to Peer Federated Hierarchyr&d:polykey:core activity 4End to End Networking behind Consumer NAT DevicesEnd to End Networking behind Consumer NAT Devices