Page MenuHomePhabricator

Promisify Citoid and base it on service-template-node / service-runner
Closed, ResolvedPublic40 Estimated Story Points

Description

The complexity of Citoid's code base has increased recently due to the numerous changes and additions, and the current async approach has become tedious to test properly and maintain. We should consider switching to a promise-based model.

As we are doing that, it might be worthwhile to base Citoid on service-template-node / service-runner in order to profit from unified config management, start-up and packaging.

Done:

  • Base Citoid on service-template-node and service-runner
  • Promisify Citoid

The second part - promisify Citoid - is badly needed to limit the amount of technical debt stemming from the fact that there are currently two diverging execution paths - zotero and the native scraper. The promisification will allow us to have a single execution flow:

pre-translation tasks -- translation -- post-translation tasks

Related Objects

Event Timeline

Mvolz raised the priority of this task from to Needs Triage.
Mvolz updated the task description. (Show Details)
Mvolz added a project: Citoid.
Mvolz changed Security from none to None.
Mvolz added a subscriber: Mvolz.
Mvolz renamed this task from Cluster library y/n to Cluster library restructure.Feb 9 2015, 11:18 PM
Mvolz reopened this task as Open.
Mvolz updated the task description. (Show Details)
Mvolz added a project: Services.
Mvolz added subscribers: GWicke, mobrovac.
Mvolz moved this task from Production to Service on the Citoid board.

It would be great to use https://github.com/wikimedia/service-runner for this.

I've been keeping this in mind for a while now. Just need to squeeze in the time to do it, as this task also requires Citoid to be promisified properly.

mobrovac renamed this task from Cluster library restructure to Promisify Citoid and base it on service-template-node / service-runner.Mar 15 2015, 5:38 PM
mobrovac updated the task description. (Show Details)
Mvolz triaged this task as High priority.Mar 18 2015, 4:08 PM

I'll slowly start working on this today / tomorrow.

Change 199250 had a related patch set uploaded (by Mobrovac):
[BREAKING] Make Citoid use service-template-node and service-runner

https://gerrit.wikimedia.org/r/199250

Change 199250 merged by Mvolz:
[BREAKING] Make Citoid use service-template-node and service-runner

https://gerrit.wikimedia.org/r/199250

Is this now done?

Not yet unfortunately (cf. TODO in the desc) :( Plan to tackle the promisification quite soon though.

Change 211718 had a related patch set uploaded (by Mvolz):
[WIP] Promisify Scraper.js

https://gerrit.wikimedia.org/r/211718

Change 212277 had a related patch set uploaded (by Mvolz):
[WIP] Create CitoidRequest and promisify service

https://gerrit.wikimedia.org/r/212277

Change 211718 abandoned by Mvolz:
[WIP] Promisify Scraper.js

Reason:
squashing

https://gerrit.wikimedia.org/r/211718

Change 212277 abandoned by Mvolz:
[WIP] Create CitoidRequest and promisify service

Reason:
squashing

https://gerrit.wikimedia.org/r/212277

Change 214038 had a related patch set uploaded (by Mvolz):
[WIP] Promisify

https://gerrit.wikimedia.org/r/214038

mobrovac moved this task from Zotero to Waiting on Deploy on the Citoid board.

Now fixed?

Yes, but keeping it open until we deploy it.

Deployed, resolving.