Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Advanced Blocking Client (Newbie)
| Subject: | Advanced Blocking Client (Newbie) |
| Posted by: | "Larry" (lchiass..@autoeurope.com) |
| Date: | Fri, 19 May 2006 10:40:34 |
Hello,
I've read the document titled "Introduction to Indy" by Chad Z. Hower. I
found the document to be very informative. In this document, under
Threading, there's mention of "Advanced Blocking Clients". Unfortunately,
there's no further information on this subject in the document.
My interest in it may be what I need to correctly use Indy.
Currently, our development team is working on an ISAPI dll application that
runs on IIS. For each instance of our ISAPI dll, on one physical server,
there are times when it will create a handful of worker threads that access
web services provided by a vendor of ours. Each thread needs to create
socket to access these web services to achive the concurrency we need. At
the moment, we've had some success in using the Indy components, along with
OpenSSL.
However, when profiling for leaks, there are times when Critical Sections
are not being released, and thus leading to a leak. Also, there are times
when a thread will try to obtain a socket connection (.Connect method) only
to have it fail. From what I've read on Indy, I believe we are not doing
things correctly in terms of Indy component use.
I would like to point out two details of our threads:
1) A thread will create and release any resources it needs in the context of
the thread, not the main thread (ie. .Create and .Destroy). For example, a
thread will create a db connection in the .Execute method of the thread.
This includes socket creation and destruction
2) With our design, our threads do not need to be synchornized with others
Based on our threading design, driven by our business requirements, and what
I've read, Advanced Blocking Clients is the way to go--of course, I could be
wrong as I'm a newbie.
Can someone please direct me to more information on programming Advanced
Blocking Clients?
If ADB is not the way to go, a back plan is to go client/server with Indy,
where each thread created by an instance of our ISAPI dll would be a client
accessing an Indy Server (IS), where IS will then access the www for the web
services provided by our vendor (making our IS a client of web services).
The OpenSSL component would be moved from the client to the Indy Server.
Thanks in advance for your time, effort, and sharing of gray matter.
Larry...