• 请不要在回答技术问题时复制粘贴 AI 生成的内容
awanganddong
V2EX  ›  程序员

聊天网站的匹配功能怎么实现比较好

  •  
  •   awanganddong · Apr 12, 2021 · 1108 views
    This topic created in 1959 days ago, the information mentioned may be changed or developed.

    需求

    用户上线后可进入匹配界面。然后按一定的条件对其进行匹配。每次匹配之前还需校验账户是否存在余额。

    思考

    现在暂不考虑 es 。

    如果用 mongodb 存储用户 uid 以及相关匹配条件。相当于筛选出符合条件的用户。

    增加对 mongodb 用户信息同步更新。

    这种方案会存在那种问题?

    现在项目是 mysql 生扛,然后 redis 加唯一锁,但是数据的状态更新还是落在 mysql 。特别容易出现状态更新失败的情况。

    相似文章

    https://v2ex.ih06.com/amp/t/497091

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4727 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 01:05 · PVG 09:05 · LAX 18:05 · JFK 21:05
    ♥ Do have faith in what you're doing.