Is mediator-js realtime? How can I add subscribers to the channels?

I am fairly new at this. I am using Nodejs and Express linked to a mySQL database to build an application and now I need some library that allows that realtime messages are sent to the right users.

I have already tried socket.io but it was a little complicated for me to understand the documentation, so I searched for some other alternatives. I found Mediator.js and I was trying to implement it in my server but now I am getting to the conclusion that I don't know how to make it work in real time.

  • The website has an Admin and several normal users;
  • The users can belong to groups (one, many or none) that the admin assigns.
  • The Admin has to be able to send a string to the users that belong to a specific group if they are online - realtime.

Is this possible to implement with mediator-js? Admin sends string to server and then server broadcasts to the members of the group that are online in realtime? Or do I really have to use socket.io?

Thanks for your help in advance.