owenliang / go-push Goto Github PK
View Code? Open in Web Editor NEW千万级go弹幕推送服务器
千万级go弹幕推送服务器
如题,为什么选择HTTP作为模块之间通信的协议呢
大神你好,请问点对点推送,和qq的私聊,还有踢人,将用户从指定房间里踢出去,这些功能怎么实现
1.读取gateway.json和logic.json的路径需要做出修改:
./gateway.json ==>gateway/cli/gateway.json
./logic.josn ==> logic/cli/logic.json
2.gateway.json中读取证书的路径需要作出修改:
./default.pem ==>gateway/cli/default.pem
3.curl 时需注意在windows环境下的写法为:
curl http://localhost:7799/push/all -d "items=[{"msg": "hi"},{"msg": "bye"}]"
WSConnection的问题:
readLoop(), writeLoop(), heartbeatChecker(),
这三个方法,按照传统服务端的做法,应该是放在外部,对所有连接统一处理
你的做法是放在WSConnection类,每创建一个WSConnection,都要执行一次,
当有100W用户在线的时候
会有两百W个循环在跑readLoop(), writeLoop()
会有一百W个Timer在检测心跳
是故意这样设计的吗? go的特性?
我有嘗試將此篇open source的語法概念
https://github.com/cskr/pubsub
整合進自行fork melody的專案底下
https://github.com/z9905080/melody
這樣的做法大大降低了消息隊列的size以及對於房間的耦合度
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.