到底有多少用户可以支持 Blazeds Messeging 服务?为了获得更多的用户支持,我们需要做什么(池化)?
我设计了一个在线交易应用程序,它使用 blazeds 和码头, 因为我使用 AMF-LongPooling 作为通道,具有以下参数,
这里的问题是每条消息都没有到达所有已连接的用户,少数用户丢失了消息(600 条消息中有 300 条收到)...
我们是什么需要做的就是向所有在线用户提供即时消息。 ??
请帮我一份好吗?
I designed one On line Trading Application, which uses blazeds & jetty,
in that i used AMF-LongPooling as channel, with following parameter,
Here is the problem is Each message is not reaching all the user,who are connected, messages are missing to few users (300 recieving out of 600)...
what we need to do to provided instant messages to all Online. ??
Please help me one?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你的问题太笼统了,不可能给出答案,因为它取决于太多的东西:网络、消息的大小、你的系统架构等。我的建议是投入大量精力阅读 BlazeDS 开发人员指南并打开调试消息打开(BlazeDS 显示了很多有用的信息)。研究 BlazeDS 源代码也将有所帮助。
Your question is too generic, it's not possible to give an answer because it depends on too many things: network, size of the messages, your system architecture etc. My suggestion is to invest heavily in reading BlazeDS developer guide and to turn the debug messages on (there is a lot of useful information displayed by BlazeDS). It would also help to study BlazeDS source code.
在 AMF 长轮询的情况下,请求将驻留在服务器上,如果一次驻留太多请求,它们将消耗服务器的所有可用线程。并且下一个客户端将无法连接。
在你的情况下,我假设消息大小不是很大。解决方案可以是以下之一:
在 LCDS 中不会遇到这个问题,因为它使用不会阻塞线程的 NIO 端点。我知道这个线程限制对于 Servlet 3.0 来说不是问题,在这种情况下,您可以通过 blazes 本身支持更多客户端。您可以查看更多相关信息 这里。
In case of AMF-longpolling the request is parked on the server and if too many requests are parked at a time, they will consume all available threads for the server. And the next client won't be able to connect.
In your case I am assuming the message size is not very big. And the solution can be one of the followings:
You don't get that problem in LCDS as it makes use of NIO end points that don't block the thread. I have come to know that this thread restriction is not a problem with Servlet 3.0 and in that case you can support more clients with blazeds itself. You can check more about it HERE.