So a situation came up at work, it’s a simple enough thing, but I decided that I did not know it thoroughly and in-depth. This post is a result of studying and experimenting for that.
Say we have a module in the “server” that takes a data as input and based on the command ID, calls the required handler. There’s 3 ways you can do this. Two of them being almost identical. Here’s the playground:
1