Habrometer - a new service for logging and displaying the values ​​of karma and habrosila publicly open

    Habrometr - a service for logging the values ​​of karma, habrasila, position in the habru user rating and displaying this information on informers that can be inserted into a profile, blog, forum, etc.

    Many hub users have long been aware of this service, registered on it and posted their Habrometers on the network. They know about him because about a month ago I already published information about the service in the closed blog I ♥ Habrahabr. After that, a lot was reworked, errors were fixed, optimization was carried out. And now it's time to talk about the service to all the people First, I’ll repeat a little for those who are not connected to the blog about the love of Habr and have not seen the first article.

    Habrometer feedbee




    For the purpose of observing karma over time, the Karmagraph from Goodrone has long been written . But its development is now frozen, and the engine itself broke down at one time and the values ​​of the counters have not been updated for quite some time. This prompted me to write my karmagraph, despite the fact that the first karmagraf was already repaired.

    I don’t know whether to consider the word “karmagraf” the name of a specific service from Goodrone, or the name of the class of services (or the schedule itself). In order not to bother with this question, he decided to call his karmagraph differently - Habrometr. After all, he considers and shows not only karma, but also the habrasil and the position in the rating (everything that the Habr API currently produces). Habrometer differs from Karmagraf despite the visual similarity of the design of the main informer. Of course, I tried to get the best from Karmagraf. The main difference between the Habrometer is the informers of several different types. Already available in 6 sizes.

    What came of this can be seen on the service website. Now on the site after registration, each user can get the codes of their Habrometers. Once every 2 hours, the server collects the values ​​of karma, habrasila and position in the ranking of each registered user and saves them in the database. So far, the history is not limited in storage, and on the user’s page you can see the daily average values ​​over the past 90 days.

    All scripts are written in PHP, the DBMS is used by MySQL (for now, anyway). ImageMagick is used for drawing. To run on schedule - Cron. Nginx and apache web servers. Caching is memcache.

    The service works on my server, which, by the way, is not very powerful and may not withstand the habra effect. By the way, from a technical point of view, there is one significant difference between the work of the Habrometer and the Karmagraf - informers are drawn not according to the schedule after the download of fresh data, but at the first request to display the informer after updating the data. In other words, after drawing the informer, it is cached. The drawing itself is pretty fast. And the cache is cleaned after a fresh data download. This allows us to spread the peak load on the drawing of fresh informers in time, since it is quite expensive to generate all 6 informers for all users every 2 hours. In addition, not all registered users will place informers somewhere, and even more so, they will not post informers of all sizes at once. True, this method has a big drawback.

    Naturally, the service is provided “as is” and is free to use. The source code of the Habrometer is open under the GPL 3 license. And this means that everyone can post their own habrometer on their server, or raise their public service. Personally, I will only be glad for the emergence of alternative servers.

    Now the service continues to work in beta testing mode, although the versions are already more or less stable. I will be glad to receive your feedback, bug reports to e-mail feedbee@gmail.com.

    The plans, as time is available, will need to come up with something to expand the color schemes of the informers, to make a normal design of the service site.

    If someone is ready to help with the code (optimization, refinement) or design - I will be happy, as my free time is very limited :(

    PS If my server is shut down due to the habraeffect, don’t throw many stones into the garden anymore. I am limited in server resources.

    Also popular now: