1 month ago

Appropriate way to update number of entries from db in real time?

Posted 1 month ago by UniqueHope

I've read about a number of solutions like polling, SSE and websockets, but at the end of it I feel like I still have no clue what to decide on since I've only started working recently. Essentially what I need to do is update a number on the client side whenever something changes in the db (a new entry gets added or deleted etc). First thought was to just use setInterval(), but that's potentially quite intensive, meanwhile some of these other things sound like they require much much more setup for such a small detail. I'm hoping someone with more experience can give some idea of what might work best. Thanks.

Please sign in or create an account to participate in this conversation.