how best to do messaging for my dating site?
Making a dating site. It's nearly done, except I haven't sorted messaging between users yet.
I've got two / three choices:
a) NOT live messaging. Messages POST to backend. Requires a page refresh to display new messages.
b) LIVE messaging! Making use of web sockets. I would also have to save any live messages in a database. and loop through them like facebook when user logs back in.
c) Im building this in node / pug / mongo / passport. There isn't a plugin I could use is there?
Obviously I'd want option B, but I have very little experience with socket.io and have no idea how complex it would be? What would you advise. I've got about a week to finish this.
Well, I launched today an anonymous chat made with socket.io & express (node.js).
It took me 3 days from 0 to 1.
For a dating site, I strongly recommend a live messaging, no one is going to be refreshing the site to get notifications unless is for a hot girl which is not the case for almost every dating site/app on the market (All these apps are full of D**s).
You can go to GitHub and surf a lot of projects about chats/tinder clones or even Instagram clones which some of them have a full DM system working, so you can 'crawl/steal/cannibalize' some snipes of their codes or at least get a good idea of how everything works with socket.io
I don't even have a good experience with node.js but for some reason, many things I do with ruby that take me like a week, here with node.js is just a matter of hours.
Just give it a try :)
Well, live messaging is a way better experience for the user.
So you should go with it.
There are a ton of tutorials and repos about socket.io and chat. For example: https://github.com/OmarElGabry/chat.io
Socket.io isn that hard if you get the concept of websockets. Should not take long to implement it.
Well I have worked with Socket.io & its really not that difficult. It uses IPC (Inter Process Communication) & the API is very easy to use.
I made a simple chatroom 2 years ago. Code is Open Source & you can find it at https://github.com/deadcoder0904/chatroom & the demo can be found on http://chatroom-0904.herokuapp.com
Obviously Isaac is right nobody will use your site if you want to keep your users refreshing. If its just Text chat use Socket.io & if its Video Chat then use P2P. Made that too but its closed source & its difficult to make it working. So I guess you should only use Text Chat for now.