ipc

Interprocess communication - Binary data/serialized objects [closed]

℡╲_俬逩灬. 提交于 2019-12-11 07:18:40
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I currently have two processes running on the same computer, a 'producer' and a Qt application tasked with displaying the data. These two need to exchange binary data (byte arrays, serialized objects). The data 'parcels' may range in size from a handful of bytes to tens of

Python [child] process sending message to Node [parent] process

女生的网名这么多〃 提交于 2019-12-11 07:09:16
问题 Python process forked by NodeJS - Alternative to process.send() for Python? I followed the solution above but doesnt seem to work (no messages are being send by the child python code. Here is my code: const spawn = require('child_process').spawn; var child = spawn('python3', ['child.py'], { stdio:[null, null, null, 'pipe'] }); child.on('message', function(message) { console.log('Received message...'); console.log(message); }); and # !/usr/bin/python3 import os os.write(3, str.encode("HELLO"))

Electron - ipcRenderer not working in Async Class

六月ゝ 毕业季﹏ 提交于 2019-12-11 06:37:26
问题 i have a class with a Constructor and Async functions. I have done module.exports so that i could call my Class from my GUI.js file and in my GUI.js file, i have required that class, and everything works fine. But inside my class, im trying to do this ipcRenderer.send('message', 'Hello'); And im getting this error: TypeError: Cannot read property 'send' of undefined is it possible to remote the ipcRenderer in my GUI.js? Thanks. i have required the module in my main file, and in my renderer

Alternatives to RMI for IPC?

穿精又带淫゛_ 提交于 2019-12-11 06:31:58
问题 I have 2 processes that need to communicate over the same PC and different PCs. In the local case the process communication is among different processes e.g Process A and Process B . In the remote case it will be among 2 instances of Process A running in different PCs. I will create them from scratch and I am wondering what is the best approach. I am aware of RMI and sockets but I was wondering for my case as described, and taking also into account that the messages exchanged are small and

Permission denied when trying to create message queue using POSIX Message Queues

让人想犯罪 __ 提交于 2019-12-11 06:27:12
问题 I am creating a message queue with the following snippet by following The Linux Programming Interface. if((mq_open("/my_message_queue", O_CREAT, O_RDWR, NULL)) == -1) { perror("mq creation failed"); } Running this snippet I get an error: "permission denied". I wanted to check and see if I had created the queue previously and not destroyed it, so I used ipcs. However, ipcs does not show any active message queues. I have never used the POSIX IPC libraries in my development environment before

R -> kdb: Pass R data to kdb+ as binary objects

此生再无相见时 提交于 2019-12-11 04:39:10
问题 What's the most efficient way to insert R objects (more specifically, time series expressed as xts or data.table objects, i.e. time-based and numeric columns) into a kdb+ database? I was able to locate only solution involving string serialization via q expressions as described here and here. 回答1: My solution was inspired by this version of qserver.c from github Yang added two functions: convert_binary, convert_r that [de]serialized data, which is basically what you asked for. However, the

How to perform non-blocking reading stdout from a subprocess in clojure?

断了今生、忘了曾经 提交于 2019-12-11 04:25:32
问题 I wish to spawn a long-running sub-process from clojure and communicate with this process via the standard streams. Using the conch library, I can spawn and read the process, and read data from the out stream: (def my-process (sh/proc "my_dumb_process")) ; read 10 lines from my-process's stdout. Will block until 10 lines taken (take 10 (line-seq (clojure.java.io/reader (:out p)))) I want to invoke an asynchronous callback whenever my-process prints to stdout - whenever data is available in

Passing class instances between applications in Android

醉酒当歌 提交于 2019-12-11 04:11:35
问题 I have an application App1 which defines class A and uses instances of this class. What I want to achieve is - after App1 is installed on the device to be able to load App2 which defines and implements class B which is subclass of class A (imported from App1 package); and be able to get an instance of class B in the App1. Class B doesn't add any new interfaces, so using it as class A is ok. But I am not sure how to pass the instance of class B to App1 (preferrably without any user interaction

Web Application and In-Memory State

被刻印的时光 ゝ 提交于 2019-12-11 04:06:35
问题 I'm building a web application in ASP.Net 4.0 which must maintain an in-memory state shared between users (better to say between group of user). It is not a standard application and the state related to a group of users are/can/should be persisted only after a group of actions are completed (which can take half an hour). This requirement can't be changed. As far as i know I can't rely in an in-proc memory because a recycle will clear my state. The only solution I found is to create a standard

Liferay IPC listener runs multiple times

左心房为你撑大大i 提交于 2019-12-11 04:03:00
问题 First of all sorry if this question has been already asked somewhere, but after a few hours on google I still can't find an answer. I am pretty new in portlet development, (but we have a shortage of developers and I have to work with it time to time), so the solution might be something trivial, but I really don't have enough experience with it. The problem is I have two portlets on a page and I try to let one of them know about changes in the other. For this I use IPC. In the first one I have