📜 ⬆️ ⬇️

MaxXBot v1.6.1 - Review of innovations

image

Greetings to you, habra people! I am very pleased that my project was warmly received. To all those who have not yet had the opportunity to learn about the project, I invite you to read my recent post " MaxXBot - IM-bot to everyone! ". I decided to continue writing in the name of attracting smart people (maybe someone will follow the development of the program, but I will be pleased).

Now I will conduct a small review of the new version of the program 1.6.1. In the previous final release, I focused on developing the structure of extensible functionality, but I completely forgot about deep testing, in particular under industrial pressure with a load of hundreds of accounts, though there was no real possibility. After the release of 1.6, the weak side of the program was discovered - unstable and slow work under load, some users noted a terrible sluggishness especially with a full visual log, fast stuffing of the log file (it could gain 10 MB of weight per day), “busy” of the program when processing requests - each account-user had to constantly submit requests in order to track the bot's free second, unpleasant, right? Of course, for a user with a couple of friends, the bot regularly did its job (no brakes and everything in openwork), but I had to take into account the interests of all users whose bots serve people in packs. In addition, minor bugs spoil the picture. Needed improvement. Finished, but what is the result?

In version 1.6.1, I did work on the bugs, correct the visual log, optimize the simultaneous processing of requests. Now the log has its own view settings, auto-cleaning and auto-archiving of its file, and requests do not wait their turn and are processed immediately upon submission.
')
Also, I just could not add a unique piece to the new release - it became a function (you can even say “technology” loudly) of variables. The point is: in any ready (even already processed message) you can insert a function from a command plug-in with a parameter extracted from the user's initial request using a regular expression (what a fantasy it is). The function is called by a line in the text of the bot's response, for example, the line% weath # in \ s + (. *?) E #% asks for the weather for the city extracted from the query “Tell me, what is the weather like in Muhosransk ?”. This technology allows you to combine the functionality of the command mode with other modes. For example, from the chat module "Vasily" call the function of requesting the exchange rate, horoscope, weather, etc. The user will be pleased to talk with Vasya and simultaneously learn useful information from him.

For those who were too lazy to visit the site, on which, by the way, new plugins are constantly being laid out - the latest ones were included in the distribution kit - now there are 19 of them. That's just a pity that no one but me is not engaged in their development. Some are updated specifically for release, for example, a plugin that loads Wikipedia articles has turned into a universal text parser from the pages of any search site. It still became interesting to those who can download and run in the new version. Thanks for attention!

Source: https://habr.com/ru/post/67975/


All Articles