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

[FEATURE] Sort front page by popularity #467

Open
saengowp opened this issue Jan 19, 2023 · 1 comment
Open

[FEATURE] Sort front page by popularity #467

saengowp opened this issue Jan 19, 2023 · 1 comment
Assignees
Labels
enhancement Improve existing features

Comments

@saengowp
Copy link
Member

Is your feature request related to a problem? Please describe.

The current front page is ordered by Course ID, which is totally arbitrarily and waste valuable front page opportunity.

And we knows that front page is likely the page visit by all user, so that's a big loss of opportunity.

Describe the solution you'd like

As a new feature, the front page should be sorted by something that will be more helpful to the user.

For this task, We should start sorting by basic properties like popularity.

Requirements

  1. It should be extremely fast, since this is the front page.
  2. It should be approximately sorted such that the user will click on it.

Tasks

Concretely, you must performs following steps:

  1. Propose the design of the system for the team to review
    a. Things to think about: How to query for popularity, how and when to cache, fallback, extensibility.
    b. You might want to use: CGR's User Event Store (ElasticSearch), Backend (NodeJS), and Cache (Redis)
  2. Implement them
  3. A/B Test the feature
    a. We will use simple metric like click for this
    b. We have Google Optimize for A/B Test.

Required Skills

You will learn following things:

  • Basic ElasticSearch query
  • Basic Redis usage
  • How to use NestJS
  • How to run A/B Test

In the future, we may extends it to use CGR Computation's Ranking, but that's for another time.

Advisor is @saengowp
Assigned to N'Jom

@saengowp saengowp added the enhancement Improve existing features label Jan 19, 2023
@saengowp
Copy link
Member Author

Some design idea:

  1. The search function is located at course.service.ts
  2. We have to query ElasticSearch to find out which course are popular, then cache the result for some time in Redis
    a. This may be done periodically using NestJS's Task Scheduler
    b. You can try crafting the query using Kibana's DevTool
  3. In case that elastic or redis fail, we should fallback to old ordering
  4. We should add variant parameter to search GQL query, so that we could A/B test the new and the old ordering.
  5. We have to think about how ordering is achieved
    a. How to find out which course is popular? (Maybe user add course event in clientlogging would tell us)
    b. Should ordering be per semester, per year, per study program?
    c. What to do during new semester when data is sparse?

@JomnoiZ JomnoiZ self-assigned this Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improve existing features
Projects
Status: Todo
Development

No branches or pull requests

2 participants