Merge pull request #2073 from joaquinelio/patch-1

once in -> once every
This commit is contained in:
Ilya Kantor 2020-08-27 16:48:36 +03:00 committed by GitHub
commit 9007790f84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,7 +6,7 @@ Being very easy to implement, it's also good enough in a lot of cases.
## Regular Polling
The simplest way to get new information from the server is periodic polling. That is, regular requests to the server: "Hello, I'm here, do you have any information for me?". For example, once in 10 seconds.
The simplest way to get new information from the server is periodic polling. That is, regular requests to the server: "Hello, I'm here, do you have any information for me?". For example, once every 10 seconds.
In response, the server first takes a notice to itself that the client is online, and second - sends a packet of messages it got till that moment.
@ -70,9 +70,9 @@ As you can see, `subscribe` function makes a fetch, then waits for the response,
```warn header="Server should be ok with many pending connections"
The server architecture must be able to work with many pending connections.
Certain server architectures run a process per connect. For many connections there will be as many processes, and each process takes a lot of memory. So many connections just consume it all.
Certain server architectures run one process per connect. So there will be as many processes as connections, and each process takes a lot of memory. Too many connections just will consume it all.
That's often the case for backends written in PHP, Ruby languages, but technically isn't a language, but rather implementation issue. Most modern language allow to implement a proper backend, but some of them make it easier than the other.
That's often the case for backends written in PHP, Ruby languages, but technically isn't a language issue, but rather implementation one. Most modern language allow to implement a proper backend, but some of them make it easier than others..
Backends written using Node.js usually don't have such problems.
```