Closed mottaghipour closed 10 months ago
I have a big telegram bot with 100,000 users.
I think sessions without db may be use a lot of hardware.
Hey,
check out the readme part about it: https://github.com/MajMcCloud/TelegramBotFramework#istatemachine
You can take a look as well to the existing state machines like the SimpleJSONMachine (https://github.com/MajMcCloud/TelegramBotFramework#simplejsonstatemachine) or the XMLStateMachine (https://github.com/MajMcCloud/TelegramBotFramework#xmlstatemachine)
And for sure the Microsoft SQL Server Extension nuget package: https://github.com/MajMcCloud/TelegramBotFramework/tree/master/TelegramBotBase.Extensions.Serializer.Database.MSSQL
Hi :)
Do we save all the data and then load it all?
A lot of memory is needed for this.
How can we optimize memory usage?
This depends on what your meaning with "all data". Actually it saves only the chat id (called DeviceId) and the last message and what you are having in your form as properties for sure.
Not sure what else can be optimized.
this is good. I need to work more on dividing the forms.
Thank you for your answer :)
How session serializer works?
I want to develop my own session serializer with mongodb.