3 ms·
Inspiring example, thank you! I had a look at the source to your aiotg package for writing such Telegram bots. IIUC, you run a single Python process using asyn
by cpbotha 11y ago
Inspiring example, thank you!
I had a look at the source to your aiotg package for writing such Telegram bots. IIUC, you run a single Python process using asyncio, and that uses coroutines to handle all requests (in and out).
What is your experience w.r.t. scalability in practice, for example with your music bot? (iow have you run into any issues with large numbers of users interacting with the bot?)
- szastupov 11y agoThanks! asyncio and aiohttp works well so far. But this particular example (music bot) uses synchronous bindings to MongoDB so it's not fully async. There are asyncio bindings for Mongo, but I haven't tried them. I have another bot (https://github.com/szastupov/whatisbot https://github.com/szastupov/whatisbot) which is a client to wikipedia and asyncio makes much more sense in this case. In general, think asyncio is inevitable in current world of APIs and micro-services.