79512815

Date: 2025-03-16 16:00:56
Score: 2.5
Natty:
Report link

Lets break it down step by step.

  1. Let's define some operation xyz that the user can perform on the website.

  2. You want a user to do xyz operation via a bot.

  3. You want a sort of acknowledgement that xyz operation has been completed

    1. [Help me understand]: How "bot" sends the notif that xyz is succesful? It should rather be the point where xyz operation has been performed, right?

    2. I will make an assumption that your website [referred to as server now onwards] will send the notif to channel.

  4. Now how exactly should we make it?


  1. You do not want your bot to do any sort of heavy lifting. For example, checking if there did exist an error, is not a responsibility of bot. Why?

    1. Because the bot is not a "client". Its just someone who communicates to your server "Hey, I received xyz message".

    2. All sort of parsing shall happen within the server.

    3. Another reason is, this makes the bot extensible, you do not need to change code of the bot to perform abc operation.

  2. In my belief [Design is subjective]. The addition of profiles should be async. So, kafka/rmq over webhook/websocket. Why?

    1. I am not sure, how retry-ability will work with webhook/socket. But I am sure its better with kafka and rmq, since they have dead-letter-queue. Retry-ability is important since, in production environments, connections are prone to break or operation is prone to fail etc. You do not want to loose a message with no logs.

    2. The nature of business is async. Once your bot communicates, "hey something happened". It has no business to know what happened with "hey something".

  3. Any further clarifications are welcome.

Reasons:
  • Blacklisted phrase (1): Help me
  • Blacklisted phrase (0.5): Why?
  • Long answer (-1):
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Shah Kushal