直播活动流架构
我之前已经发布过类似的问题,但我想知道使活动源实时工作的底层技术是什么?我正在将其设计为 100% 由 MySQL 数据库驱动,但遇到的问题是有 200 多个活动需要流式传输,并且有不同类型的流 + 需要支持至少 500,000 个并发用户。有基于地理的流、网络流、朋友流、业务流等。所有流数据都是根据我网站上的活动自行托管的。我的平台是Linux、MySQL、PHP。
面临的问题: 1)不确定如何解决这个问题。我应该在 AJAX、PHP 和 MySQL 中执行此操作,还是通过 RSS/XML 执行此操作,还是需要使用从文本文件读取的旧方式? 2) 流如何实时更新 - 将客户端活动存储在 cookie 或会话中、服务器到客户端推送、客户端到服务器拉取等? 3)是否与服务器更相关,例如假设我需要支持 500,000 个并发用户,我是否需要专门的服务器来执行此操作? 4)如果我需要为此使用专门的框架,有没有开源框架?
任何指向示例架构/实施策略或资源的链接都会有所帮助。
I have posted earlier on a similar question but I would like to know what is the underlying technology to make an activity feed work in real-time? I am designing it 100% database-driven in MySQL but running into issues are there are 200+ activities to stream out and there are different types of streams + need to support at least 500,000 concurrent users to start with. There are geographic-based streams, network streams, friend streams, business steams, etc. All stream data is self-hosted based on activities on my site. My platform is Linux, MySQL, PHP.
Issues facing:
1) Unsure about what way to approach this. Should I just do it in AJAX, PHP, and MySQL or is this done via RSS/XML or do I need to use old fashion read from text files?
2) How does the stream update in real-time - store activities client-side in a cookie or session, server to client push, client to server pull, etc?
3) Is it more server related like do I need a specialized server just to do this, assuming I need to support 500,000 concurrent users?
4) If I need to use specialized frameworks for this are there any open-source frameworks?
Any links to sample architecture/implementation strategies or resources would be helpful.
我不知道“活动流”具体是什么意思;我以前没有做过类似的事情,但这就是我的想法:
I've got no idea what you mean specifically by "activity stream"; and I haven't done anything like this before, but here's what I'd be thinking: