Is it possible to create a web chat client without socket-based frames?

I have heard that web chat clients typically use network environments such as a twisted framework .

But is it possible to create a chat web client without a network infrastructure - using only ajax connections?

I would like to create a session-based client web chat that uses sessions to indicate when the chat has ended. Is this possible in Rails using just ajax and no network infrastructure?

What effect should it use the network infrastructure and what effect does this have on my application, so as not to use it? Any general recommendations for approaching this project will also be appreciated.

+3
source share
2 answers

If I understand you correctly, you want the clients to connect to you by the server and send messages to each other through ajax through the server. It is possible, there are two approaches for this.

An easy approach is for each client poll to check for new messages sent to others every few seconds. The disadvantage is that messages are not instantly delivered. I think this is an example found in the rails book .

, , . - Juggernaut

, , , , http, , , . rails chat, juggernaut.

+5

, , ...

, , . , ajax, -. , - .

, tcp- , , .

, : , ; , , -, ?

, , -? .

+3

Source: https://habr.com/ru/post/1711304/


All Articles