Answer the question
In order to leave comments, you need to log in
How to implement the collection and display of statistics?
There is a pet project to collect information. The types of information are different: user entering the site, downloading a file, writing an article, etc. I myself work as a back-end programmer, but there was no such task before. And so the question arose of how best to implement the collection and storage of these statistics? Interested not in a specific implementation, but in approaches. Should I store everything in one table with a data field, or should I create another table for statistics for each type? Or use a completely different tool (not MySQL). What implementation examples can be seen?
Statistical data is needed to display this information. So that you can see it all in chronological order for each user. Perhaps in the future, you will need analytics for all users (that is, so that you can see on one timeline who, when they entered and left, etc.).
Answer the question
In order to leave comments, you need to log in
It is best to store in the database. The type and other issues depend on the load and the quantity. If your workload is such that mysql can handle it well, and you are already working with it, there is no point in looking for something else.
As a visualization, you can not even fence your code, but take grafana and add dashboards from your mysql in it, or do some things yourself, something in grafana.
Stakhanovite stores everything in the database. Supported by MS SQL and MySQL. The structure of the database, I think, will be clear if you put the demo - it allows you to monitor one wheelbarrow for free.
(Stakhanovets is a User Monitoring System, it does something similar)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question