I
I
Ivan Yakushenko2019-06-10 11:36:11
Python
Ivan Yakushenko, 2019-06-10 11:36:11

Why are bots wrapped in Flask (as an example)?

For example, I have a regular async/await bot with a database and states that runs great on VDS for very cheap and can handle 1500-2000 users per day.
Very often I notice that many people wrap bots in different frameworks (Flask, for example). I understand correctly that this is done for the sake of the HTTP server? If yes, then why is it a bot, what advantage can be obtained by wrapping the bot in a server, in addition to the fact that it can be hosted somewhere on Heroku or PythonAnywhere. If only because of this, then a counter question - why bother if a bot will quietly work on VDS for a couple of hundred and "serve" the average flow of people.
If not for the sake of an HTTP server, then why and what can you ultimately get?
In general, I want to know: is there any point in all this, if there is a working solution, can I benefit from this in some way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
hail3b, 2019-06-10
@kshnkvn

From http you will get many ready-made solutions. Such as scaling, balancing, monitoring, hence stability, performance, accelerated problem solving.

I
Ivan Shumov, 2019-06-10
@inoise

To use http call back instead of long-polling, for example) although sawing bots in this form on your server is still masochism

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question