when you write the interface, for example, there is a scenario when users browse the article, they need to increase the number of views to the article
- scenario 1: when adding pageviews, there is a channel listener, and the program is running all the time. If you browse a post, open a new goruntime to write data to this channel (the channel that ps: increases pageviews may block), and notify the listener channel to execute .
- scenario 2: this process adds one to the number of page views of the post before the user requests the interface to return it.
which of these two designs is better? I think the first one will be better. Will there be any problems?