Sexchat sin registrarse

16-Aug-2020 16:50

The way this is typically accomplished in a web application is by separating the model and the view: data is persisted in a database (perhaps with a separate in-memory cache), with each short-lived request retrieving only the parts relevant to that request.

Because the data is persisted, a failed read request can be re-attempted.

It is rather keeping each online user aware of the online-idle-offline states of their friends, so that conversations can begin.

Note that approach (a) changes the sending a chat message / loading a Facebook page from a one-to-one communication into a multicast to all online friends, while approach (b) ensures that users who are neither chatting nor browsing Facebook are nonetheless generating server load.

Another challenge is ensuring the timely delivery of the messages themselves.

For Facebook Chat, we rolled our own subsystem for logging chat messages (in C ) as well as an epoll-driven web server (in Erlang) that holds online users' conversations in-memory and serves the long-polled HTTP requests.

Both subsystems are clustered and partitioned for reliability and efficient failover. In short, because the problem domain fits Erlang like a glove.

It is rather keeping each online user aware of the online-idle-offline states of their friends, so that conversations can begin.

Note that approach (a) changes the sending a chat message / loading a Facebook page from a one-to-one communication into a multicast to all online friends, while approach (b) ensures that users who are neither chatting nor browsing Facebook are nonetheless generating server load.

Another challenge is ensuring the timely delivery of the messages themselves.

For Facebook Chat, we rolled our own subsystem for logging chat messages (in C ) as well as an epoll-driven web server (in Erlang) that holds online users' conversations in-memory and serves the long-polled HTTP requests.

Both subsystems are clustered and partitioned for reliability and efficient failover. In short, because the problem domain fits Erlang like a glove.

The naive implementation of sending a notification to all friends whenever a user comes online or goes offline has a worst case cost of O(average friendlist size * peak users * churn rate) messages/second, where churn rate is the frequency with which users come online and go offline, in events/second.