The current synchronous stack isn't performant and doesn't make sense for what this service provides. Moving to Node using https://github.com/wikimedia/service-template-node should remedy these issues.
Spawned from: T159544#3228543
The current synchronous stack isn't performant and doesn't make sense for what this service provides. Moving to Node using https://github.com/wikimedia/service-template-node should remedy these issues.
Spawned from: T159544#3228543
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Initial import of recommendation-api | mediawiki/services/recommendation-api/deploy | master | +964 K -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | • schana | T148129 Productization of Recommendation API | |||
Resolved | • schana | T164282 Port recommendation api to node |
The port is complete at this point with at least the following limitations:
@mobrovac There is documentation for deploying to production, but is it possible to stand this up in labs? Also, if you have time, would you mind giving a look through the changes to ensure I'm on the right path? https://github.com/schana/recommendation-api/compare/e7f6037fe3c3d99b87b81d28103a838bb10cc345...master
Really nice work @schana! Very well done! In general everything is looking good, I just have some minor comments that I will lay down here.
lib/api-util.js
lib/translation.js
A general comment is that it is customary in WMF services to use the same indentation level for function continuations:
return promisedFunction(x) .then((result) => { return Object.keys(result) .map((item) => { // do whatever here with the item }); });
Finally, it would be much easier and more productive if you could be creating PRs so as to make the review process easier and collaborative ;)
For deploying the service, you can follow the guide on Wikitech. TL;DR is that you need two repos in gerrit, one for the source repo (a clone of your github repo) and a deploy repo. You also need to submit a ticket that presents an intent of first deployment.
For setting it up in BetaCluster, concretely, it is really easy to do it once the steps outlined in the guide have been completed. If you need help with any of the steps, let me know.
@mobrovac Pull request for the changes you recommended above is here: https://github.com/schana/recommendation-api/pull/1
After merge, I'll begin the process to get it moved to Gerrit and follow the guide for deploying that you linked to.
Repos in Gerrit have been requested: https://www.mediawiki.org/wiki/Gerrit/New_repositories/Requests
Change 354451 had a related patch set uploaded (by Nschaaf; owner: Nschaaf):
[mediawiki/services/recommendation-api/deploy@master] Initial import of recommendation-api
Change 354451 merged by Mobrovac:
[mediawiki/services/recommendation-api/deploy@master] Initial import of recommendation-api