Share
Go down
logan
Common
Common
Posts : 37
Points : 56
Rep : 12
Join date : 2018-07-09
View user profile

2019.01.01 - Bot Progress

on Tue Jan 01, 2019 12:25 am
First of all, happy new year! I hope you had a great Christmas and that 2019 treats you well.

As there has been a lack of updates or official information regarding the current state of BoxBot, I figured I should give everyone a progress report.

You're probably aware that the bot can sometimes get very slow - which is not only a bad experience but can also cause a lot of bugs and exploits. For this reason, I'm working on switching the bot from using the MySQL database system to using the ArangoDB database system.

Before I settled on using ArangoDB I created a new schema which was much better optimised (with help from an online MySQL course I'd taken). Afterwards, I wrote a script to convert all of the data from the current database schema to the new schema.

I then decided to research other database systems (in hindsight, I should have done this before re-creating the MySQL schema and writing the conversion script). I decided to try out MongoDB and after writing part of the script to transfer the current data to this database, I had many issues with it. It seemed incredibly slow and would frequently time out due to how slow it was.

After failing with MongoDB, I stumbled across a database system called ArangoDB. I started writing a script with this and almost immediately noticed a huge difference. From what I have so far, the ArangoDB script runs 40-50x faster than the MySQL script I wrote. Keep in mind I haven't done proper tests and this is just going from the scripts for converting from one database system to another. It looks like BoxBot will be using ArangoDB in the future which should hopefully make the bot a lot faster. I just have to get used to using NoSQL instead of writing full MySQL queries. I am getting the hang of it but there are a few errors here and there I need to take a look at.

Once I have finished writing this script to convert the current MySQL database to an ArangoDB database, I will re-write BoxBot's code wherever it references or updates information from the database to use ArangoDB instead of MySQL. I also plan to re-write most of BoxBot's code as I have taken an online course on Javascript/NodeJS since initially writing BoxBot in Javascript. This means that I can write much cleaner code, making it easier for me to change and add new things and potentially making the bot run faster. This should also allow me to fix the current issues where some clusters crash and don't come back online until the entire bot is manually restarted.

Everything mentioned in this post is to improve the bot for the long term, rather than adding new features at the moment. I am a bit of a perfectionist when it comes to coding and I like to do everything as best as possible, even if it means rewriting huge chunks of code. I would prefer the bot to be running as smoothly as possible before adding new features.

I'd like to thank everyone for sticking with us during these slow times. Thanks for reading and I once again wish you a happy new year!
Back to top
Permissions in this forum:
You cannot reply to topics in this forum