[Lazarus] IPC: TSimpleIPC, ZeroMQ, nanomsg...

Marcos Douglas B. Santos md at delfire.net
Fri Oct 20 18:12:06 CEST 2017


On Thu, Oct 19, 2017 at 4:44 PM, Denis Kozlov <dezlov at gmail.com> wrote:
> I would also suggest IPC through TCP/IP.
>
> I have deployed several tools with such IPC implementation which operate
> across multiple platforms and are rock solid. All you need is a good
> networking library that works in both FPC and Delphi, such as Synapse (make
> sure to use the latest trunk version). Both Java and C# have extensive
> TCP/IP components so you will have no problem there.
>
> Also FPC wiki has a list of some networking libraries:
> http://wiki.lazarus.freepascal.org/Networking_libraries

Well, we use that way today but some times the performance is not good.
So, I am thinking to use our own API but using a new tool for
communication between applications. If everything is local, we may
improve the performance.

But do you also recommend to use TCP even in local (same machine) applications?
How do you know which ports were used for each application?
I believe you need to use a local database (SQLite) to register all
URLs for each Exe when they started. You might not use hardcode ports
because others application could be using first.


On Fri, Oct 20, 2017 at 12:24 PM, Denis Kozlov <dezlov at gmail.com> wrote:
>
>> But do you also recommend to use TCP even in local (same machine)
>> applications?
>
> Yes, but whether it would be the best method to use will depend heavily on
> your use case.
>
>> How do you know which ports were used for each application?
>
> That, again, depends on your use case.
>
> For example, if your application needs to create multiple child processes
> and control them, then the first instance creates a listening server on some
> predetermined port and each child process will connect to the same
> predetermined port to talk to the master/server.

But, as I told you, we shouldn't predetermined ports because others
processes, which do not belongs us, could use the same ports.
I believe, these ports should be dynamic and the main application
needs a way to know these informations.

> By the way, you have moved this conversation away from the mailing list. Was
> that intentional?

Not intentional, sorry. I just clicked on reply...
So, I am sending to Lazarus now all private emails.

Best regards
Marcos Douglas


More information about the Lazarus mailing list