comet 与 php 套接字服务器?
我读到如果很多用户使用你的 comet 实现,php 就不能很好地扩展?是因为apache服务器还是php语言?
什么是套接字服务器?它能解决这个问题吗?
有人为很多用户设置了 php comet 服务器,可以提供一些建议吗?
i've read that php doesn´t scale well if a lot of users are using your comet implementation? is that because of the apache server or the php language?
what is a socket server and does it fix that problem?
someone that has set up a php comet server for a lot of users that could give some advice?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在哪里?
有很多关于扩展和编程语言的废话。
当然,使用 PHP 来实现 comet 存在一些问题 - 但与并发无关,除了 comet 扩展性不好之外(基于非注释 Web 的应用程序不受并发会话数量的限制,并且使用更少的内存) 。
主要考虑因素是内存管理:PHP 是为请求-应答类型的操作而设计的 - 所有数据都可以在迭代之间清除。如果您在服务器中编写面向对象代码,那么您绝对应该考虑使用循环引用检查器。
呃……你不知道吗?套接字服务器是使用套接字进行通信的服务器的通用描述 - 例如网络服务器、邮件服务器、文件服务器......
虽然可以用 PHP(或许多其他语言)实现套接字服务器,但它并没有解决PHP中的内存管理问题。
C.
Where?
There's a lot of nonsense published about scaling and programming languages.
Certainly there are isues with using PHP for comet - but nothing to do with concurrency, other than the fact that comet does not scale well (a non-coment web based app is not limited by the number of concurrent sessions, and uses less memory).
The main consideration is memory-management: PHP was designed for request-reply type operation - where all the data can be cleared down between iterations. If you are writing OO code in your server, then you should definitely think about using the circular reference checker.
err....you don't know? A socket server is a generic description of a server which uses sockets to communicate - e.g. a webserver, a mail server a file server....
Although it's possible to implement a socket server in PHP (or in many other languages) it doesn't the address the memory management problem in PHP.
C.