liauli / abang-bakso

0 stars 0 forks source link

[Spike] Real Time Connection #7

Open liauli opened 1 week ago

liauli commented 1 week ago

ref: #1

liauli commented 1 week ago

about tcp/udp: https://any-one-can-code.medium.com/understanding-tcp-udp-http-and-websocket-concepts-part-1-499f9f751c54

From ChatGPT:

Firestore and Real-Time Updates

Firestore’s real-time capabilities leverage WebSockets over a TCP connection. This allows for reliable, low-latency data synchronization between the Firestore backend and clients, making it an effective solution for applications that require up-to-date data.

Real-Time Listeners

Firestore’s real-time capabilities are provided through listeners. In iOS, you can set up listeners to get live updates when data changes. How it Works:

  1. You create a listener on a document or collection using addSnapshotListener.
  2. Firestore opens a WebSocket connection to the server.
  3. Whenever data changes on the server, the listener updates the local snapshot and triggers an event, letting your app react immediately.
liauli commented 1 week ago

OSI Model https://www.geeksforgeeks.org/open-systems-interconnection-model-osi/

liauli commented 3 days ago

[Question] How often seller send/update data? How often the location listener receive data? what is the effective way. Count the battery and data usage