Thanks for having a look. "centraldb" is the agent's module to read and write to central db.
For writing, it sends iqs to the central agent. But it reads the central db directly by connecting to the sqlite.
I don't know whether it is a good idea but I found that sqlite supports concurrent reads quite well - for concurrent writes it's a different story.