Does anyone know of a fast bus for local messages between applications on the same machine?

I am looking for a pub / sub mechanism that can be used by .NET applications running on the same computer (see various application domains and processes). I would prefer not to run a separate service or anything that requires too much configuration. Obviously, I would also like to save the load on the memory and the processor.

In particular, I want to send large volumes of small messages to subscribers on the same host. Therefore, I need a bus (for example, MSMQ or NServiceBus), but I do not want the overhead of full network support (it only needs local named pipes) or the cost and complexity of the corporate bus.

+4
source share
5 answers

Named pipes are the fastest way to interact with a local process.

Reference:
NamedPipeServerStream
NamedPipeClientStream
Choosing a transport

Important Note:
Don't get stuck

+3
source

If you just want to send a signal from one process to another to do some of the work, mutex might be the easiest solution.

+1
source
 Mailslots Memory Mapped files Named Pipes LPC 

Everything on Windows

0
source

I would assume that configured correctly, MSMQ + NServiceBus will be able to achieve the desired throughput on one machine. There is an [Express] attribute that will cause your messages to not be written to disk. If the performance is adequate, it’s far better for you to use a high-level infrastructure than moving your own.

0
source

This is not my final decision, but one of the solutions that appeared is 0MQ , which offers a reliable pub / and has relatively low configuration and infrastructure requirements. The disadvantage is that it is relatively low level (.NET API is a wrapper around its own C code), so I will need to implement all serialization, etc.

I will send a message when I have time to experiment and come to a conclusion.

0
source

Source: https://habr.com/ru/post/1383628/


All Articles