V
V
Vitaly Ananiev2022-03-28 14:12:44
Django
Vitaly Ananiev, 2022-03-28 14:12:44

What logic can be used to make the form of active users, as here when choosing sellers online https://funpay.com/chips/56/?

What logic can be implemented for the form of online sellers?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Nesterov, 2022-03-28
@Vitalii181190

Option 1: Use sockets
Pros:

  • Consumes few resources
  • Allows you to make chats, notifications, etc. more productively.

Minuses:
  • Difficult to set up.

Option 2: On each user action, record the time and show users active in the last N minutes
Pros:
  • No consumption of extra resources

Minuses:
  • Low level of liveliness (offline users may appear alive)

Option 3: Use JS to poll the server every N-seconds (and update the time, as in v.2)
Cons: high resource consumption

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question