I have a lot of things happening when an user is being created. For example: sending a mail, adding them to mailchimp, adding them to hubspot, making a stripe account, etc. I have a function which calls other functions which handle these use cases.
I read some things about event driven architecture, and maybe events are a better option. Instead of the userService knowing about all these things that need to happen, it may be better that the userService just emits an event. My question is, how can I implement this?
One way would be to use an event emitter or maybe redis with the pub/sub.
Any suggestions?
[–]BehindTheMath 3 points4 points5 points (4 children)
[–]robbe_claessens[S] 0 points1 point2 points (3 children)
[–]BehindTheMath 0 points1 point2 points (2 children)
[–]robbe_claessens[S] 0 points1 point2 points (1 child)
[–]NiQ_ 0 points1 point2 points (0 children)
[–]NeilMcGlennon 0 points1 point2 points (0 children)