OpenRPA version: 1.4.56-pre-release
OpenFlow version: 1.5.8 (not really relevant)
Using app.openiap.io or self hosted openflow: app
Error message: N/A
Screenshot or video: N/A
Attach a simple workflow from OpenRPA or NodeRED that reproduces the error/issue: N/A
In the last community meet up we’ve talked about issues with LiteDB, specifically around Citrix/VDI setups (LiteDB doesn’t play nice with some of them).
After some more discussions, a more long term solution seems to be to replace LiteDB with something else, but in the meantime some users (yours truly ) are blocked in working in those environments.
With that in mind, I’d like to spend some time on pushing what would help me right now and also making further changes down the line easier in the main release channel (since I don’t want to keep maintaining a parallel branch). So before I get down to code, I’d like to confirm some assumptions so it really is compatible.
Prerequisites, as I see it, to solve my issue and make it compatible with mainline releases would be:
- Current usage of LiteDB is unaffected (backwards compatible).
- Further changes to local storage providers in the future must be doable without much rework.
- There must be at least one other configuration option aside of LiteDB to solve for the issue that sparked this.
To meet the prerequisites, after some code checking, this is what I have in mind right now:
- Add an abstraction layer around current LiteDB usage (ILocalStorageProvider or something similar) [main code changes in: RobotInstance, Workflow, Project]
- Add an implementation of ILocalStorageProvider for LiteDB
- Add an implementation of ILocalStorageProvider for no local storage (in-memory only, as discussed)
- Add localstorageprovider (string?) to settings.json and Interfaces.Config for choosing local storage. Should default to LiteDB if config option missing for backwards compatibility.
That’s the gist of it.
After the above, current and default usage should remain the same with LiteDB, but there would be a configuration option to use OpenRPA with online-only mode, no local storage of detectors/projects/workflows/queues.
If other storage providers would be added in the future they would just need to be wrapped around the interface implementation and added as a configuration option, so it opens up further development, if that need arises (f.e. local git repo).
Biggest hurdle to overcome will be how to implement local wiq without LiteDB, but I’m not sure if that’s a realistic use case to worry about. Personally I’d be okay if the in-memory-only mode would not support local wiq at all, since it realistically doesn’t make sense for it to do so.
So - what do you think?