[Lazarus] File sync system approach

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu Jul 9 12:44:14 CEST 2015


aradeonas wrote:
> Thanks.
> 
> I think database is a better way.
> Did you know about libraries and  better ways for sending and receiving
> files,both kind,binary and text?

I can't really speak for the non-text situation, and there's a risk that 
any solution would start giving problems in cases where the number or 
size of binary files exceeded some arbitrary threshold.

In the case of text, I've typically used TDBMemo or similar for the 
transfer, although a better solution would be to have a DB-aware 
TStrings descendant (I don't know whether this exists and is 
accessible). In the case of at least PostgreSQL and Firebird you can 
also get at a notification mechanism that allows a program instance to 
advise others that it's changed something, but doing this requires 
fiddling with handles directly and might not be portable across 
Lazarus/FPC versions.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list