S
S
Spree2012-09-25 10:49:23
PHP
Spree, 2012-09-25 10:49:23

Instant private messaging for a website?

Good afternoon. For a site developed in PHP, it is necessary to implement the functionality of instant messaging (keyword - instant) as, for example, in "Vkontakte" or "Facebook". Please tell me how this can be done.
It will be a plus if the code that will need to be written to implement this functionality will need to be written in PHP (for example, if you use Dklab Realplexor, then there is an API for it in PHP).
Here are the options I'm considering so far:
- Node.js + Socket.io;
— Dklab Realplexor;
— phpDaemon.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
M
Max, 2012-09-25
@AloneCoder

Dklab Realplexor will perfectly prove itself in this role

E
Evgeny Kuznetsov, 2012-09-25
@evgentus

Somehow I played with Dklab Realplexor.
It showed itself very well, it was not possible to test it on a large number of connections. But there were 40-50 users.
At the very minimum firstvds tariff, this was all (and right now it is). The processor and memory did not eat. According to stability, it has been working without failures for 90 days.

A
avalak, 2012-09-25
@avalak

> keyword - instant
If you need a full-fledged chat / PM / mail, then:
HAProxy (as far as I remember, nginx does not yet know how to use web sockets / it is difficult to screw it up)
+ Node.js / Tornado (there is a module for web sockets in tornado). Pay attention to Server-Sent Events (if you just need to notify about a new letter).
+ Redis PubSub ("mail". delivers letters from point A to point B). Relevant if you need to scale the site.
+ MongoDB / SQL (“mailbox”. stores letters)
+ WebSocket JS (fallback for browsers without web sockets).

A
aimodify, 2012-09-27
@aimodify

I'm trying Redis + RabbitMQ + jQuery - Git
While the flight is normal.

A
AGvin, 2012-09-27
@AGvin

In "Node.js + Socket.io" I advise you to pay attention to the stability of this solution. Personally, I was “a little” surprised by Node.js when, during tests, in the event of a single node crash, the entire cluster fell.
(if anyone knows how this is solved, I will be glad to get acquainted with the materials presented)
Here is another material for you to think about: ape-project.org . I think this material will be useful to you.

S
Skull, 2012-09-28
@Skull

What about Jabber?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question