kobot
kobot copied to clipboard
Redis session
Redis should be used in order to store bot sessions
I want to start to work on this issue.
Actually, the memory layer accepts only BotConfig as a parameter.
Redis requires some additional configuration to work like Redis's hostname and port.
I propose to add an additional parameter to Memory Layer that contains Kobot Configuration.
Hi cool!
BotConfig class actually represents the conversation flow, made by states and relationships (the actual graph). Please consider that Spring Boot support has been integrated, so now it's very easy to add parameters.
Have a look at KobotConfig, which reads properties from the application.properties file under the config/ directory.
After declaring a @Bean, you can easily inject it into various classes. For example, take a look at TelegramRunner or KobotRunner.
Feel free to propose a solution or improvements! S.
Have a look at the new services
I'm considering to remove actors, since testability is a bit clumsy. While using spring @async features, we could have same performance (on executors) with all the advantages of spring (injection, mocking for tests etc)
Working on the jdbc-read, I had to change some interfaces. Due to these changes, now it should be also more straightforward to add Redis: now the MemoryLayer is an interface (MemoryService), so RedisMemoryService should implement it