-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Twilight's architecture supports partitioning a bot into multiple processes, but it can be difficult to know how to. We should provide a template for the most common partition: a stateful gateway (server) and a stateless worker (client). To update commands, the worker retains support for the previous commands (it may optionally be restarted without such support once the command update has propagated). IPC is easiest done through HTTP; below is a sample gateway API:
GET /events/{type}: gateway forwards incoming eventsGET /{type}/{id}: gateway retrieves a cached resourcePOST /shards/{id}: gateway submits a message
The events stream terminates in one of two ways:
- Cleanly: another worker called
GET /events--> shutdown - Uncleanly: gateway exited --> reconnect
Events in the InteractionCreate stream should be retained for 3 seconds in case another worker connects in time.
HTGAzureX1212QuaeroEtTego and siriometers
Metadata
Metadata
Assignees
Labels
No labels