15

Can any one tell me which is more stable? I know each has their own advantages and disadvantages. But which one is better for http, etc?

In my previous application I used indy9 but I wasn't satisfied with it, as I would sometimes get strange errors.

Can anyone recommend one?

TZHX
  • 5,291
  • 15
  • 47
  • 56
radick
  • 401
  • 2
  • 6
  • 12

9 Answers9

16

I use Indy in a lot of projects. I used both 9 and 10 mainly as HTTP server and proxy. The projects get very intense traffic at times (HTTP). Indy never did let me down. It works very stable.

But I also had some "strange" situations where I had to dig deep to find the underlying problem. I also do not like the way Indy tends to handle a lot of things through exceptions. In general I like the ICS coding style more. But let me go to ICS.

ICS uses non-blocking sockets, while indy uses blocking. While non-blocking is ok and seems to be better at first sight, I found it irritating in a lot of situations. The problem is that the natural flow of the code gets lost because of the callback functions. This makes it harder to write procedural type of libraries. Furthermore I do not like how everything is handled through messages. For me it gets messy real quick when mixed with multithreading. And multithreading is mainstream these days.

So while I like the coding style and quality of the code in ICS, I prefer the simplicity of use and blocking mode of Indy. What you like more is up to you, but both libraries are mature and stable.

These are my two cents.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
Runner
  • 6,073
  • 26
  • 38
  • While I also favour Indy, I think ICS' exampels are superior. Specially Indy10 – Marco van de Voort Apr 18 '10 at 21:00
  • Totally agree. Indy10 is very poor on examples. – Runner Mar 23 '11 at 12:08
  • @Runner Just look at SO there are more Indy problem releated questions than there are ICS. You be the judge whats more stable. – Santos Oliveira Dec 20 '12 at 10:45
  • They are both stable. If you read my answer you will see that I like the ICS code quality a lot better then Indy. But ICS fails in the code friendly and user friendly department. Also it is a lot harder to use in multithreaded enviroment – Runner Dec 21 '12 at 07:47
7

I also use both Indy and ICS.

Most of the time I prefer Indy because implementing sequential type of protocols with it is very easy (the request runs in it's own thread so you simply Read/Write to the connection, really easy). Using Indy requires solid knowledge of threading and synchronization. Unlike Runner I like how Indy uses Exceptions to handle "exceptional" stuff because it allows me to concentrate on the normal flow of the protocol (I use try-finally blocks to make sure I deallocate resources).

I also used ICS in a application where Indy simply failed: I used it for an application that implements an TCP/IP proxy. Using ICS was simpler because of it's non-blocking nature. I was able to "proxy" TCP/IP protocols that I know nothing about, so I have no idea how bytes would flow from one end to the other. Indy failed in that scenario because in Indy you're ether reading or you're writing, you can't do both at the same time. Using ICS to implement an sequential-type protocol is a bit of pain: you essentially need to use state-machine logic, brake the protocol in small bits, keep flags laying around so you know where you are in the protocol. An big plus: François Piette, the author of ICS, is active and very helpful on a number of forums and mailing list, and is very prompt to help with anything related to ICS.

For me, if I need to do something with TCP/IP, the decision path is very simple: Can it be done with Indy? Then it's Indy. If it can't be done with Indy then it'll be done with ICS!

Cosmin Prund
  • 25,498
  • 2
  • 60
  • 104
6

I've used Indy 9 and 10 for TCP, HTTP and FTP with very few problems. ICS is a good choice, too. It's non blocking, which will change how you use it.

I haven't used it, but I've heard good things about Synapse, which is also blocking.

Bruce McGee
  • 15,076
  • 6
  • 55
  • 70
5

We test Indy10 IdTCPClient to receive video stream from remote server, it's OK. But when it's receiveing stream, the same time use it send some data to the server, after some minute, the received stream data began lost data bytes. We use sniffer tool to trace this problem, confirmed that IdTCPClient lost some bytes in receiveing stream.

So, we test Indy9.018, the same problem happend but a few times VS. Indy 10.

pcplayer
  • 51
  • 1
  • 1
4

Remember that Indy is always in beta stage. Sometimes you need to work with night builds.

Gabriel
  • 20,797
  • 27
  • 159
  • 293
2

I'd say the answer depends on what you want to do with the internet. Indy is fine if you are prepared to get involved with understanding how it works, and is very capable. ICS is a different take on things, and I've used it effectively for many-connection systems. But for day to day "grab a file or send an email" type stuff, where you want to do a basic task, I pretty much always use Clever Components Internet Suite as you just create the component, set the options, and it works. The suite is quite comprehensive, and gets useful updates.

mj2008
  • 6,647
  • 2
  • 38
  • 56
2

Which one is better really depends on specific use case, but I was unhappy with indy as an http client and ICS ended up being exactly what I needed it to be, with a lot less random quirks.

Note though that it is non blocking, so it's not just a drop in replacement.

Lepidosteus
  • 11,779
  • 4
  • 39
  • 51
2

I use Indy 9 for stable, released, production code to over 1 million users, and have never received any strange errors.

Marcus Adams
  • 53,009
  • 9
  • 91
  • 143
0

I know it's an old post, but if someone in 2023+ finds it:

  1. Indy has no official stable updates any more. Only beta.

  2. ICS has TLS 1.3 (https) support and easy-to-find compatible SSL DLL files packed into the component zip. Also can be used for specific use cases, like:

    • JOSE signing,
    • certificate-expire check,
    • cert gen and convert, etc.

We had to drop Indy10 for the latest government project which had specific certificate requirements. ICS is working rock stable.

SzakiLaci
  • 347
  • 1
  • 16