Author Topic: LNET versus INDY versus Synapse  (Read 57183 times)

BeniBela

  • Hero Member
  • *****
  • Posts: 959
    • homepage
Re: LNET versus INDY versus Synapse
« Reply #15 on: September 22, 2010, 02:29:16 pm »
Synapse's client code works like charm with multi-threaded code on both Windows and Linux.
How do you use it?
On linux it very often fails (returning an empty stringlist) for me, even if I just call HttpGetText in multiple-threads.
[edit:]I just tracked it down a little bit, and it seems what fails is the dns query.  Does it also works with a router for you ?
« Last Edit: September 22, 2010, 02:44:16 pm by BeniBela »

jl

  • Full Member
  • ***
  • Posts: 178
Re: LNET versus INDY versus Synapse
« Reply #16 on: September 22, 2010, 06:56:00 pm »
I use Synapse for threaded serial communication on Linux and Windows without problems.

lNet and Synapse are great components. I think it's hard to choose one. The main difference I can see is:
   lNet: higher level, event driven.
   Synapse: lower level (you can deal with the nuts and bolts).

I don't know if someone have done serious tests to compare those components.

Thanks, do you mean Synaser?

I am getting the following errors when I try to install my threaded Indy app with heaptrace on.  I'm using indy 10.2.0.3, FPC 2.2.4, Lazarus 0.9.28.2, Lazdaemon.

Any thoughts?  :)

Heap dump by heaptrc unit
343 memory blocks allocated : 19803/20888
340 memory blocks freed     : 19735/20808
3 unfreed memory blocks : 68
True heap size : 262144 (160 used in System startup)
True free heap : 261712
Should be : 261736
Call trace for block $0006D950 size 28
  $00408512
  $004673AD  TIDTHREADSAFE__CREATE,  line 217 of d:/
oy/SMSDispatcher/LANProwler/indy-10.2.0.3/fpc/IdThreadSafe.pas
  $0045B22F  IDTHREAD_init,  line 601 of d:/loy/SMSD
spatcher/LANProwler/indy-10.2.0.3/fpc/IdThread.pas
  $00409FE4
  $0040DF70
  $00409FE4
  $0040DF70
Call trace for block $0007ECF8 size 12
  $00408512
  $0045B22F  IDTHREAD_init,  line 601 of d:/loy/SMSD
spatcher/LANProwler/indy-10.2.0.3/fpc/IdThread.pas
  $00409FE4
  $0040DF70
Call trace for block $0006D9B0 size 28
  $00408512
  $00441E6C  IDSTACK_init,  line 870 of d:/loy/SMSDi
patcher/LANProwler/indy-10.2.0.3/fpc/IdStack.pas
  $00409FE4
  $0040DF70
  $004353D8  LCLPROC_init,  line 4466 of lclproc.pas
  $00409FE4
  $0040DF70

jl

  • Full Member
  • ***
  • Posts: 178
Re: LNET versus INDY versus Synapse
« Reply #17 on: September 23, 2010, 03:23:20 am »
Remy Lebeau replied to me on the Indy newsgroup.

Quote
> I am getting the following errors when I try to install my threaded
> Indy app with heaptrace on.

Those are the standard (ie, intentional) Indy memory leaks.  Look at the
comments in the finalization sections of IdThread.pas and IdStack.pas.  In
Delphi versions that use FastMM for the memory manager, those leaks are
registered with FastMM so they are not reported in leak reports.  I don't
know if FPC has a similar option available. You can enable the FREE_ON_FINAL
directive in IdCompilerDefines.inc to remove the leaks, though.

> I'm using indy 10.2.0.3

That is a VERY old version.  The current version is 10.5.8.

> FPC 2.2.4, Lazarus 0.9.28.2, Lazdaemon.

There is some debate amongst the Indy team right now whether the current
version works correctly in Lazarus.  Would you be able to test that for us?

--
Remy Lebeau (TeamB)

bobo

  • Full Member
  • ***
  • Posts: 171
Re: LNET versus INDY versus Synapse
« Reply #18 on: September 30, 2010, 01:10:55 am »
Funny that they ask You to test if the current version is working :) when they are the developers.

I am sure people would be willing to test it though if they could. I've checked out their SVN source code (about 260MB). From some website notes they had, the latest 10.5.8 is under the Tiburon branch there (not trunk), which does have some Makefile.fpc files in some sub-directories (with still containing a version number 10.2.0.1).
Under /Lib/FCL/IdVers.inc it says 10.5.6 ...

However, zero readme-s or instruction on how to compile with FPC.
Under /Lib/fpcnotes/ there is a README file saying to go to directory "fpc" and do a make. The only problem is, that there is no such directory (If memory servers, there was, in a special made indy version 10.2.0.3 made back in 2007 that can still be used with current FPC/Lazarus). Looks like this directory was just copied over from that one.

So... it would be very hard to test whether it works if we can not even try to compile it...
Some more help is needed from them.

jixian.yang

  • Full Member
  • ***
  • Posts: 173
Re: LNET versus INDY versus Synapse
« Reply #19 on: October 20, 2010, 01:22:55 am »
Synapse https server demo works fine now when the SVN version of Synapse has been updated.

The Synapse https seems stable on Linux now.


marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12984
  • FPC developer.
Re: LNET versus INDY versus Synapse
« Reply #20 on: October 20, 2010, 07:31:18 am »
I always use Indy. The "heavy" label it gets strapped to it is IMHO more emotional than technical, and not worth keeping knowledge about multiple such sets around.

So I pick the most feature complete.

jixian.yang

  • Full Member
  • ***
  • Posts: 173
Re: LNET versus INDY versus Synapse
« Reply #21 on: October 26, 2010, 12:47:56 pm »
In Synapse fixed version, it uses BaseUnix instead of Libc in ssl_openssl_lib.
« Last Edit: October 26, 2010, 12:57:57 pm by jixian.yang »

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
Re: LNET versus INDY versus Synapse
« Reply #22 on: January 26, 2011, 10:49:59 am »
Which version do you currently use?
Is it still the 10.2.0.3 version?
I always use Indy. The "heavy" label it gets strapped to it is IMHO more emotional than technical, and not worth keeping knowledge about multiple such sets around.

So I pick the most feature complete.
Lazarus 3.0/FPC 3.2.2

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12984
  • FPC developer.
Re: LNET versus INDY versus Synapse
« Reply #23 on: January 26, 2011, 10:56:13 am »
Which version do you currently use?
Is it still the 10.2.0.3 version?
I always use Indy. The "heavy" label it gets strapped to it is IMHO more emotional than technical, and not worth keeping knowledge about multiple such sets around.

So I pick the most feature complete.

Afaik the old version works with designtime, and the new version only works (with some minimal fixes) runtime. But I mostly used it runtime. I haven't touched that project in half an year though.

There is btw nothing wrong with Synapse, except the FUD about Indy spread by some of its followers.

I have also used (and ported) ICS in the past, but it is fundamentally Windows specific. If you really need to exploit all possibilties from the windows stack, it can be an option though.

I never used lnet. A few experiments failed, and there are too little components. Moreover it was *nix only most of the time, and I also need WIndows support.

vfclists

  • Hero Member
  • *****
  • Posts: 1165
    • HowTos Considered Harmful?
Re: LNET versus INDY versus Synapse
« Reply #24 on: January 26, 2011, 11:08:46 am »
Which version do you currently use?
Is it still the 10.2.0.3 version?
I always use Indy. The "heavy" label it gets strapped to it is IMHO more emotional than technical, and not worth keeping knowledge about multiple such sets around.

So I pick the most feature complete.



Is it the current 10.5.x series you are using? Do you compile it right out of subversion?

Quote
Afaik the old version works with designtime, and the new version only works (with some minimal fixes) runtime. But I mostly used it runtime. I haven't touched that project in half an year though.
Lazarus 3.0/FPC 3.2.2

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12984
  • FPC developer.
Re: LNET versus INDY versus Synapse
« Reply #25 on: January 26, 2011, 11:20:53 am »

Is it the current 10.5.x series you are using? Do you compile it right out of subversion?


IIRC the last time I tried was in June. That was just before the Tiberon branch was merged back to trunk. (one should afaik use trunk again now, tiberon branch is afiak no longer updated). I tried to get the designtime bits running, but never succeeded, and decided to wait for a fully 2.4.x based release of lazarus first.

Afaik sb from the pgg (the ones that publish Blaise magazine) want to try too somewhere in fall, but I haven't heard from them again.


Dibo

  • Hero Member
  • *****
  • Posts: 1061
Re: LNET versus INDY versus Synapse
« Reply #26 on: January 28, 2011, 02:10:00 pm »
About lNet. It doesn't work in DLL.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12984
  • FPC developer.
Re: LNET versus INDY versus Synapse
« Reply #27 on: January 28, 2011, 05:04:59 pm »
About lNet. It doesn't work in DLL.

In general, you need to know what you are doing inside DLL. It is not a LNet specific problem.

Dibo

  • Hero Member
  • *****
  • Posts: 1061
Re: LNET versus INDY versus Synapse
« Reply #28 on: January 28, 2011, 07:08:14 pm »
What do you mean?
I posted bug today with this issue:
http://bugs.freepascal.org/view.php?id=18625
Maybe unnecessarily? I just put TLHTTPClient on form and to this same things like in normal GUI application. What more can I do? For example, synapse works fine in DLL.

Regards

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12984
  • FPC developer.
Re: LNET versus INDY versus Synapse
« Reply #29 on: January 28, 2011, 07:19:20 pm »
What do you mean?
I posted bug today with this issue:
http://bugs.freepascal.org/view.php?id=18625
Maybe unnecessarily? I just put TLHTTPClient on form and to this same things like in normal GUI application.

Currently, DLLs generated with FPC have a static RTL (and all other libs) integrated. That's the "know what you are doing" is coming in, you need to maintain two states of components and libraries (since you have two rtls, two lcls, two eventloops etc)

Quote
What more can I do? For example, synapse works fine in DLL.

Pure luck as far as I know.

 

TinyPortal © 2005-2018