Git Product home page Git Product logo

douyin's Introduction

生成代码

hz new -idl idl/core.thrift -module github.com/ClubWeGo/douyin

扩展模块

hz new -idl idl/interaction.thrift -module github.com/ClubWeGo/douyin hz new -idl idl/relation.thrift -module github.com/ClubWeGo/douyin

删除代码

rm -r ./biz router.go router_gen.go main.go go.mod go.sum .hz .gitignore

更新代码

hz update -idl idl/core.thrift

拉取依赖

go mod tidy

编译代码

go build

依赖另外几个微服务的代码仓库

(微服务代码更新后,需主动执行来更新代码)

go get github.com/ClubWeGo/videomicro@latest

go get github.com/ClubWeGo/usermicro@latest

go get github.com/ClubWeGo/relationmicro@latest

go get github.com/ClubWeGo/favoritemicro@latest

go get github.com/ClubWeGo/commentmicro@latest

说明

  1. 当前注册用户时,前端并未提供个人参数配置的能力,也没有提供更新用户信息的能力,所以在core.register_server处写死了初始化的用户背景图像和头像。在配置本项目时,请将对应文件名换成minio中存储的文件名。

douyin's People

Contributors

darley-wey avatar derekwin avatar wt993638658 avatar zxhchime avatar

douyin's Issues

idea3-推送

引入mq
视频发布(保存到云端、加入视频流、发布消息推送给粉丝)
好友、活动、发布消息推送

idea2-搜索

引入es
视频搜索(关键词、标签、视频名、用户名) ,设计合理的索引保证返回贴合用户偏好的视频,增加用户粘度
写es的同时保证双写一致?

idea1-消息记录

消息按时间分区,以某时间点&消息量为界限
将消息记录花费为冷分区、热分区
冷分区:历史特别悠久的消息,客户端本地保存历史消息,如果丢失查找冷分区,需要加载很久用户也能接受,分区容量可以很大
热分区:最近的消息,控制分区容量在一定范围内,保证就算db查找也能很快返回给用户

同时可以基于userId做分片、甚至某业务字段二次分片?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.