Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modularize filters on server side #44

Open
rahulbot opened this issue Jan 5, 2018 · 1 comment
Open

modularize filters on server side #44

rahulbot opened this issue Jan 5, 2018 · 1 comment

Comments

@rahulbot
Copy link
Collaborator

rahulbot commented Jan 5, 2018

The changes in #43 are a good start to this, but we need to do more.

I'd propose a design that has each filter get it's own module under server.filters - ie. server/filters/gender.py, etc. Then at start-time server.scripts.tasks would walk that server.filters package to discover any analyze_[modulename] methods (ie. analyze_gender in gender.py).

@rajaramsrinivas
Copy link

I agree. This was to facilitate the easier addition of new filters with minimal changes. The filter needs to be a generic class from which individual filters are inherited. That way, we have a fixed input/output format for the filters. Currently, the filters are doing everything including reading and writing to the DB, which will need to be moved out as well. I'll work on this after I finish work on improving the performance of content fetching (Issue #31).

@rahulbot rahulbot removed this from the IAP milestone Oct 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants