Skip to content
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

Move dispatcher into its own program #79

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Conversation

Douile
Copy link
Member

@Douile Douile commented Nov 15, 2023

This is required before implementing #67

What is this branch

This branch is moving the dispatcher component (part that queries game server state, generates a status message, and
sends that message to discord), into its own seperate program from the main bot.

The reasons for doing so are as follows:

  • Simplify code-base
  • Allow for rewriting the bot
    • Dispatching requires node-gamedig, a javascript library, so by seperating this out we can rewrite the main bot part
      in any language we like
  • Allow for running N dispatchers
    • More easily spread the load of querying from multiple servers without needing a discord websocket connected

TODO:

Required

Scheduler

  • Store metadata on status (or in seperate table)
    • last updated time
    • updated by (dispatcher ID)
  • Store client errors
    • error code
    • error message
    • dispatcher ID
    • (server offline is not an error)
  • Use TLS for postgres

Dispatcher

  • Send ID to scheduler
    • Login packet?
      • Scheduler can have allowlist for IP - ID + secret
  • Better transport medium
    • encrypted
    • more efficient that JSON: protobuf, CBOR
  • Implement local IP blocklist (in runtime indepedent way)
  • Get working on different runtimes
  • Make a common query library to be used by both the bot and dispatcher

Docs

  • Update docs

Nice to have

Scheduler

  • Don't use arcs for objects that live forever
  • Pipeline database
  • Make code less of a mess

Bot

  • Finish rust rewrite

Docs

  • Architecture diagram

@Douile Douile added the enhancement New feature or request label Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant