推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
wingyiu
V2EX  ›  Python

reddit 的排名算法具体是怎么实现的,每次全部 load 入计算再分页?

  •  
  •   wingyiu · Jan 21, 2015 · 4562 views
    This topic created in 4279 days ago, the information mentioned may be changed or developed.
    不要说_sorts.pyx,可以确定不是sql实现的。代码略复杂,看了许久也没看清具体的实现细节。求解答。
    Supplement 1  ·  Jan 22, 2015
    我问的是工程实现,不是算法原理。
    7 replies  •  2015-01-22 12:44:16 +08:00
    octoberzhu
        1
    octoberzhu  
       Jan 21, 2015
    google搜一大堆相关文章啊lz
    wingyiu
        2
    wingyiu  
    OP
       Jan 21, 2015
    @octoberzhu 来一个?
    wingyiu
        4
    wingyiu  
    OP
       Jan 22, 2015
    @octoberzhu 。。。。我问的不是算法的数学原理,早看过了。
    omegaga
        5
    omegaga  
       Jan 22, 2015
    哪里可以确定不是SQL实现的……人家wiki写的很清楚了,他在PostgreSQL上搞了一个ThingDB模型(类似key/value store)来存储文章、评论、用户等信息。然后,reddit用了Cassandra做了Cache。
    wingyiu
        6
    wingyiu  
    OP
       Jan 22, 2015
    @omegaga 求链接
    omegaga
        7
    omegaga  
       Jan 22, 2015
    @wingyiu https://github.com/reddit/reddit/wiki/Architecture-Overview
    然后r2/r2/model/和r2/r2/lib/db/的代码里有不少关于这部分内容的,没仔细看
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4413 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 00:16 · PVG 08:16 · LAX 17:16 · JFK 20:16
    ♥ Do have faith in what you're doing.