[Lazarus] File sync system approach
Antonio Fortuny
aforsprl at gmail.com
Thu Jul 30 10:54:03 CEST 2015
On 29.07.2015 12:37 carra, Aradeonas wrote:
> Ok.Now I want to work on file sync part and for that I need to choose a
> library.Indy,Synapse or ... .
> What you guys prefer in this case?Synapse is easy to use and I like it
> but Indy seems larger and more powerful but I didn't work with it.
> For this case that I need to send and receive files in threads with
> multi connections it seems I need TCP and there are demos but I want the
> project stable and no need to rewrite it and maybe there will be need to
> some p2p connections so I probably I will need to write many things
> myself and this is not a problem but I want to ask you what library is
> better in your experience and is there any demos for them in these case
> or not?
>
>
> Regards,
> Ara
>
>
Hi Ara.
I'm working with Indy since a long time (Delphi). I've already done such
a sync between systems and Lazarus using a multi-threaded approach and
mixing platforms like Linux x86, Linux x86_64, Win32, Win64 and WinCE.
Indy works on all those platforms, at least, the basic components (WinCE
is the smallest one and everything is not implemented).
Anyway all this works in Indy way, using synchronous sockets and
threads. It uses blocks as well as streams. Because server sockets work
in a separated thread per connection, work is easy (just think
processinf a sequential file). I agree on that synapse looks easier and
it is easier actually. But because I'm used to Indy since years I always
use it when TCP/IP connections are needed (ICMP too) just because I can
control every step and I can set and control lots of timeouts.
Unfortunately I cannot show any sample because all library is owned by
my previous employer. But it works very well.
Antonio.
More information about the Lazarus
mailing list