Abstract
The paper analyzes the methods of interaction of robotic applications with Telegram servers. A comparison was made between the standard polling method (Long Polling) and Webhook, both from the speed of application interaction with the end user and the complexity of the installation from the point of view of the developer. The interaction mechanism of telegrams-bot with Webhook-enabled telegram servers, which significantly improves the performance of the program as a whole, saving the user’s query execution time and increasing fault tolerance.The purpose of the study is to compare the methods of interaction between the application-work Telegrams written in Python, as well as the implementation of these methods in practice, in order to identify the complexity of writing both solutions.The Webhook method is a way to deliver real-time data to applications. Unlike traditional APIs, where you need to specify data more often to get information in real time, Webhook sends data immediately.It is proposed to consider the two most common communication options work and the Telegram server. The most common option is to periodically poll the Telegram servers for new information. All this is done through Long Polling, that is, the use opens for a short time and all updates immediately arrive bot.In the work, an alternative communication option was proposed for the application to work with Telegram servers using Webhook. During the work on changing the data exchange method from standard polling (Long Polling) to Webhook, its indisputable advantage in loaded applications, namely on the number of incoming requests over a thousand, was proved (Long Polling).
Highlights
IntroductionCommunication called "Long Polling", which queues the requests of the application users, since the process of Telegram-bot and Telegram servers’ communication is periodic in the survey of servers for the incoming messages [1]
Any software developer faces the problem of expanding his product, as well as writing software code for telegram bots, and this direction is no exception
In the transition from testing the program to a full product developer, the developer may face the effect of the "narrow bottle neck," which role is played by the method of Telegram-bot and telegram servers’
Summary
Communication called "Long Polling", which queues the requests of the application users, since the process of Telegram-bot and Telegram servers’ communication is periodic in the survey of servers for the incoming messages [1]. This system is suitable for use in unloaded applications or applications with a small number of. The mechanism of Telegram-bot with Telegram servers interaction with support of Webhook will be considered, which significantly raises the overall program performance, saving the user's request time and increasing fault tolerance. Zapier conducted a study of 30 million requests for surveys done through their service, and found that 98.5% of the polls were wasted and they spent 66 times more resources on the poll [3]
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.