I am also creating a chat-application in nodejs. And it is very simple just for fun. I am using backbonejs in client side. Each of my chat-message is a model, which gets created, destroyed, edited by Backbone apis : fetch, destroy, save. I have the endpoints on server for each of this work.
I now want that two people can communicate with each other. I now need to push messages down from one user to another user. And then i met socket.io. It felt fairly easy to do this chat things in it. I re-coded my application with socketio. Backbone is used for creating views and managing them.
But now i am missing backbone rest api where i could get the message id and then could edit and destroy the message easily. Is there something inbuild in socket.io for this ? or should i create my own events and listen and send them ?
Is there a better way, i can structure my application. Am i using backbone in a wrong way ?