Re:Show HN: Open-source Telegram bot for music sharing
by szastupov on Monday November 30, 2015 @12:38PM
(#10650610)
Thanks! 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) 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.
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?)