-
Notifications
You must be signed in to change notification settings - Fork 5
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
Background Discovery Mechanisms #691
Comments
Looking over the code. The main change is basically scheduling a vertex to be processed again after it has just been processed. We want to add a reasonable delay here that is configurable and has a default in the config. The logic will function something like
We'll need a way to tell apart vertices that are scheduled for re-discovery vs ones that are in an active queue. This could just be a slight difference in the task path. I think we can just modify The other half to this is tracking the last time a vertex was processed. then we can decide to skip a vertex if it was seen too soon. Also track the number of failures and just remove a vertex from the queue if it fails for too many attempts. |
Now we could schedule a new |
I'm getting a transaction conflict trying to reschedule inside of the handler. It's hard to say what exactly is conflicting here but I'm guessing it's a transaction wrapping the task. I need to explore this more. |
We're now tracking the last time a vertex was processed. We use this when deciding to process a vertex by checking if it was last processed within a certain amount of time. I'll need to add some logic so we can force re-discovery of a gestalt ignoring this time based skipping of a vertex. To do this we need some way to track and ignore an exclusion for just one time. This exclusion needs to be applied to each child step of the process as well. Actually I think there's a way we can handle this by using a different time for the skipping mechanism. Skipping works checking the last processed time of a vertex and comparing it with |
Part of working on this I updated how the vertex skipping is handled. I'm going to cherry pick this into staging and release it. It should address an issue we've been having with the CLI. |
On reflection, it makes more sense for the persistent data to be part of the gestalt domain. so the utilities for getting and updating the last time a vertex was processed needs to be move into the |
Specification
Currently, discovery must be manually triggered by the user by running
identities discover
on the Polykey CLI.We would like for authenticated identities to supply connected identities for our discovery mechanism to automatically discover.
Hence, when we authenticate with a particular identity provider, Github.com for example, we should add all friends/followers/following identities to be added to the discovery queue.
We should also queue tasks that poll all friends/followers/following identities and queue them to be discovered periodically.
This would allow for new nodes that join a gestalt to be automatically detected by other nodes, and apply permissions appropriately.
Additional context
MatrixAI/Polykey-CLI#30
#626 (comment)
Tasks
The text was updated successfully, but these errors were encountered: