yral-dapp / hot-or-not-backend-canister

Other
9 stars 6 forks source link

feat: yral feed which is merged version of hot or not and home feed #356

Closed abhishek-tripathi-yral closed 2 months ago

abhishek-tripathi-yral commented 3 months ago

usually, home feed => posts are ranked by home_feed_score usually, hon feed => posts are ranked by hot_or_not_feed_score

Now, yral_feed = posts (home + hot or not) are ranked by hot_or_not_feed_score

abhishek-tripathi-yral commented 3 months ago
graph LR
    subgraph "PR 1: Add New Field (Skipped during Upgrade)"
        A[Add field: `posts_index_sorted_by_yral_feed_score`] --> B{Marked as `skip_deserializing`}
        B --> C(Pre-Upgrade: No action)
        C --> D(Post-Upgrade: No migration, default value applied) 
    end

    D --> E((Code Deployed with New Field))

    subgraph "PR 2: Activate Deserialization & Migration"
        E --> F[Remove `skip_deserializing`]
        F --> G(Pre-Upgrade: No action)
        G --> H{Post-Upgrade: Migration logic runs} 
    end
    H --> I((Field ready for frontend))
abhishek-tripathi-yral commented 3 months ago

https://www.mermaidchart.com/app/projects/cf630cb8-cbee-4099-a8f9-6b161aff520e/diagrams/c5a67f32-119c-417e-9105-c7f3f9c31dfa/version/v0.1/edit

HD diagram with better zoom span

abhishek-tripathi-yral commented 2 months ago

tested post_upgrade locally.

  1. feeds from home_feed show up in yral_feed

image image (1)