❔ Best duplex communication protocol
Hi! What do you guys think that will be the best way to have communication between 2 apps (one in .net c# and one in other language, so technology cannot be only for .net). It's needed to be possible in two directions and easy to send files and some other text data.
16 Replies
And these apps will be working on the same device
I was considering using basic tcp but Idk if for local usage I need to write some kind of message frameing
Two apps on the same machine?
Yes
There are a bunch of different interprocess communication (IPC) technologies available - named pipes, sockets, stdio, memory-mapped files.
VSCode uses JSON-RPC to talk to the language servers and that works quite well.
I'm not sure any one of them is "the best", it depends on your needs.
If there is a possibility you might need to go over the network in the future, something like gRPC might also be an option.
"The best" is some king of clickbait, I am just looking for good full duplex protocol
I wanted to use watsontcp but second app is not written in c# so it's not a good option
Is this on Windows?
The worst part is that the second app is written in delphi so I need protocol that is working quiet good for it too (and it's free)
Yes, I know I can use com object
Named pipes is usually the simplest thing to use on Windows although I don't know anything about using Windows named pipes from Delphi.
Or connecting stdio between the two processes
i have done this in the past, but to me it wasn't the easiest thing to tame in c#
The last time I did IPC between two processes I ended up trying to use gRPC but it was for a demo that exhausted the thread pool on purpose and you can't make gRPC calls without a thread pool thread in .NET.
So ended up using memory mapped files.
I'm late to the party, but I'm a big fan of gRPC
especially for cross-language communication
What do you think guys about CoAP?
It's more for iot
never actually heard of that
It's new technology from 2010
It works a little bit like rest api with udp and push notifications
i remember having to deal with a device which was kinda like this
it used http 0.9 or something, it was excessively simple
at first i thought wtf is happening this is not standard
then searching i found out what it was
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.