M
M
Max2016-04-05 11:56:20
Chats
Max, 2016-04-05 11:56:20

Best solution for creating dialogs between users?

I would like to hear your opinion of experts who have already implemented and have experience in creating chats.
Main task: It is necessary to give the opportunity to send a message to the user, when pressing the button - to create a private communication between users. I would like to save the history of correspondence so that you can view the history of correspondence with a particular user.
It is desirable to open source solutions, maybe you can drop some examples from github or other resources.
As a result, you need to get that users can communicate with each other. I want to add to my site

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor, 2016-04-05
@Levhav

Here is my GitHab
user chat project. The chat itself has a lot of features and is open source. It stores messages in MySQL, and uses the saas comet service to send messages and work with websockets, due to which it can be used even on cheap regular hosting, since all the difficulties in maintaining a bunch of persistent connections lie not on the chat, but on the comet service.
I wrote a chat trying to make it as easy as possible to integrate into other projects. If you have any questions about its use, please contact in the profile.

D
Dmitry Arushanov, 2016-04-08
@daruwanov

Not so long ago it was necessary to implement the Messages module. Used the following approach.
UI logic angular. With the help of Restangular - I send messages to the server - I save them there at once. And from the server through fanout - I send out to the addressee - what they say is a new message.
I send something like `/messageStream-{userId}` to the channel where user_id is the id of the recipient.
That is, when I log in, I subscribe to the `/messageStream-{currentUserId}` channel and listen for all incoming data.
Through fanout I pass only the id of the message and not its content itself. when receiving a notification - I pull out the message.
It's so short.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question