5

I need to introduce IPC in my applications, I also need to continue to distribute on GNU/Linux and Windows (currently I'm using mono on GNU/Linux and .NET on Windows with GTK+ support on both). Communication is limited on the same box.

Which is the best way to do IPC on both systems?

I read that DBUS is available also on Windows with the mainstream source code. Anyone has exprerience in using it, on windows I mean?

Thanks in advance to all of you.

3 Answers3

3

My experience with DBus (on Linux) was horrible.

I ended up replacing it with a custom-format tcp socket (but the data was quite limited, so developing a custom format didn't take long at all).

Rolf Bjarne Kvinge
  • 19,253
  • 2
  • 42
  • 86
3

I would simply use Remoting.

Just because the other options suck:

  • WCF is very limited in Mono

  • DBus has its problems as Rolf says; not to mention the C# story with it is a bit clunky, i.e.: the best solution is using managed Dbus, which you can with NDesk.Dbus, but this library got renamed to dbus-sharp; but the Gnome world are moving to use GDbus, and there's no binding for it yet.

  • Socket, as proposed by Rolf, is too low level for my taste.

knocte
  • 16,941
  • 11
  • 79
  • 125
  • .NET Remoting is now a legacy technology and is not recommended for new development. See https://msdn.microsoft.com/en-us/library/72x4h507(v=vs.100).aspx – j123b567 Jun 04 '18 at 10:34
  • @j123b567 in that article, Remoting is considered legacy for distributed applications, but this S.O. question is about only the IPC use case – knocte Jun 04 '18 at 11:40
  • .NET Remoting is legacy as API so no exceptions for some purposes like IPC. The real question is, if it will be deprecated and removed from .NET or not. But it is completely different question https://stackoverflow.com/questions/1294494/is-net-remoting-really-deprecated – j123b567 Oct 02 '19 at 14:38
  • yeah maybe these days the best solution is gRPC – knocte Oct 02 '19 at 15:53
  • 1
    Remoting is not available in .Net Core – Denis Nutiu Nov 08 '19 at 23:23
1

Mono has moderately good WCF support which works well for platform agnostic IPC.

PhonicUK
  • 13,486
  • 4
  • 43
  • 62
  • downvoting because WCF support is very limited in Mono: http://www.mono-project.com/Compatibility – knocte Nov 01 '12 at 08:26