RE: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Bjørnar Nielsen
 

> The only shortcoming of ICS is the web server which has no official and/or
optimized CGI/ISAPI
> component and by design async which is bad for a web server. 

SZ, why do you think async design is bad for a webserver?

Regards Bjørnar



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Multithreaded http...

2005-04-14 Thread Francois Piette
> because there are alot of records to check, i wanted it to be threaded...

Well, this is defenitely not a case where multithreading is needed because ICS 
HTTP component is
asynchronous. HTTP component doesn't block ! It automatically handle your 
requests in the background
using events. If you need to handle 100 simultaneous requests, then simply use 
100 HTTP components
and async methods (GetAsync and the likes) and events (OnRequestDone and the 
likes).

btw: Not all Windows versions are able to handle 100 simultaneous connections ! 
This is not a
limitation of ICS, it is a built-in limitation in some Windows versions. You 
need a "Windows Server"
edition to be able to handle hundreds of simultaneous connections.

--
[EMAIL PROTECTED]
http://www.overbyte.be


- Original Message - 
From: "Flash Thunder" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Wednesday, April 13, 2005 11:09 PM
Subject: Re: [twsocket] Multithreaded http...


>
> - Original Message - 
> From: "Francois PIETTE" <[EMAIL PROTECTED]>
> To: "ICS support mailing" 
> Sent: Wednesday, April 13, 2005 10:13 PM
> Subject: Re: [twsocket] Multithreaded http...
>
>
> > > I'm kinda new in Delphi but i really really need to write some
> > > application... My application would have some TStringList where it would
> > > contain urls... then i wouldlike to process this list in some threads...
> > for
> > > example 100 threads... the thread would get the content of url, run some
> > > procedure/s and give the results/s to some other TStringList...
> >
> > Well, you don't need multithreading with ICS. ICS is asynchronous and non
> > blocking. Except is very special situations, using multithreading will
> > actually _reduce_ performance, even on a multiprocessor computer. If you
> > tell us what you really want to do, we can tell you if multithreading is
> > needed or not.
>
> I need to constantly gather data form a server about diffrent items ... that
> generally what i need... alot of items... the site isnt too user friendly so
> i got to copy/cut some things and put them into for example listview... and
> when it changes, the data in listview is being updated... for example:
>
> http://server.com/showiteminfo.php?itemid=12342352
>
> this gives me some html with some table in whitch there is some information
> about product ... for example:
> name: canon 3200f
> resolution: 2048dpi
> price: 333$
>
> and i need to check alot of items continously so i would be the first one
> that knows that the price has changed or something...
> because there are alot of records to check, i wanted it to be threaded...
>
> thank your for your help...
> Ann
>
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Fastream Technologies
Hello,
Well, async cannot take advantage of multi-processor systems. Also for CGI 
and ISAPI execution, threads seem to be a better way. And all the commercial 
Web servers I know such as IIS and Apache chose it for these reasons.

Best Regards,
SZ
- Original Message - 
From: "Bjørnar Nielsen" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" 
Sent: Thursday, April 14, 2005 10:38 AM
Subject: RE: [twsocket] Is there a way to download a file in threads?



The only shortcoming of ICS is the web server which has no official and/or
optimized CGI/ISAPI
component and by design async which is bad for a web server.
SZ, why do you think async design is bad for a webserver?
Regards Bjørnar

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


RE: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Primož Gabrijelčič
> Well, async cannot take advantage of multi-processor systems. 
> Also for CGI and ISAPI execution, threads seem to be a better 
> way. And all the commercial Web servers I know such as IIS 
> and Apache chose it for these reasons.

You are mixing up two factors.

Even on multi-processor system, one CPU is usually enough to handle
connections.  That doesn't prevent you from creating additional threads to
process CGI and ISAPI requests - nobody says that such requests must execute
in the context of the thread handling socket connections.

One of my commercial designs is using this approach and it is working just
great.

Best regards,
Primoz


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] FTP Connection Timeout - how to change

2005-04-14 Thread Udvari András László
Hi!

I have a slow FTP connection (typically the connection lasts about 60 sec using 
for example Total Commander). I tried to connect using ICS FTP component, but 
after about 15 sec I receive "Error code 10060 - Connection Timed out".
I changed the timeout property of the FTP component to 60, but no changes were 
seen.

Where can I set the timeout value for FTP connection?

Thanks:
Andras

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Fastream Technologies
You seem to be right and I can understand why Apache has chosen threaded way 
(for UNIX compatibility) but why did MS chose threads? What about I/O 
optimization. For example async freezes when a buffer of I/O is being read 
whereas threads to better disk/socket I/O?

SZ
- Original Message - 
From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" 
Sent: Thursday, April 14, 2005 11:59 AM
Subject: RE: [twsocket] Is there a way to download a file in threads?


Well, async cannot take advantage of multi-processor systems.
Also for CGI and ISAPI execution, threads seem to be a better
way. And all the commercial Web servers I know such as IIS
and Apache chose it for these reasons.
You are mixing up two factors.
Even on multi-processor system, one CPU is usually enough to handle
connections.  That doesn't prevent you from creating additional threads to
process CGI and ISAPI requests - nobody says that such requests must 
execute
in the context of the thread handling socket connections.

One of my commercial designs is using this approach and it is working just
great.
Best regards,
Primoz
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Francois Piette
  > why did MS chose threads?

This is not the place to discuss Microsoft design decision.
Please use a general purpose mailing list or newsgroup for that topic.
Please focus on ICS !

--
[EMAIL PROTECTED]
http://www.overbyte.be

- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, April 14, 2005 11:28 AM
Subject: Re: [twsocket] Is there a way to download a file in threads?


> You seem to be right and I can understand why Apache has chosen threaded way 
> (for UNIX compatibility) but why did MS chose threads? What about I/O 
> optimization. For example async freezes when a buffer of I/O is being read 
> whereas threads to better disk/socket I/O?
> 
> SZ
> 
> - Original Message - 
> From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]>
> To: "'ICS support mailing'" 
> Sent: Thursday, April 14, 2005 11:59 AM
> Subject: RE: [twsocket] Is there a way to download a file in threads?
> 
> 
> >> Well, async cannot take advantage of multi-processor systems.
> >> Also for CGI and ISAPI execution, threads seem to be a better
> >> way. And all the commercial Web servers I know such as IIS
> >> and Apache chose it for these reasons.
> >
> > You are mixing up two factors.
> >
> > Even on multi-processor system, one CPU is usually enough to handle
> > connections.  That doesn't prevent you from creating additional threads to
> > process CGI and ISAPI requests - nobody says that such requests must 
> > execute
> > in the context of the thread handling socket connections.
> >
> > One of my commercial designs is using this approach and it is working just
> > great.
> >
> > Best regards,
> > Primoz
> >
> >
> > -- 
> > To unsubscribe or change your settings for TWSocket mailing list
> > please goto http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be 
> 
> 
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
> 

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FTP Connection Timeout - how to change

2005-04-14 Thread Francois Piette
> I have a slow FTP connection (typically the connection lasts about 60 sec 
> using for example Total
Commander). I tried to connect using ICS FTP component, but after about 15 sec 
I receive "Error code
10060 - Connection Timed out".
> I changed the timeout property of the FTP component to 60, but no changes 
> were seen.
>
> Where can I set the timeout value for FTP connection?

Error 10060 is a winsock generated error. There is nothing you can do about it 
from the component.
You have to change TCP/IP registry leys to adapt the timeouts. Note that 15 sec 
timeout is not the
standard winsock timeout. I suspect you have already tweaked the registry. Or 
maybe you have some
kind of personal firewall installed that to this kind of things.
--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Fastream Technologies
But this is a decision that affects ICS developers since MS is the owner of 
the OS and Winsock therefore can shed some light with its design. I did not 
have any malign intentions.

Regards,
SZ
- Original Message - 
From: "Francois Piette" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, April 14, 2005 12:42 PM
Subject: Re: [twsocket] Is there a way to download a file in threads?


 > why did MS chose threads?
This is not the place to discuss Microsoft design decision.
Please use a general purpose mailing list or newsgroup for that topic.
Please focus on ICS !
--
[EMAIL PROTECTED]
http://www.overbyte.be
- Original Message - 
From: "Fastream Technologies" <[EMAIL PROTECTED]>
To: "ICS support mailing" 
Sent: Thursday, April 14, 2005 11:28 AM
Subject: Re: [twsocket] Is there a way to download a file in threads?


You seem to be right and I can understand why Apache has chosen threaded 
way
(for UNIX compatibility) but why did MS chose threads? What about I/O
optimization. For example async freezes when a buffer of I/O is being 
read
whereas threads to better disk/socket I/O?

SZ
- Original Message - 
From: "Primoz Gabrijelcic" <[EMAIL PROTECTED]>
To: "'ICS support mailing'" 
Sent: Thursday, April 14, 2005 11:59 AM
Subject: RE: [twsocket] Is there a way to download a file in threads?

>> Well, async cannot take advantage of multi-processor systems.
>> Also for CGI and ISAPI execution, threads seem to be a better
>> way. And all the commercial Web servers I know such as IIS
>> and Apache chose it for these reasons.
>
> You are mixing up two factors.
>
> Even on multi-processor system, one CPU is usually enough to handle
> connections.  That doesn't prevent you from creating additional threads 
> to
> process CGI and ISAPI requests - nobody says that such requests must
> execute
> in the context of the thread handling socket connections.
>
> One of my commercial designs is using this approach and it is working 
> just
> great.
>
> Best regards,
> Primoz
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be 

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


RE: [twsocket] FTP Connection Timeout - how to change

2005-04-14 Thread Udvari András László
Thank you, I will inspect my settings, because in this machine other FTP 
programs failed, too. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francois Piette
Sent: Thursday, April 14, 2005 11:45 AM
To: ICS support mailing
Subject: Re: [twsocket] FTP Connection Timeout - how to change

> I have a slow FTP connection (typically the connection lasts about 60 sec 
> using for example Total
Commander). I tried to connect using ICS FTP component, but after about 15 sec 
I receive "Error code
10060 - Connection Timed out".
> I changed the timeout property of the FTP component to 60, but no changes 
> were seen.
>
> Where can I set the timeout value for FTP connection?

Error 10060 is a winsock generated error. There is nothing you can do about it 
from the component.
You have to change TCP/IP registry leys to adapt the timeouts. Note that 15 sec 
timeout is not the
standard winsock timeout. I suspect you have already tweaked the registry. Or 
maybe you have some
kind of personal firewall installed that to this kind of things.
--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: Re[4]: [twsocket] NOFORMS and TWSocketServer

2005-04-14 Thread Francois PIETTE
> I did some further testing.
>
> I commented out most of my code so it's not doing
> anything. When I only have WSocket in uses clause,
> the file size is 61KB. The moment I put WSocketS in,
> the file size jumps to 288KB (on D5.) This is when
> no function of ICS is being called, no object created.
> Only used. I even deleted all ICS dcu files.

I created a new console mode application (D7), added NOFORMS in the project
defines.
Compilation gives a filesize: 39.424 Bytes.
Added WSocket to the uses clause: 91.136 Bytes.
Added WSocketS to the uses clause:  91.648 Bytes.
Removed NOFORMS from the defines: 427.008 Bytes.

Options are for debugging: no optimization, range checking enabled, I/O
checking enabled, Overflow checking enabled, debug information enabled.

My conclusion is that NOFORMS works very well, including with
TWSocketServer.

--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: Re[4]: [twsocket] NOFORMS and TWSocketServer

2005-04-14 Thread Arno Garrels
Francois PIETTE wrote:
>> I did some further testing.
>> 
>> I commented out most of my code so it's not doing
>> anything. When I only have WSocket in uses clause,
>> the file size is 61KB. The moment I put WSocketS in,
>> the file size jumps to 288KB (on D5.) This is when
>> no function of ICS is being called, no object created.
>> Only used. I even deleted all ICS dcu files.
> 
> I created a new console mode application (D7), added NOFORMS in the
> project defines.
> Compilation gives a filesize: 39.424 Bytes.
> Added WSocket to the uses clause: 91.136 Bytes.
> Added WSocketS to the uses clause:  91.648 Bytes.
> Removed NOFORMS from the defines: 427.008 Bytes.

I may be wrong, but I believe I recall that there was
something buggy in TWSocketServer with that in previous versions.
Jack, are you working with the lastest ICS release?

Arno Garrels


> 
> Options are for debugging: no optimization, range checking enabled, I/O
> checking enabled, Overflow checking enabled, debug information enabled.
> 
> My conclusion is that NOFORMS works very well, including with
> TWSocketServer.
> 
> --
> [EMAIL PROTECTED]
> http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Is there a way to download a file in threads?

2005-04-14 Thread Corey Murtagh
Fastream Technologies wrote:
But this is a decision that affects ICS developers since MS is the 
owner of the OS and Winsock therefore can shed some light with its 
design. I did not have any malign intentions.
Be that as it may, discussions of the /design decisions/ that lead to 
the current state are neither useful nor topical here as they do not 
relate to the ICS components in the slightest.  The current state itself 
is topical... in as much as it relates to the functioning of the 
components and no further.

All that aside, Francois is the owner of this mailing list.  If he asks 
you to desist from certain behavior - like promoting your own products, 
discussing other network component suites, or trying to discuss 
irrelevant things like Microsoft's reasons for doing something - then it 
is churlish to continue to do so, or to attempt to justify yourself.

--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur."
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re[6]: [twsocket] NOFORMS and TWSocketServer

2005-04-14 Thread Jack
Thanks Francois for the testing.

Arno was right. Once I updated to the latest ICS,
the file size went down to 127KB (Delphi 5.)

Before I used TWSocketServer it was 61KB. Not sure
why it doubled the file size. But it's still a lot better
than before, which was over 300KB. I added some lines of
code though but I didn't add any other unites.

-- 
Best regards,
Jack

Thursday, April 14, 2005, 1:52:17 PM, you wrote:

AG> Francois PIETTE wrote:
>>> I did some further testing.
>>> 
>>> I commented out most of my code so it's not doing
>>> anything. When I only have WSocket in uses clause,
>>> the file size is 61KB. The moment I put WSocketS in,
>>> the file size jumps to 288KB (on D5.) This is when
>>> no function of ICS is being called, no object created.
>>> Only used. I even deleted all ICS dcu files.
>> 
>> I created a new console mode application (D7), added NOFORMS in the
>> project defines.
>> Compilation gives a filesize: 39.424 Bytes.
>> Added WSocket to the uses clause: 91.136 Bytes.
>> Added WSocketS to the uses clause:  91.648 Bytes.
>> Removed NOFORMS from the defines: 427.008 Bytes.

AG> I may be wrong, but I believe I recall that there was
AG> something buggy in TWSocketServer with that in previous versions.
AG> Jack, are you working with the lastest ICS release?

AG> Arno Garrels


>> 
>> Options are for debugging: no optimization, range checking enabled, I/O
>> checking enabled, Overflow checking enabled, debug information enabled.
>> 
>> My conclusion is that NOFORMS works very well, including with
>> TWSocketServer.
>> 
>> --
>> [EMAIL PROTECTED]
>> http://www.overbyte.be

AG> --
AG> To unsubscribe or change your settings for TWSocket mailing list
AG> please goto http://www.elists.org/mailman/listinfo/twsocket
AG> Visit our website at http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] New release: minor bug fix, new sample

2005-04-14 Thread Francois PIETTE
A new ICS version is available.
A small bug has been fixed in the HTTP client component that affected
authentication with iPlanet Web Proxy Server (found by Mr Bloms and
Tomachinsky).
A new console mode sample: ConUdpLstn. It is the GUI sample UdpLstn ported
to console. It make use on the TConApplication object that is now included
in ICS and many of you haven't probably noticed. It is worth looking at this
object: it allows you to easily build an event driven console mode
application.

--
[EMAIL PROTECTED]
http://www.overbyte.be


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: Re[4]: [twsocket] NOFORMS and TWSocketServer

2005-04-14 Thread Marco van de Voort
> > Only used. I even deleted all ICS dcu files.
> 
> I created a new console mode application (D7), added NOFORMS in the project
> defines.
> Compilation gives a filesize: 39.424 Bytes.
> Added WSocket to the uses clause: 91.136 Bytes.
> Added WSocketS to the uses clause:  91.648 Bytes.
> Removed NOFORMS from the defines: 427.008 Bytes.
> 
> Options are for debugging: no optimization, range checking enabled, I/O
> checking enabled, Overflow checking enabled, debug information enabled.
> 
> My conclusion is that NOFORMS works very well, including with
> TWSocketServer.

>From Mail from me to Francois dd 24 aug 2004 (so the fix point is post that
date):

.
wsocketS imports unit controls without using it (or is it for the USE_SSL?)
anyway, it should be under IFDEF NOFORMS or USE_SSL or both.
...

So simply putting controls under no_forms would probably fix it in an older
version, should sb need it.

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re[6]: [twsocket] NOFORMS and TWSocketServer

2005-04-14 Thread Jack
After reading Marco's message, I was curious about
why wsockets.pas adds 60K of file size. When I looked
at the file, I didn't really see NOFORM. Didn't see
any unnecessary units either...

MvdV> .
MvdV> wsocketS imports unit controls without using it (or is it for the 
USE_SSL?)
MvdV> anyway, it should be under IFDEF NOFORMS or USE_SSL or both.
MvdV> ...

MvdV> So simply putting controls under no_forms would probably fix it in an 
older
MvdV> version, should sb need it.



-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be