I
I
Interface2015-09-21 21:41:55
Programming
Interface, 2015-09-21 21:41:55

How to organize data exchange between applications?

Good day!
I’ll make a reservation right away - they weren’t banned in Google, I just would like to get advice backed up by personal experience
Perhaps a banal problem, of course, but still ...
There are, let’s say, 2 programs (2 processes). How to organize data exchange between them within the same machine (you can not be limited)?
I am writing without specifics because I would like to get the most universal solution. That is, for example, there is a program written in Delphi; there is, say, a server on Node.js; Is there any other softina - how can you organize data exchange between this heterogeneous zoo?
When I asked this question for the last time, I settled on sockets. On the one hand, this is my understanding:

  • Easy (in theory) transition from connecting 2 processes within 1 machine to connecting via a network
  • Cross-platform
  • Broad support for this technology

And in general, sockets seem to be quite suitable here, but I'm worried about:
  • Won't sockets turn out to be a performance bottleneck?
  • To what extent is this a "crutch" solution for interprocessor communication?
  • What are the alternatives?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
Dmitry Kovalsky, 2015-09-21
@dmitryKovalskiy

The decision in a forehead - to create a shared resource for all applications. For example xml or a small SqlLite database. And let both applications read from there. Or do you want exactly mutual "kicks" that make you do something?

S
sitev_ru, 2015-09-21
@sitev_ru

I'm all for sockets!

X
xmoonlight, 2015-09-21
@xmoonlight

No... Head-on solution is IPC! )
https://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D0%B6%D...

M
Maxim Kuznetsov, 2015-09-22
@max-kuznetsov

1. Do not create a zoo. No way.
2. Don't try to find a universal solution for everything. Such a decision is always redundant, clumsy, unaccompanied, and, most importantly, no one understands. Start from specific requirements and apply architectural patterns.
3. There are many generally accepted technologies for exchanging data between computers or between processes on the same computer. It is possible to implement network interaction at a low level. You can use ready-made solutions (SOAP, for example). You can use intermediaries (sometimes this is the only way to get rid of the influence of the zoo created by other people). Moreover, intermediaries are also different. Again, see specific requirements and patterns.

L
leventov, 2015-09-22
@leventov

As for the "most universal" solution - read this: tammersaleh.com/posts/the-number-one-trait-of-a-gr...
Depends on the type of interaction. If it's messaging, that's one thing. Take sockets or queues. If the transfer of data of the same type from process to process - the same queue. If this is some more complex shared state, for example, a dynamic set of online users with some associated data (if we are talking about servers), then take a full-fledged in-memory database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question