Data Streams
What is Data Streams…………..
Hi everyone, welcome to another Techie Talk today im going to talk about another system design concept called Data Streams.
Let’s figure this out first the options we have to make a real Async Design. It includes 3 Parts.
- Polling
- Pushing
- Streaming
Polling
This polling station works like this, it has an associated time interval to get the response from the request. That is, suppose it has an interval of 1 hour, then someone requests something, and an hour later the response comes back.
The advantage of polling is that it receives a response from the server or service every period.
Disadvantage of polling is that if there is a polling service with 1 hour interval, if someone makes one request at 1.59 he can get the response within 1 minute, but someone asking at 4.01 will need to wait 59 minutes to get the response.
The implementation of the polling is very simple because both side is http.
Pushing
Push is a next level of the http and it upgrade the http request to websocket and this communicate with tunnel with one side of client and another side server. this is a real time mechanism

Streaming
If we want to find something by live or real-time synchronization we use streaming. If we take an example like Uber, when we hire someone, we can see him live location on the map. kafka streaming is example for that.
Conclusion
If someone asks to design a system, now we can ask them if there is no problem with having an interval, then we can use polling. then if you need either side to initiate the message you can use pushing And the last one is that you don’t need to send a message to the other side, but you need to keep up to date with one way communication so you can use the flow.
So hope you got something please follow for get more interesting topics.. then see you on next talk !