qlik-bots / QlikBotNode

QlikBotNode is a server build in Node.js, Express.js, Enigma.js and MySql that connects to chat and media platforms like Telegram, Skype, MS Teams, Cortana, Slack, Google Assistant and Amazon Alexa.
Apache License 2.0
30 stars 18 forks source link

One engine by session #73

Open dacopan opened 5 years ago

dacopan commented 5 years ago

https://github.com/qlik-bots/QlikBotNode/blob/7cb41147f0133bf90ce0fd47ab89ffc1fde13631/app/server/routes/api/sense-bot/telegram.js#L123

En each call of the API, new Engine Object is created.

thi is necesary? or is possible implement a cache logic to reuse Engine object by user/ session

dacopan commented 5 years ago

Also in each call inside engine, https://github.com/qlik-bots/QlikBotNode/blob/7cb41147f0133bf90ce0fd47ab89ffc1fde13631/app/server/models/utilities/Enigma.js#L58

the connect method is invoked, so new session and global are created