任何良好和简单的RPC库的进程间调用? [英] any good and simple RPC library for inter-process calls?

查看:173
本文介绍了任何良好和简单的RPC库的进程间调用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要发送一个(可能是一个)简单的单向命令从客户端进程到服务器进程与内置C ++类型的参数(因此序列化很简单)。 C ++,Windows XP +。

I need to send a (probably one) simple one-way command from client processes to server process with arguments of builtin C++ types (so serialization is pretty simple). C++, Windows XP+.

我正在寻找一个不需要复杂配置的库,提供简单的界面,不需要几个小时的学习时间,没有商业使用限制。简单问题的简单解决方案。

I'm looking for a library that doesn't require complicated configuration, provides simple interface, doesn't require hours to days of learning and doesn't have commercial usage restrictions. Simple solution for simple problem.

Boost.Interprocess 对于这个简单的任务来说太低了,因为不提供RPC接口。套接字也可能是一种过分,因为我不需要在机器之间通信。关于DCOM,CORBA等人命名管道?从来没有使用过,任何好的图书馆WinAPI? OpenMPI?

Boost.Interprocess is too low-level for this simple task because doesn't provide RPC interface. Sockets are probably an overkill too because I don't need to communicate between machines. The same about DCOM, CORBA et al. Named pipes? Never used them, any good library over WinAPI? OpenMPI?

推荐答案

我不认为套接字真的太过分了。替代品都有自己的问题,套接字比命名管道,共享内存等支持得更好,因为几乎每个人都在使用它们。本地系统上的套接字速度可能不是问题。

I don't think sockets are really overkill. The alternatives all have their own problems and sockets are far better supported than named pipes, shared memory, etc., because almost everyone is using them. The speed of sockets on local system is probably not an issue.

有Apache Thrift:

There's Apache Thrift:

http://incubator.apache.org/thrift/

作为编组机制,有几个RPC实现包装在Google的protobuf库中:

There are a few RPC implementations wrapped around Google's protobuf library as the marshaling mechanism:

https://github.com/google/protobuf/blob/master/docs/third_party.md#rpc-implementations

有XML-RPC:

http://xmlrpc-c.sourceforge.net/

如果您的邮件真的简单,我可能会考虑使用UDP数据包,那么就没有连接可以管理。

If your messages are really simple, I might consider using UDP packets, then there are no connections to manage.

这篇关于任何良好和简单的RPC库的进程间调用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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