Get Hands Dirty — Comet
How to observe changing state in server?
Let’s have a glance at Comet!
- Client: send request to server then blocking until response or timeout.
- Server: handle changing data and response to client in time.
- Disconnect per response or timeout.
Take following as Demo via Human App.
At first, send a request to server for making a human.
Then, long polling human state handled by server.
Pros: To be continued.
Cons: To be continued.
Any other thoughts? Just response directly.
Wanna enjoy it? Here is a asset about this demo.