ipc

Inter-process communication between node and C application

ぃ、小莉子 提交于 2020-01-01 05:48:04
问题 I have 2 software componnects I'd like to make talk to each other, A node.js web application A dedicated server written in C (a fairly simple piece of code that deals with some obscure library that i'd rather not wrap for other languages) The conversations I'd like to have are pretty simple, Node: Setup resource id A C app: Ok, here's the ref num or Node: Take down this ref C app: Sure, mate. Is there any painless way to pass messages between the 2? My theoretical idea currently is something

Can someone please explain to me the basic function of Intents in the Android OS?

烂漫一生 提交于 2020-01-01 03:51:43
问题 I'm new to programming applications for the Android OS. As far as general architecture of the OS goes, I understand that processes are implemented as Linux processes and that each one is sandboxed. However, I'm utterly confused on the IPCs and syscalls (if any) used. I know that the IBinder is a form of this; parcels are sent back and forth between processes and Bundles are array forms of parcels (?). But even that is still unfamiliar to me. Same with Intents. All in all, I don't understand

SImple (but specific) listener and sender Python 3 DBus example

元气小坏坏 提交于 2020-01-01 00:44:10
问题 I want to make a program that has two parts. A listener (a server, if you will) and a sender (the client). I did some research and learned that this is done via a method programmers call IPC (inter process communication); I'm sure you know what it means, I am just expanding the acronym so that you know that I don't think it means Internet Pet Cannibals (or some other non related unpleasant thing). I read that a good way to achieve this is to use dbus. So I did some research on dbus, and now I

What are all the differences between pipes and message queues?

走远了吗. 提交于 2019-12-31 20:15:11
问题 What are all the differences between pipes and message queues? Please explain both from vxworks & unix perspectives. I think pipes are unidirectional but message queues aren't. But don't pipes internally use message queues, then how come pipes are unidirectional but message queues are not? What are the other differences you can think of (from design or usage or other perspectives)? 回答1: Message Queues are: UNIDIRECTIONAL Fixed number of entries Each entry has a maximum size All the queue

D-Bus equivalent for Windows

我的梦境 提交于 2019-12-31 08:52:15
问题 Anyone know of a Linux/D-Bus sort of mechanism for Windows? Thanks 回答1: Choose your poison: http://msdn.microsoft.com/en-us/library/aa365574%28VS.85%29.aspx The following IPC mechanisms are supported by Windows: Clipboard COM Data Copy DDE File Mapping Mailslots Pipes RPC Windows Sockets The closest to DBus is COM. 回答2: The reference D-Bus implementation natively supports Windows. Previously, the WinDBus project could be used. There is no need for equivalents if you want to use D-Bus. 回答3:

D-Bus equivalent for Windows

女生的网名这么多〃 提交于 2019-12-31 08:52:14
问题 Anyone know of a Linux/D-Bus sort of mechanism for Windows? Thanks 回答1: Choose your poison: http://msdn.microsoft.com/en-us/library/aa365574%28VS.85%29.aspx The following IPC mechanisms are supported by Windows: Clipboard COM Data Copy DDE File Mapping Mailslots Pipes RPC Windows Sockets The closest to DBus is COM. 回答2: The reference D-Bus implementation natively supports Windows. Previously, the WinDBus project could be used. There is no need for equivalents if you want to use D-Bus. 回答3:

Inter process communication

自作多情 提交于 2019-12-31 02:50:08
问题 What are the pros and cons of using a file for interprocess communication? Let me give some background of the context I am asking this question in. The problem is the classical producer consumer problem with some constraints. The producers are set of cooperative process running on a cluster of machines and communicate with each other using broadcasts. Each process has local users which it knows about and also lets the other processes know about them by the above broadcast mechanism. Till now

Android IPC之AIDL

泪湿孤枕 提交于 2019-12-30 21:48:06
首先说一下Android进程间的集中通信方式 1.使用Bundle ----> 用于android四大组件间的进程间通信 2.使用文件共享 ---->用于单线程读写 3.使用Messenger ---->用于可存放在message中的数据的传递 4.AIDL android 接口定义语言 ---->主要用于调用远程服务的方法的情况 还可以注册接口 本文大致说一下第四种方式 AIDL,废话不多说了,直接上代码 先看一下host的目录结构: IMyAidlInterface.aidl 是默认新建的AIDL文件,之后我会在里面增加部分代码,新建AIDL文件方法如下( 切记,新建aidl文件后记得make project一下,as会给我们默认生成很多aidl对应的java代码 !): 我们打开IMyAidlInterface 我们就以上代码稍作简介: 1.basciTypes 是创建aidl默认的生成的代码, 展示给我们一些默认支持的数据类型 2.getName() 返回一个默认支持类型 String,不需要做额外处理 3.getPerson() 自定义返回类型 如果我们返回一个基础类型,不需要做额外的处理,创建目录结构中的 MyService, 重构其中的方法,getName直接返回一个简单的String 最后在mainfest 添加service的相关配置: 然后我们新建

Do some programs not accept process substitution for input files?

大憨熊 提交于 2019-12-30 09:44:15
问题 I'm trying to use process substitution for an input file to a program, and it isn't working. Is it because some programs don't allow process substitution for input files? The following doesn't work: bash -c "cat meaningless_name" >sequence1 gattacagattacagattacagattacagattacagattacagattacagattaca >sequence2 gattacagattacagattacagattacagattacagattacagattacagattaca bash -c "clustalw -align -infile=<(cat meaningless_name) -outfile=output_alignment.aln -newtree=output_tree.dnd" (Less verbose

what dbus performance issue could prevent it from embedded system?

*爱你&永不变心* 提交于 2019-12-30 06:12:31
问题 From my reading dbus performance should be twice slower than other messaging ipc mechanisms due to existence of a daemon. In the discussion of the so question which Linux IPC technique to use someones mention performance issues. Do you see performance issues other than the twice slower factor? Do you see the issue that prevent dbus from being used in embedded system? To my understanding if dbus is intended for small messages. If large amount of data need to be passed around, one of the