parent
13d1879977
commit
aa056c1da8
5 changed files with 7024 additions and 8443 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@ |
||||
# Real Time Data |
||||
|
||||
There are many ways to get real time data from the backend. Some of them are: |
||||
|
||||
- Websockets |
||||
- Server Sent Events |
||||
- Long Polling |
||||
- Short Polling |
@ -0,0 +1,3 @@ |
||||
# Long Polling |
||||
|
||||
Long polling is a technique where the client polls the server for new data. However, if the server does not have any data available for the client, instead of sending an empty response, the server holds the request and waits for some specified period of time for new data to be available. If new data becomes available during that time, the server immediately sends a response to the client, completing the open request. If no new data becomes available and the timeout period specified by the client expires, the server sends a response indicating that fact. The client will then immediately re-request data from the server, creating a new request-response cycle. |
@ -0,0 +1,3 @@ |
||||
# Short Polling |
||||
|
||||
Short polling is a technique where the client repeatedly polls the server for new data. This is the most common approach to polling. It's simple to implement and understand, but it's not the most efficient way of doing things. |
Loading…
Reference in new issue