本文介绍了在Linux上的Java / C ++应用程序的共享内存IPC的良好替代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前在Java和C ++应用程序之间使用共享内存用于IPC,但是寻找一个更方便的替代方法。

I'm currently using shared memory for IPC between Java and C++ apps, but looking for a more convenient alternative.

有人可以提供更好的方法,和速度?

Can someone advise a better method with same performance and speed?

谢谢!

推荐答案

让您的应用程序干扰。在posix环境中,您有管道,共享内存,套接字,信号量和消息队列。查看此问题:了解更多信息。

It depends how you plan to have your apps interract. In the posix environment you have pipes, shared memory, sockets, semaphores and message queues. See this question: Comparing unix lixux IPC for more information.

您的流程(即客户/服务器,生产者 - 消费者等)的交互模型是什么?

What is the interaction model for your processess (i.e. client/server, producer-consumer, etc)?

根据个人经验,你最好的赌注是管道(因为它们只是读取和写入字节的文件)或套接字(因为两种语言都支持它们)。

From personal experience, I would suggest your best bet would be pipes (since they are just files to read and write bytes) or sockets (since both languages support them).

这篇关于在Linux上的Java / C ++应用程序的共享内存IPC的良好替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 09:25