c++ - 使用 HTTP 作为传输的消息传递中间件

标签 c++ c http embedded message-queue

我正在寻找允许客户端从服务器接收消息(推送通知)的选项。客户端是一个 ARM/Linux 嵌入式设备,其功能类似于 Raspberry Pi。

因为客户端可能位于防火墙后面,所以我想使用可以在 HTTP 之上传输的面向消息的中间件 (MOM)。我认为这排除了基于 AMQP 的 MOM。

MOM服务器需要支持Linux平台。 MOM 还应提供可在 ARM/Linux 平台上编译的 C 或 C++ 客户端库。

我知道 HTTP 长轮询技术,以及 HTML 5 WebSockets 和服务器发送的事件。但我更喜欢更高级别(但轻量级)的解决方案,该解决方案负责通过 HTTP 在点 A 和点 B 之间传输消息。消息必须格式化为 XML、JSON、纯文本还是二进制都无关紧要。

最佳答案

我成功使用的两个是 XML-RPCgSOAP .

  • XML-RPC:

    It's a spec and a set of implementations that allow software running on disparate operating systems, running in different environments to make procedure calls over the Internet.

    It's remote procedure calling using HTTP as the transport and XML as the encoding. XML-RPC is designed to be as simple as possible, while allowing complex data structures to be transmitted, processed and returned.

  • gSOAP:

    The gSOAP toolkit is a C and C++ software development toolkit for SOAP/XML Web services and generic (non-SOAP) C/C++ XML data bindings. The toolkit analyzes WSDLs and XML schemas (separately or as a combined set) and maps the XML schema types and the SOAP messaging protocols to easy-to-use and efficient C and C++ code. It also supports exposing (legacy) C and C++ applications as SOAP/XML Web services by auto-generating XML serialization code and WSDL specifications. Or you can simply use it to automatically convert XML to/from C and C++ data. The toolkit supports options to generate pure ANSI C or C++ with or without STL.

关于c++ - 使用 HTTP 作为传输的消息传递中间件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18450996/

相关文章:

C++ 线程/进程标识符

c++ - 模板无法将函数定义与现有声明相匹配

c - 交换 C 变量

c - FFMpeg示例程序

javascript - Node Js 中的 HTTP 请求

c# - 如何将整数从 C# 方法复制到 native C DLL 函数

c++ - 如何使用 Clang AST 工具在代码库中查找移动构造函数?

c - 如何让 callgrind 转储源代码行信息?

javascript - 如何通过javascript下载pdf文件?

python - python 的 httplib 的替代品?