Page MenuHomePhabricator

[RFC] DBAL vs MW's DatabaseBase
Closed, InvalidPublic

Description

"I follow only occasionally the discussion but Daniel Kinzler wrote "Go back to using MediaWiki's DB abstraction for running queries" and "we could have implementations of the query interface based on MW's DatabaseBase" [0, 1].

Taking into account the experience gained from the SMW SQLStore implementation (which is far from optimal and has several serious issues) using MW's DatabaseBase showed limitations such as:

  • DatabaseBase doesn't allow DB type agnostic queries (you always have to cover special cases for either sqlite, or postgres
  • DatabaseBase has no sufficient (+90%) test coverage for any of the three available adapters mysql, sqlite, and postgres
  • DatabaseBase has no interface but instead uses an abstract class as definition which means when creating a mock you work with an implementation focused and not with an interface object
  • MW's support for postgres is insufficient and has several open bugs

If because of WMF's policy [0] "the WMF would require a line-by-line review ... This is not feasible.", DBAL is not an option I would advise against the use of DatabaseBase and instead look for an option where PDO is used as abstraction layer. [2]

[0] https://lists.wikimedia.org/pipermail/wikidata-tech/2014-September/000595.html
[1] https://lists.wikimedia.org/pipermail/wikidata-tech/2014-September/000600.html
[2] http://wooptoo.com/blog/pdo-vs-mysqli-performance-comparison/ "

https://github.com/wmde/WikibaseQueryEngine/issues/115

Event Timeline

Lucie raised the priority of this task from to Needs Triage.
Lucie updated the task description. (Show Details)
Lucie changed Security from none to None.
Lucie added a subscriber: Lucie.
thiemowmde renamed this task from DBAL vs MW's DatabaseBase to [RFC] DBAL vs MW's DatabaseBase.Sep 10 2015, 3:25 PM
thiemowmde triaged this task as Medium priority.
thiemowmde added subscribers: JeroenDeDauw, daniel.
Lydia_Pintscher claimed this task.
Lydia_Pintscher added a subscriber: Lydia_Pintscher.

We decided to not work on this given that the SPARQL endpoint seems to be working well and covering most usecases.