Questions tagged [ipc]

IPC stands for Inter-process Communication and represents a set of methods for exchanging data and messages between threads and processes.

In computing, Inter-process communication (IPC) is a set of methods for the exchange of data among multiple threads in one or more processes. Processes may be running on one or more computers connected by a network. IPC methods are divided into methods for:

  • message passing
  • synchronization
  • shared memory, and
  • remote procedure calls (RPC).

The method of IPC used may vary based on the bandwidth and latency of communication between the threads, and the type of data being communicated.

There are several reasons for providing an environment that allows process cooperation:

  • Information sharing
  • Speedup
  • Modularity
  • Convenience
  • Privilege separation

IPC may also be referred to as inter-thread communication and inter-application communication.

The combination of IPC with the address space concept is the foundation for address space independence/isolation.

4538 questions
79
votes
5 answers

Are message queues obsolete in linux?

I've been playing with message queues (System V, but POSIX should be ok too) in Linux recently and they seem perfect for my application, but after reading The Art of Unix Programming I'm not sure if they are really a good…
Purple Tentacle
  • 1,606
  • 1
  • 17
  • 19
78
votes
16 answers

Cross platform IPC

I'm looking for suggestions on possible IPC mechanisms that are: Cross platform (Win32 and Linux at least) Simple to implement in C++ as well as the most common scripting languages (perl, ruby, python, etc). Finally, simple to use from a…
Thomi
  • 11,647
  • 13
  • 72
  • 110
76
votes
7 answers

What are the IPC mechanisms available in the Android OS?

Will any one please tell me what are all the IPC mechanisms that are present in Android. To my knowledge are: Intents Binders
Suman
  • 4,221
  • 7
  • 44
  • 64
67
votes
7 answers

Is there a difference between RPC and IPC?

Or are they synonyms?
Dimitri C.
  • 21,861
  • 21
  • 85
  • 101
64
votes
3 answers

How to implement inter-process communication in Go?

I’m writing a load balanced server system in Go. The load balancing server will communicate with several application servers and process requests. These servers can both, be running on the same machine or on the network. I already figured the…
thwd
  • 23,956
  • 8
  • 74
  • 108
60
votes
1 answer

Does OS X have an equivalent to /dev/shm?

Does OS X (Snow Leopard in particular) have an equivalent to (some versions of) Linux's /dev/shm , ie something where you can write to and read from a file without necessarily touching the hard drive?
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
55
votes
6 answers

IPC Mechanisms in C# - Usage and Best Practices

I have used IPC in Win32 code a while ago - critical sections, events, and semaphores. How is the scene in the .NET environment? Are there any tutorial explaining all available options and when to use and why?
prakash
  • 58,901
  • 25
  • 93
  • 115
53
votes
6 answers

Interprocess communication for Windows in C# (.NET 2.0)

I've never had to do IPC on Windows before. I'm developing a pair of programs, a standard GUI/CLI app, and a windows service. The app has to tell the service what to do. So, assuming the communication is local only, what would be the best…
Vinko Vrsalovic
  • 330,807
  • 53
  • 334
  • 373
53
votes
12 answers

Communication between two separate Java desktop applications

I'm looking to develop two separate (but related) Java desktop applications. I want the ability for one application to trigger the other, passing in data that can then be edited and passed back, i.e. the communication will be two way. If the other…
William
  • 13,332
  • 13
  • 60
  • 73
49
votes
4 answers

How do I use mqueue in a c program on a Linux based system?

How do I use mqueue (message queue) in a c program on a Linux based system? I'm looking for some good code examples that can show how this is done in a correct and proper way, maybe a howto.
Johan
  • 20,067
  • 28
  • 92
  • 110
47
votes
5 answers

Best way for interprocess communication in C++

I have two processes one will query other for data.There will be huge amount of queries in a limited time (10000 per second) and data (>100 mb) will be transferred per second.Type of data will be an integral type(double,int) My question is in which…
Qubeuc
  • 982
  • 1
  • 11
  • 22
46
votes
1 answer

When to use Pipes vs When to use Shared Memory

I am reading about various IPC mechanism. I am trying to figure out the scenarios, where we use Shared Memory and where we use named Pipes(FIFO). Pipes: Multiple process can Write, however only one process can read. Write operation is atomic. Shared…
vamsi
  • 1,727
  • 3
  • 22
  • 25
46
votes
7 answers

Fastest technique to pass messages between processes on Linux?

What is the fastest technology to send messages between C++ application processes, on Linux? I am vaguely aware that the following techniques are on the table: TCP UDP Sockets Pipes Named pipes Memory-mapped files are there any more ways and what…
user997112
  • 29,025
  • 43
  • 182
  • 361
45
votes
7 answers

Simple IPC between C++ and Python (cross platform)

I have a C++ process running in the background that will be generating 'events' infrequently that a Python process running on the same box will need to pick up. The code on the C side needs to be as lightweight as possible. The Python side is…
Lee Treveil
  • 6,655
  • 4
  • 30
  • 29
41
votes
8 answers

How to communicate with a windows service?

I want to create a windows service that validates data and access it from another windows application, but I'm new to services and I'm not sure how to start. So, while the service is running, a windows application should somehow connect to the…
Alexandru Pupsa
  • 1,798
  • 4
  • 21
  • 40