[fpc-devel] Inconsistent use of Timeout in SimpleIPC

Ondrej Pokorny lazarus at kluug.net
Tue Dec 8 08:55:13 CET 2015


On 07.12.2015 20:56, Michael Van Canneyt wrote:
>> Interesting point! From this point-of-view I don't have to create the 
>> connection layer between SimpleIPC and AdvancedIPC as me&you 
>> suggested here: 
>> http://lists.freepascal.org/pipermail/fpc-devel/2015-September/035958.html 
>>
>> It makes sense.
>
> Well, my initial enthousiasm cooled somewhat when I understood that 
> you are using a file-based approach.
>
> if the current simpleipc implementation can be fixed, then I think 
> that is to be preferred above re-implementing it on top of 
> advancedipc, because I am not very comfortable with the files approach.

+1.


> The only thing that remains to be fixed in simpleipc is the multiple 
> clients to server on unix. It needs a semaphore to be able to function 
> correctly.

There is also the issue that you can start multiple servers with the 
same ID on Windows, IIRC.


> The file-based approach is still a valid approach, since it offers 
> other things:
> - the possibility of sending a message  to a non-running server and - 
> receiving a response.
> But for simple one-way traffic, I think simpleipc is to be preferred...

Yes, if the limitations of SimpleIPC aren't a problem.

Btw. I started AdvancedIPC because of the IDEInstances feature in 
Lazarus 1.6. I decided to use the file-based approach because I thought 
this is the simplest and most stable approach - I basically took a look 
at SimpleIPC and made a choice from its approaches. Nevertheless 
SimpleIPC uses files on Linux as well.
Unfortunately with file-based approach the IPC Server has to check new 
files (messages) regularly and thus could restrict power management, as 
Mattias pointed out. Some kind of socket communication would be probably 
better in this respect and probably also easier to fine-tune :(

Ondrej



More information about the fpc-devel mailing list