我应该使用什么协议进行快速命令/响应交互? [英] What protocol should I use for fast command/response interactions?

查看:32
本文介绍了我应该使用什么协议进行快速命令/响应交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为快速命令/响应交互设置协议.我的直觉告诉我,只需将一个简单的协议与 CRLF 分隔的 ascii 字符串组合在一起,例如 SMTP 或 POP3 的工作原理,并在需要保护时通过 SSH/SSL 将其隧道化.

I need to set up a protocol for fast command/response interactions. My instinct tells me to just knock together a simple protocol with CRLF separated ascii strings like how SMTP or POP3 works, and tunnel it through SSH/SSL if I need it to be secured.

虽然我可以这样做,但我更愿意建立在现有技术的基础上,这样人们就可以使用友好的库,而不是操作系统提供给他们的套接字库接口.

While I could just do this, I'd prefer to build on an existing technology so people could use a friendly library rather than the socket library interface the OS gives them.

我需要...

  • 来回传递结构化数据的命令和响应.(XML、S 表达式,不在乎.)
  • 服务器无需轮询即可向客户端发出计划外通知的能力.

有什么想法吗?

推荐答案

AMQP 听起来很有希望.或者,我认为 XMPP 支持您想要的大部分内容,尽管有相当多的开销.

AMQP sounds promising. Alternatively, I think XMPP supports much of what you want, though with quite a bit of overhead.

也就是说,根据您要完成的任务,简单的临时协议可能会更容易.

That said, depending on what you're trying to accomplish, a simple ad hoc protocol might be easier.

这篇关于我应该使用什么协议进行快速命令/响应交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆