In my app I want to implement some kind of event notification between the node.js server and the client. So first I tried with Event Emitters, but was unable to pass the EventEmitter object to the template and therefore could not establish a communication. The next thing I found was socket.io, and I was able to successfully establish event communication.
Now for my question: I think socket.io is too big and brings many functionalities which I do not need. On the other hand, websocket doesn't seem to give me all the functionality I want, e.g. you can only say onmessage which will read any incoming message, while with socket.io you can give a name to the event and check for that. What would be the best to use, also alternatives, for bidirectional event emitting?