简体   繁体   English

Java中的即时消息传递实现

[英]Instant messaging realization in Java

I writting bechalor thesis on analyze and realise instant messaging system in Java . 我写了一篇关于在Java分析和实现即时消息系统的论文论文。 In my mind is first idea realise it by SOAP service, but in other hand I think it is simple but not appropriate, because SOAP provide me only one-way comunication. 在我看来,第一个想法是通过SOAP服务实现它,但另一方面,我认为它很简单但不合适,因为SOAP仅向我提供单向通信。

In IM I want "alert" from server without asking every some period from client, I think it is waste of server capacity for answer "stupid" request for new message. 在IM中,我希望从服务器发出“警报”,而不问客户端有任何间隔,我认为这是浪费服务器容量来回答新消息的“愚蠢”请求。 I don't know other appropriate technology for realise it. 我不知道其他合适的技术来实现它。 I want some tips how way is correct for this project. 我想要一些技巧,说明该项目的正确方法。

Look into XMPP over socket or Socket.io might give you a good starting point. 通过套接字查看XMPP或Socket.io可能会为您提供一个很好的起点。 SOAP and REST are not really real time real time due to the structure of messaging, they don't keep persistent connection as websocket as you observed. 由于消息传递的结构,SOAP和REST并不是实时的,它们没有像您观察到的那样保持持久连接作为websocket。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM