If you want maximum performance, you will have to use sockets in non-blocking mode or using completion ports . IPWorks is implemented in the same way as iocp . As far as I can tell, Indy or Synapse do not implement them (at least officially).
We used completion ports and thread pool in our open SynCrtSock , used in our SQLite3 structure syntax .
Here are some guidelines for this solution, working from Delphi 6 to Delphi XE. I'm not saying that this is the “best component”, but it works and is fast-acting (each request is about 4 KB of JSON data):
- The HTTP client is saved (i.e., the HTTP / 1.1 client connection is saved during the request process): first, at 7.87 ms, executed at 153.37 ms, i.e. 6520 / s, average 153%
- Http client multimedia connection (that is, one new HTTP / 1.0 client connection created for each request - this uses completion ports and thread pool): first at 151us, executed in 305.98 ms, i.e. 3268 / s, average 305us
For speed comparison, here are other communication protocols in our system:
- Access to named pipes: first at 78.67 ms, executed at 187.15 ms, i.e. 5343 / s, on average 187%
- Local window messages: the first in 148us, executed in 112.90 ms, i.e. 8857 / s, average 112us
- Direct access to the process: first in 44us, executed in 41.69 ms, i.e. 23981 / s, average 41us
We use HTTP / 1.1 over TCP / IP, because simple TCP / IP has very little overhead, and it is a well-crafted protocol for firewalls, etc., and allows us to use our infrastructure with the AJAX application, while The main goal is to serve Delphi customers.
IMHO there is no “best alternative Server Socket component for Delphi”, it depends on the purpose of your server application. The main bottleneck will be in the core of Windows itself. Perhaps direct access to the kernel-mode HTTP driver (Http.sys) may help.
Consider using a dedicated optimized server instead of a Delphi server, such as lighttpd or Cherokee using FastCGI to process requests through the Free Pascal (or CrossKylix) application for Linux. I think it will be the best performance.
source share