Загрузка...

Day 9/31-365 follow for more such tech content. #fyp #tech #explore #viral #trending #learn #follow

Day 9/31-365
.
Most people assume the app keeps calling the server again and again.

But that would be slow and inefficient.

With normal HTTP APIs, the flow is:

Client requests data → Server responds → Connection closes.

If used for live prices, the app would constantly ask:

App → Any new price?
Server → No change
App → Any new price?
Server → Still same

This approach is called polling, and it wastes time and network resources.

So trading platforms use WebSockets instead.

A WebSocket creates a single persistent connection between the app and the server.

Once connected:
The connection stays open
Server can push updates instantly
Client can send messages anytime
Communication is bi-directional.

Real Example
You open a trading app and see:
Tesla Stock = $100

A trade happens in the market.

Instead of your app request the price again, the broker server pushes the update immediately:
$100 → $100.12 → $99.97

Your app receives the event through the WebSocket stream and the UI updates instantly.
.

Tech Insight:-
WebSocket connections:
• Start with an HTTP handshake
• Upgrade to WebSocket protocol (ws / wss)
• Maintain a persistent, low-latency connection
• Perfect for real-time systems like trading platforms
.
#fyp #tech #viral #explore #trending

Видео Day 9/31-365 follow for more such tech content. #fyp #tech #explore #viral #trending #learn #follow канала Black Cask
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять