Skip to content

Conversation

dr7ana
Copy link

@dr7ana dr7ana commented Feb 9, 2023

Draft PR

Ideal Control Flow:

  1. message comes in HTTP request
  2. unpacked/parsed/verified/permissions checked
  3. comes into relevant route (ex: add_post())
  4. sends off to mule to be handled by bots
  5. mule has ordered list of bots by priority
  6. mule passes message to bots, which have fixed return values (insert, do not insert)
  7. if all bots approve, mule replies to worker with go ahead or vice versa for no go

Architectural Changes:

  • OMQ object is siloed in OMQ class
  • Mule object is siloed in Mule class and is accessible by global variable omq_global
  • Bots are managed by Manager class and held in a self-ordering "priority-queue"-like dictionary
  • User permission/authorization functionalities siloed in sogs/authentication/authority.py

TODO:

  • Create root-level folder for all authentication things related to user permissions; bot manager should just check for things like is_allowed_to_message()
  • Add OMQ-level logic to adding and removing bots
  • Flesh out a sample bot implementation (to replace model/bot.py) with SimpleFilter functionality to test against
    • Implement iterative polling logic in BotQueue
    • Test edge cases in bot polling

@dr7ana dr7ana requested a review from jagerman February 9, 2023 00:33
dr7ana added 2 commits March 17, 2023 07:40
…nnections, implementation of OMQ request handling underway, re-writing subrequest and onion-request handling to process omq requests
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

Successfully merging this pull request may close these issues.

4 participants