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

Discord Service Implementation #235

Open
17 of 20 tasks
joyguptaa opened this issue Jun 12, 2024 · 3 comments
Open
17 of 20 tasks

Discord Service Implementation #235

joyguptaa opened this issue Jun 12, 2024 · 3 comments
Assignees

Comments

@joyguptaa
Copy link

joyguptaa commented Jun 12, 2024

Parent Issue

References

Issue Description

This issue focuses on how we are approaching to implement the Discord service without affecting the current user flow and features. So, we will discuss everything from development to releasing & rollback strategies.

Tech Stack

  1. Coding Language: GoLang
  2. Queue: RabbitMQ
  3. Containerisation: Docker Image
  4. Deployment : ECS (Not Sure)

Developement

The Discord service is going to be developed in Golang. The idea is to divide the entire service into 2 parts, which are listed below.

  1. A service that accepts requests from the outside world and then acts as a queue producer. It will be responsible for inserting tasks into the queue along with all the data required for consumption.
  2. A consumer must be there which should keep on looking tasks from the queue and should work independently with the server as it only interacts with the queue.

Must Have

Name Estimation (in hours)
Figure out max threshold of queue 3
List down all the tasks that currently discord-slash-command handles 4
Define Priority for each Task 2
Figure out how are we going to communicate among different services 4
List down API rate limits, globally and route specific 6
List out ways we can send alerts, if queue goes down, as discord bot has vast dependency 6
Design Doc for Implementation 6
Figure out release strategy 2
Also tackle and mention roll back strategy 4
Connect with @prakashchoudhary07 regarding deployment strategy 4
Actual Implementation 40
Total 81

Phase 1

  • Figure out max threshold of queue
  • List down all the tasks that currently discord-slash-command handles
  • Define Priority for each Task
  • Figure out how are we going to communicate among different services
  • List down API rate limits, globally and route specific

Phase 2 : 24 Sept

  • Design Doc for Implementation
  • Should have 0 failing scenarios even in case of replies
  • Figure out release strategy
  • Define Priority for each Task
  • Also tackle and mention roll back strategy
  • Connect with @prakashchoudhary07 regarding deployment strategy

Phase 3 : 6 - 10 Oct

  • Actual Implementation

Good to have

  1. Figure out why the order of messages gets changed
Screenshot 2024-06-12 at 11 07 39 PM

Current Behavior

Currently, we are not managing API rate limits globally. As a result, our system may fail at any time, for example, if it takes on 2 tasks simultaneously. Therefore, as an end user, I need to ensure that the next set of tasks is delayed.

Expected Behavior

Expecting API rate limits to be implemented globally. Failure to do so may result in system failure, particularly if it handles multiple tasks simultaneously. Therefore, as an end user, I should not worry about API rate limits, our system should be smart enough to handle it on its own. Also it should always prioritise tasks with high priority over low priority tasks.

Severity/Priority

  • Critical
  • High
  • Medium
  • Low

Checklist

  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.
@joyguptaa joyguptaa self-assigned this Jun 12, 2024
@tejaskh3
Copy link
Member

I have gone through this issue, just want to clarify, will we deprecate discord-slash-commands after creating this?

@joyguptaa
Copy link
Author

I have gone through this issue; I just want to clarify: Will we deprecate discord-slash-commands after creating this?

No, discord-slash-command is going there as we need some service to let our bot interact with. It is just instead of other services (CRON, website-backend) telling discord-service what to do we will have a single service telling discord service what to do and when to do it (by making sure of API rate limiting)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants