Habrometer — a service for logging values of karma, habrasils, and positions in a habrew user’s rating and displaying this information on informers that can be inserted into a profile, blog, forum, etc.


For these purposes, the
Goodrone Carmagraph has long been written. But its development is now frozen, but the engine itself has broken down and the values of the counters are not updated since last year (at the time of writing). This pushed to write your karmagraf right now.
')
I do not know whether to consider the word “Karmagraf” itself as the name of a specific service from Goodrone, or as the name of a class of services (or the graph itself). In order not to bother with this question, I decided to call my karmagraf differently - Habrometer. After all, he considers and shows not only karma, but also habrasil and position in the rating (all that the Habr API currently gives out). Habrometer differs from the Karmagraf in spite of the visual similarity of the design of the main informer. Of course, I tried to take all the best from Karmagraf. The main difference of Habrometer - the informers will be of several different types. Three types are already available - karmagrafik, scoreboard and minitablo.
So, a few words about what happened. The entire service consists of a subsystem for collecting information and a subsystem for its visualization. Every 2 hours, the bot collects information about the values of karma, habrasils and positions in the rating (I call these data Hab values) through the Habr API for all users registered on the service. Data is stored in the database. At any time, anyone can go to the user's page and see the history of his habaznachen. Now the history of the last 500 requests is shown (12 requests per day, it turns out a little more than 40 days). In the future, the display will definitely change, a calendar will appear. In addition, there are graphical informers that display the current user habits, the maximum and minimum values during the monitoring, and the karma graph (the presence of certain components depends on the type (size) of the informer).
All scripts are written in PHP, the database is used by MySQL (for now anyway). To draw using ImageMagick. To run on a schedule - Cron.
The service runs on my server (server.valera.ws), which, by the way, is not very powerful and can not withstand the habraeffect. By the way, from a technical point of view, there is one significant difference between the work of Habrometer and Karmagraf - informers are not drawn according to the schedule after the jump of fresh data, but at the first request to display the informer after updating the data. In other words, after the informer is drawn, it is cached. The drawing itself happens very quickly. And the cache is cleared after the download of fresh data. This allows you to spread the peak load on the drawing of fresh informers in time. In addition, not all registered users in general will place informers somewhere, and even less will not place informers of all types at once. So a one-time drawing of all the informers would be superfluous.
Naturally the service is provided "as is" and is free to use. I am going to open the Habrometer code, but a little later. First, you need to debug his work, correct the errors (which are sure to be there). The code will be opened under the GPL 3 license.
Now the service is in beta testing mode. I will be glad to receive your feedback, bug reports on e-mail feedbee@gmail.com. First of all, I want to achieve stability of work and optimization of resource costs of the service. Well, then take care of usability.
First I will try to finish the planned types of informers. These are 31x31, 88x31 and 350x20. It will also be necessary to come up with something with the expansion of color schemes. When there will be time, I will work on the design of the service pages.
PS Service site (description of the system and bot):
http://habrometr.server.valera.ws .
PSS This domain is not specifically chosen, it so happened that server.valera.ws! = Valera.ws. Because so long.
PSS If due to habraeffekt my server will be covered, no longer throw a lot of stones in the garden. While it was not possible to experience it under load.
UPD . Transferred to the blog I Habrahabr, to reduce the load on the server (all topics from it are visible only to subscribers of this blog).