XMPP的简介和基本概念

简介: XMPP是一个标准,定义了很多的规范(起源于Jabber),不同的产品都基于这些标准实现 xmpp.org http://xmpp.org/about-xmpp/technology-overview/ XMPP is the Extensible Messaging and Presence...

XMPP是一个标准,定义了很多的规范(起源于Jabber),不同的产品都基于这些标准实现

xmpp.org

http://xmpp.org/about-xmpp/technology-overview/

XMPP is the Extensible Messaging and Presence Protocol, a set of open technologies for instant messaging, presence, multi-party chat, voice and video calls, collaboration, lightweight middleware, content syndication, and generalized routing of XML data.

  • Core — information about the core XMPP technologies for XML streaming
  • BOSH — an HTTP binding for XMPP (and other) traffic
  • Jingle — SIP-compatible multimedia signalling for voice, video, file transfer, and other applications
  • Multi-User Chat — flexible, multi-party communication
  • PubSub — alerts and notifications for data syndication, rich presence, and more

BOSH is “Bidirectional-streams Over Synchronous HTTP”, a technology for two-way communication over the Hypertext Transfer Protocol (HTTP). BOSH emulates many of the transport primitives that are familiar from the Transmission Control Protocol (TCP). For applications that require both “push” and “pull” communications, BOSH is significantly more bandwidth-efficient and responsive than most other bidirectional HTTP-based transport protocols and the techniques known as AJAX.

The XMPP Network组成

Any XMPP network is composed of a number of actors. These actors can be categorized as servers,

clients, components, and server plug-ins.

XMPP servers, or more accurately, XMPP entities speaking the server-to-server protocol or the server end of the client-to-server protocol, are the circulatory system of any XMPP network.

The majority of XMPP entities are clients, which connect to XMPP servers via the client-to-server protocol.

server components. These components augment the behavior of the server by adding some new

service. These components have their own identity and address within the server, but run externally and communicate over a component protocol. component protocol XEP-0114

Many XMPP servers can also be extended via plug-ins. These plug-ins are usually written in the same programming language as the server itself and run inside the server’s processes. Their purpose overlaps to a large degree with external components, but plug-ins may also access internal server data structures and change core server behavior.

关键名词
JID

JIDs (short for jabber identifiers) elizabeth@longbourn.lit

FQDN

Domain fully qualified domain name (FQDN) jabber.org

User JabberID stpeter@jabber.org

Stanzas

Stanzas Work is accomplished in XMPP by the sending and receiving of XMPP stanzas over an XMPP stream.

3 stanzas in the main XMPP vocabulary: <message>, <presence>, and <iq>

Resources

When you connect your client to an XMPP server, you choose (or the server assigns to you) a resource identifier for that particular connection. This resource is used for routing traffic to that connection instead of any other connections you might have open at the moment. The resource is added to the end of your account address, such as stpeter@jabber.org/roundabout or remko@el-tramo.be/home.

The resource is often the name of your computer, your location, or the client software you are using

XMPP URI scheme that can be used to identify JabberIDs as URIs, such as xmpp:jabber.org or xmpp:stpeter@jabber.org [RFC 5122].

Info/Query (or IQ)

life cycle

Every XMPP session has a life cycle consisting of several phases: connection, stream set up, authentication, the session body, and disconnection.

 

XMPP优缺点

Advantages of XMPP

XMPP has the following advantages over HTTP, each of which are explored in detail:

Enables pushing data, not just pulling

Firewall friendly

Strong authentication and security

Provides many out-of-the-box tools for solving a wide range of problems

Disadvantages of XMPP

Every protocol is a bag of both features and problems. In many cases XMPP is not the best tool for

the job or suffers from some limitation. XMPP’s drawbacks include:

Stateful protocol

Community and deployments are not as broad as HTTP

More overhead than HTTP for simple chores

Specialized implementations still needed

相关文章
|
机器学习/深度学习 算法 搜索推荐
阿里云机器学习平台PAI与香港大学合作论文入选INFOCOM 2022,有效减少大规模神经网络训练时间
近日,阿里云机器学习平台 PAI 与香港大学吴川教授团队合作的论文”Efficient Pipeline Planning for Expedited Distributed DNN Training”入选INFOCOM(IEEE International Conference on Computer Communications) 2022,论文提出了一个支持任意网络拓扑的同步流水线并行训练算法,有效减少大规模神经网络的训练时间。
阿里云机器学习平台PAI与香港大学合作论文入选INFOCOM 2022,有效减少大规模神经网络训练时间
|
5月前
|
人工智能 自然语言处理 数据安全/隐私保护
智源研究院发布开源中文互联网语料库CCI 4.0,新增高质量英文数据与合成数据
2025年5月6日,智源研究院在法国巴黎举行的GOSIM全球开源创新论坛上发布大型开源文本数据集CCI 4.0,为全球的大模型创新发展再次提供重要的开源资源,并积极推动全球开源合作。
185 10
|
12月前
|
云安全 弹性计算 安全
云上攻防:实例元数据、控制台接管
随着企业上云趋势增强,云安全成为焦点。云服务提供高效的数据存储和计算能力,但也带来数据保护和访问控制的新挑战。攻击者常利用云服务漏洞,威胁企业数据安全。本文探讨云上攻防关键领域,如元数据泄露、AKSK安全、控制台接管等,提出防御措施,帮助企业应对云安全风险。
477 2
云上攻防:实例元数据、控制台接管
|
7月前
|
自然语言处理 搜索推荐 前端开发
大模型联网搜索的短板与突破之路
本文作者详细分析了当前大模型在联网搜索功能中存在的几个主要问题,并提供了具体的案例和解决方案。
1012 8
大模型联网搜索的短板与突破之路
|
8月前
|
存储 人工智能 弹性计算
2025年阿里云企业高性能云服务器租用价格与选型详解
随着企业数字化转型,阿里云于2025年推出多款高性能云服务器实例,涵盖计算、通用和内存密集型场景。文章分析了企业选择云服务器的核心要点,包括明确业务需求(如计算密集型任务推荐计算型实例)、性能与架构升级(如第八代实例性能提升20%),以及第九代实例支持AI等高算力需求。同时提供了配置价格参考和成本优化策略,助力企业实现效率与成本的最优平衡。
|
8月前
|
人工智能 自然语言处理 搜索推荐
云上玩转DeepSeek系列之三:PAI-RAG集成联网搜索,构建企业级智能助手
本文将为您带来“基于 PAI-RAG 构建 DeepSeek 联网搜索+企业级知识库助手服务”解决方案,PAI-RAG 提供全面的生态能力,支持一键部署至企业微信、微信公众号、钉钉群聊机器人等,助力打造多场景的AI助理,全面提升业务效率与用户体验。
|
SQL 缓存 关系型数据库
如何优化分页查询的性能?
【8月更文挑战第3天】如何优化分页查询的性能?
573 37
|
12月前
|
传感器 物联网 定位技术
浅谈蓝牙演进之路:从诞生到普及
蓝牙技术是一种支持设备间短距离通信的低功耗无线电技术,广泛应用于移动通信、消费电子、汽车电子、医疗健康等领域。自1994年由爱立信公司创制以来,蓝牙技术经历了多个版本的迭代,从最初的蓝牙1.0到最新的蓝牙5.4,不断优化传输速率、通信距离、功耗和安全性。未来,蓝牙技术将在低功耗、高速度、广覆盖等方面继续发展,拓展更多应用场景,如智能家居、可穿戴设备、工业物联网等。
|
Ubuntu 机器人 测试技术
奥比中光 Femto Bolt相机ROS配置
这篇文章介绍了奥比中光Femto Bolt相机在ROS1 Noetic和ROS2 Humble环境下的配置过程,包括自动脚本和手动配置方法,适用于Ubuntu 20.04/22.04系统和Jetson Orin平台。
564 0
奥比中光 Femto Bolt相机ROS配置
|
Ubuntu
蓝易云 - ubuntu系统如何将文件打包成tar.gz
这样,"example"目录就会被打包成"example.tar.gz"文件。
475 0