ipc

Simplest way to communicate between Python and C# using IPC?

為{幸葍}努か 提交于 2020-01-10 04:22:11
问题 I have some C# code that needs to call a Python script several thousand times, each time passing a string, and then expecting a float back. The python script can be run using ANY version of Python, so I cannot use Iron python. It's been recommended that I use IPC named pipes. I have no experience with this, and am having trouble figuring out how to do this between C# and Python. Is this a simple process, or am I looking at a decent amount of work? Is this the best way to solve my problem? 回答1

Rapid IPC with Messengers or AIDL

我的未来我决定 提交于 2020-01-10 02:59:11
问题 I'm attempting to create a program in Android which communicates rapidly with a remote service (~40,000/sec), however all Android IPC seems to fall short of being able to accomplish this task. My first attempt involved a standard Messenger system which was unable to do more then ~2,000/second and equally bad was that it seemed punctuated with intermittent lag. MainActivity (Test with Messengers) public class MainActivity extends Activity implements ServiceConnection{ Messenger

Shared Memory with Docker containers (docker version 1.4.1)

走远了吗. 提交于 2020-01-09 07:38:08
问题 I have 1 process that writes to a specific section of shared memory (i.e. "/falcon" )in a docker container. Docker image: dockersharedmemory/shmclient I have another process that initially creates and reads the same section of shared memory(i.e. "/falcon" ) every second in another docker container. Docker image: dockersharedmemory/shmserver When I run the two containers using the following commands I am able to read and write in each container respectfully: docker run -d -v /dev:/dev

Calling a method in service which is in another app using aidl

社会主义新天地 提交于 2020-01-07 03:40:40
问题 I am following the method that is described in Android Developer's Cookbook. Here is my aidl interface package com.test.aidl; interface IMyAidl{ int add(int n1, int n2 ); } My serice class package com.test.usingaidl; import android.app.Service; import android.content.Intent; import android.os.IBinder; import android.os.RemoteException; import android.support.annotation.Nullable; import com.test.aidl.IMyAidl; /** * Created by HarshVardhan on 1/18/2016. */ public class AddService extends

What to do with interprocess communication between two processes?

戏子无情 提交于 2020-01-07 02:56:05
问题 I need some help regarding interprocess communication. I have an Application A and Application B. Application B purpose is to update Application A. As Application A can't update himself, there must be some dll's need to be updated that is why Applicaiton B is used. Appication A launches App B and App B closes App A and start updating A. The updater process is two step 1) Copies the msi bits 2) Install the bits If the user cancels Application B in first step while App A is waiting, is there

How to revoke SEM_UNDO of latest operation on semaphore?

孤街醉人 提交于 2020-01-06 08:36:32
问题 My problem: A,B - semaphores. Process is loop: waits for A >= 1, decrements A does some computation increments B. back to 1. Goal: After process terminates i need decrements of A be equal to increments of B. So i figure out i will add flag SEM_UNDO in 1. but it undos every DEcrement ever made to A by that process. How to revoke / undo SEM_UNDO from 1. when process reaches 4.? 回答1: ok, i was enlightened when thinking about problem as "undoing" SEM_UNDO rather then "revoking" it. after calling

MPI convention for index of rows and columns

一曲冷凌霜 提交于 2020-01-06 07:14:00
问题 I am using MPI for solving PDE. For this, I breakdown the 2D domain into different cells (size of each of these cells is " xcell,ycell " with xcell = size_x_domain/(number of X subdomains) and ycell = size_y_domain/(number of Y subdomains) . So, I am running the code with number of processes = (number of X subdomains)*(number of Y subdomains) The gain relatively to sequential version is that I communicate between each process representing the sub-domains. Here a figure illustrating my

How can a process authenticate and communicate securely with another process on the same host

喜欢而已 提交于 2020-01-06 06:43:45
问题 I was trying to do this with Java RMI over SSL, but later I discovered that SSL certificates will provide host level authentication and NOT process level authentication. Also, I was storing the keystore's password in configuration; so the certificates can be used by another attacker process and it can get authenticate. 回答1: An X.509 certificate used for SSL/TLS could potentially be used to identify something else than a host name (this is already typically done for client certificates). There

basics to create a MML console in Python

坚强是说给别人听的谎言 提交于 2020-01-06 05:33:08
问题 I am looking to have a MML (man machine language) console written in Python as the only entry point to control and monitor a back-end process. Basically will be able to: attach to an existing back-end process if back-end process is not running, still open console and be able to spawn back-end process (by introducing the correct command) auto-complete permitted commands be able to change back-end process behavior based on the introduced commands What would be the best way to achieve this? How

Interprocess communication with SPSC queue in python

天涯浪子 提交于 2020-01-06 05:22:09
问题 I have multiple write-heavy Python applications ( producer1.py , producer2.py , ...) and I'd like to implement an asynchronous, non-blocking writer ( consumer.py ) as a separate process, so that the producers are not blocked by disk access or contention. To make this more easily optimizable, assume I just need to expose a logging call that passes a fixed length string from a producer to the writer, and the written file does not need to be sorted by call time. And the target platform can be