mirror of
https://github.com/autistic-symposium/backend-and-orchestration-toolkit.git
synced 2025-08-11 07:50:11 -04:00
🍛 Commit progress before lunch break
This commit is contained in:
parent
4cf49ba50b
commit
9aa9e827c0
19 changed files with 378 additions and 19 deletions
|
@ -162,9 +162,18 @@ curl -v --trace marinasouza.xyz
|
|||
|
||||
<br>
|
||||
|
||||
* used when a request takes long time to process (e.g., upload a video) and very simple to build.
|
||||
* however, it can be too chatting, use too much network bandwidth and backend resources.
|
||||
|
||||
<br>
|
||||
#### basic idea
|
||||
- when a request takes long time to process (e.g., upload a video)
|
||||
- the backend want to sends notification
|
||||
|
||||
1. client sends a request
|
||||
2. server responds immediately with a handle
|
||||
3. server continues to process the request
|
||||
4. client uses that handle to check for status
|
||||
5. multiple short request response as polls
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -173,6 +182,24 @@ curl -v --trace marinasouza.xyz
|
|||
### Long Polling
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
* a poll requests where the server only responds when the job is ready (used when a request takes long time to process and it's not real time)
|
||||
* used by Kafka
|
||||
|
||||
<br>
|
||||
|
||||
#### basic idea
|
||||
|
||||
<br>
|
||||
|
||||
1. clients sends a request
|
||||
2. server responds immediately with a handle
|
||||
3. server continues to process the request
|
||||
4. client uses that handle to check for status
|
||||
5. server does not reply until has the response (and there are some timeouts)
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
---
|
||||
|
@ -180,6 +207,22 @@ curl -v --trace marinasouza.xyz
|
|||
### Server Sent Events
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
* one request with a long response, but the client must be online and be able to handle the response.
|
||||
|
||||
<br>
|
||||
|
||||
#### basic idea
|
||||
|
||||
1. a response has start and end
|
||||
2. client sends a request
|
||||
3. server sends logical events as part of response
|
||||
4. server never writes the end of the response
|
||||
5. it's still a request but an unending response
|
||||
6. client parses the streams data
|
||||
7. works with HTTP
|
||||
|
||||
<br>
|
||||
|
||||
----
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue