C
C#10mo ago
Pandetthe

❔ 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
Pandetthe
Pandetthe10mo ago
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
mtreit
mtreit10mo ago
Two apps on the same machine?
Pandetthe
Pandetthe10mo ago
Yes
mtreit
mtreit10mo ago
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.
Pandetthe
Pandetthe10mo ago
"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
mtreit
mtreit10mo ago
Is this on Windows?
Pandetthe
Pandetthe10mo ago
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
mtreit
mtreit10mo ago
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
boiled goose
boiled goose10mo ago
i have done this in the past, but to me it wasn't the easiest thing to tame in c#
mtreit
mtreit10mo ago
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.
JakenVeina
JakenVeina10mo ago
I'm late to the party, but I'm a big fan of gRPC especially for cross-language communication
Pandetthe
Pandetthe10mo ago
What do you think guys about CoAP? It's more for iot
JakenVeina
JakenVeina10mo ago
never actually heard of that
Pandetthe
Pandetthe10mo ago
It's new technology from 2010 It works a little bit like rest api with udp and push notifications
boiled goose
boiled goose10mo ago
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
Accord
Accord10mo ago
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.
Want results from more Discord servers?
Add your server
More Posts