diff --git a/Architecture.md b/Architecture.md index d62cb1a..ea54456 100644 --- a/Architecture.md +++ b/Architecture.md @@ -7,12 +7,12 @@ Because all of that can be a bit overwhelming, the below diagram gives you an ov ```mermaid flowchart TD; AppBuilder(" - ext.ApplicationBuilder + ext.ApplicationBuilder builder pattern for - ext.Application + ext.Application "); App(" - ext.Application + ext.Application • entry point for the whole application • provides convenience methods for running the whole app via run_polling/webhook() @@ -20,66 +20,66 @@ flowchart TD; • administers user/chat/bot_data "); BaseHandler(" - ext.BaseHandler + ext.BaseHandler specifies if and how it handles updates "); BaseRateLimiter(" - ext.BaseRateLimiter + ext.BaseRateLimiter interface for rate limiting API requests "); BaseRequest(" - request.BaseRequest + request.BaseRequest interface for handling the networking backend "); BasePersistence(" - ext.BasePersistence + ext.BasePersistence interface for persisting - data from ext.Application + data from ext.Application across restarts "); BaseUpdateProcessor(" - ext.BaseUpdateProcessor + ext.BaseUpdateProcessor interface for processing updates concurrently "); Bot(" - (ext.Ext)Bot + (ext.Ext)Bot Telegram Bot API client used to make requests to the API "); CallbackContext(" - ext.CallbackContext + ext.CallbackContext Convenience class for unified access to different objects within handler/job/error callbacks "); CallbackDataCache(" - ext.CallbackDataCache + ext.CallbackDataCache in-memory LRU-cache for arbitrary callback_data "); ContextTypes(" - ext.ContextTypes + ext.ContextTypes specifies types of the context argument "); Defaults(" - ext.Defaults + ext.Defaults gathers default values for frequently - used parameters of (ext.Ext)Bot, - Ext.JobQueue and ext.BaseHandler + used parameters of (ext.Ext)Bot, + Ext.JobQueue and ext.BaseHandler "); JobQueue(" - ext.JobQueue + ext.JobQueue schedules tasks to run at specific times "); Updater(" - ext.Updater + ext.Updater fetches updates from Telegram and puts them into the update_queue "); @@ -88,7 +88,7 @@ flowchart TD; App -- accesses to build context --> ContextTypes; App -- "provides arguments for
handler callbacks, processes exceptions
raised in handler callbacks" --> BaseHandler; App -- processes exceptions
raised in jobs --> JobQueue; - App -- fetches data
and passes it to
ext.BasePersistence --> CallbackDataCache; + App -- fetches data
and passes it to
ext.BasePersistence --> CallbackDataCache; App -- fetches updates from
the update_queue --> Updater; App -- updates in
regular intervals --> BasePersistence; App -- gets default values
for parameters --> Defaults;