Should callbacks be simple?
I was wondering what is the best thing to do, write very simple callbacks, or to put almost all code inside callbacks. I don't know if there is a general rule, so if you understand more cleary the consequences of having long callbacks vs long main loops, please clarify this to me.
For example, if I have a controller, in the callback I could simply get the input and save it to process and publish in main loop, or I could calculte the output inside the callback and already publish it. Which one should I use? What are the advantages and disadvantages of each approach?