TeamHarTex / HarTex

Discord server management, reimagined.
GNU Affero General Public License v3.0
43 stars 9 forks source link

RFC #2: Split Bot into Several Processes #80

Closed HTGAzureX1212 closed 2 years ago

HTGAzureX1212 commented 2 years ago

Feature Name (A Unique Identifier)

process_split

Starting Date

28 January 2022

Feature Implementation Pull Request

No response

Summary

This RFC proposes to split the bot into separate REST, cache and gateway processes.

Motivation

This is to provide seamless updates for the bot as the REST, cache and gateway would then not be affected by a restart at all.

Guide-level Explanation

With this implemented, the bot may have seamless updates as only the bot binary needs to be recompiled and restarted - the REST, cache and gateway processes are intact, and incoming events are to be queued; resuming firing those events after the bot is up again.

Reference-level Explanation

This RFC comes with a major structural modification.

Processes will communicate with each other using HTTP Requests, with extra security built on top with authorization keys as well as process sandboxing (if possible).

Drawbacks

Rationale & Alternatives

None (for now).

Unresolved Questions

None (for now).

Future Possibilities

None (for now).

HTGAzureX1212 commented 2 years ago

This RFC is now in the HarTex Team Review period. Organization members are going to review this RFC.

Lunari8546 commented 2 years ago

In my opinion, as long as it provides better User-experience, I'm totally fine with it even with drawbacks.

Mrcomputer1 commented 2 years ago

This is a good idea. Although, I don't entirely understand the point of having the REST process, unless the REST process does more than proxying requests to Discord.

HTGAzureX1212 commented 2 years ago

This is a good idea. Although, I don't entirely understand the point of having the REST process, unless the REST process does more than proxying requests to Discord.

I should have explained more on the Reference-level Explanation - as this is to prevent currently queued requests to be lost before executing due to bot restarts, and possibly better ratelimiting handling.

HTGAzureX1212 commented 2 years ago

This RFC is now in the Final Comment Period.

The team will now decide on whether or not to accept this RFC.

Kayxue commented 2 years ago

👍

HTGAzureX1212 commented 2 years ago

The Final Comment Period ended with the decision to merge.

The RFC will be implemented.