MediaWiki has a fairly intricate DB layer (ChronologyProtector, code for keeping slave lag low, DBPerformance warnings etc). If one wanted to interact with MariaDB from a RESTBase service (not necessarily with the same DBs as the wikis, but primary data with similar robustness requirements), to what extent would those features need to be reimplemented?
(Context: we are making plans for the new Reading List Service and it seems some parts of it would have to live in MediaWiki and some in RESTBase. We are trying to find out which one should do the DB handling.)