Which one is better approach for things this sending Emails ,Sms (for account verification) , notifications bla bla via nodejs application
As per my knowledge there can be two approaches.
Execute a function after save which will do this... one can use mongoose middleware like after save..
Simulate triggers with the help of replica set in mongodb and run it through background jobs
I think second approach is better because it will be executed by some other process in background, But on the other hand node.js is asynchronous may be node.js handles these kind of stuffs in a smart way .. any idea !!!
In short: Sending Sms emails notification after user regestration should be send by nodjs middleware or by background process
and as per my knowledge background process can be executed by binding a listener to oplog