我可以使用 Java 中的信使服务器做什么
除了java套接字之外,我还能用什么来作为Java中的消息服务器。
我的目标是维护更多的客户。我对RMI了解一点。但我不确定我应该使用什么。我想同时维护超过100,000个客户。
instead of java socket, what else I can use for a messenger server in Java.
My goal is to maintain more client.I know a little about RMI. But I'm not sure what should I use. I want to maintain more than 100,000 client at a time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果没有更多信息,我会建议 JMS。
100,000 个客户已经很多了。这是并发客户还是注册客户?
这是在互联网上还是在内部网络上?
Without more information I would suggest JMS.
100,000 client is a lot. Is this concurrent clients or registered clients?
Is this on the internet, or internal network?
看起来您需要带有集群代理的 JMS(我推荐 HornetQ)。
It looks like you need JMS with clustered broker (I'd recommend HornetQ).
您还可以使用 Apache ActivemQ,它很容易上手。 此处了解有关 ActivemQ 的更多信息
You can also use Apache ActivemQ, its easy to get started with. Find more about ActivemQ here
我真的不知道你在问什么,所以如果这是一个糟糕的答案,我很抱歉,但我会尽力而为。如果你有最后期限,我会使用像 JMS 这样编码良好的库,但是我没有看过源代码,但我想说它使用套接字是一个安全的选择。如果有另一种方法可以建立您正在尝试的连接类型,我不知道它是什么。
如果这是出于个人使用或教育目的,我会自己制作,这就是我学到的。我研究了一些我找到的源代码和 java2s.com 的聊天程序,然后做了我自己的实现。我制作的程序更像是即时通讯程序,而不是聊天程序,我用 Java 编写,因为跨平台编程很容易,我认为这对于即时通讯程序之类的东西很重要。
如果您想查看源代码,请将您的电子邮件地址发送给我。我的电子邮件地址是[电子邮件受保护]。祝你好运,抱歉我无法提供更多帮助。
I don't really know what you're asking so I'm sorry if this is a terrible answer but I'll do my best. If you have a deadline to meet I would use a well coded library like JMS, however I haven't ever looked at the source code but I'd say its a safe bet it uses Sockets. If there is another way to make the type of connection you're trying to I don't know what it is.
If this is for personal use or educational purposes I would make your own, that's how I learned. I studied some source code I found and java2s.com for a chat program then made my own implementation. The program I made is more like an instant messenger than a chat, I did it in Java because it's easy to programs cross-platform and I think that's important for something like an instant messenger.
If you'd like to take a look at the source code send me your e-mail address. My e-mail address is [email protected]. Good luck, sorry I couldn't be more help.