Back
Question
Asked

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 :)

great. I'll try and find some clones. good luck with your own launch.
mine is less like a chat room, but instead like a 1:1 based chat.

#lfgchat is a 1:1 chat and as I said socket.io is doing a great job for that kind of stuff. socket.io/docs/emit-cheatshee…

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: github.com/OmarElGabry/chat.io

Socket.io isn that hard if you get the concept of websockets. Should not take long to implement it.

thanks Jakub. Mine is less of a chat room but more a 1:1 chat between people.
I'll try and find a Repo replicating that. If you know of any please send over :)

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 github.com/deadcoder0904/chat… & the demo can be found on 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.

You could watch these videos if its any help Net Ninja & Traversy Media

thanks Akshay! Yeha, I've already watched Net Ninja and Traversy :)