Interesting concept. I have looked at the FTP client source and the first thing I am going to try is to change is the DataSocket to an array of TWSocket. If this falls in a big heap I shall look at your idea of multiple FTP components.

MOS has been ruled out because of the expense issue and the fact that nobody has ever yet tested a teleprompter with iNEWS an MOS.

Another solution could be to utilise another mode, whereby you can force the server to operate in a single socket mode. In this case the socket is kept open at all times.

Graham

----- Original Message ----- From: "Francois PIETTE" <francois.pie...@skynet.be>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Saturday, October 10, 2009 10:15 PM
Subject: Re: [twsocket] FTP Client Delay - take 2


You could have several FTP client component. Only one will poll and determine which files needs to be downloaded. Then you may have 10 or more other to download the files in parallel. It's easy with async component. No need for multithreading.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

----- Original Message ----- From: "Graham (Deephaven)" <gra...@deephaven.co.uk>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Saturday, October 10, 2009 10:47 PM
Subject: Re: [twsocket] FTP Client Delay - take 2


Thanks for all your comments. The FTP server is not mine and cannot be changed so if anything can be changed it has to be in the FTP client.

The polling is not the problem, one LIST command returns a list of items and attributes. The problem is when the server marks every item as changed that client has to download every item to determine if the change is valid.

If it helps, I'll tell you that the FTP client is a teleprompter and the server is the Avid/iNEWS newsroom system.

So it appears that the delay is probably caused by the opening and closing of the data port connection. One thought I have had is that when I was working with Delphi TClientSocket and connecting / disconnecting to the TServerSocket, I found that I could not disconnect and then re-connect without inserting a delay. However if I created an array of TClientSockets and hop on to the next one after each disconnect, I did not need any delay.

Could something like this be done in the FTP client. I haven't yet delved too closely into the source code, but I assume that somewhere it uses the ICS socket for the data channel. Would it work if it were changed to an array of sockets?

Graham

----- Original Message ----- From: "Francois PIETTE" <francois.pie...@skynet.be>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Saturday, October 10, 2009 8:44 AM
Subject: Re: [twsocket] FTP Client Delay - take 2


Hello Graham,

Unfortunately in this instance 200mS is a problem. The client is performing a LIST every 3 seconds on the server. There may be 300-400 files in the list. All of a sudden the server flags every file as changed and the client has to download every file to see if the change is valid. So now 200mS per RETR accumulates to a significant time.

I don't know how far you can control both client and server side, but if you can change server side, probably it would be much better to design a specific server program instead of using FTP protocol.

FTP protocol is slow by design (design of the protocol, not design of ICS). There are two connections: one for control and one for data. Each file transfert needs a new data connection and this takes time to setup and close properly.

More, I understand you are doing a polling which is both slow and imposte an important load on the server.

I suggest you design a simple server which would use Windows API to be notified for file changes in the folder your are monitoring, send the notification to the client which would download the files using the same channel as the control channel, or even use multiple channels to download several files at once.

Regards,

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

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

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

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

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

Reply via email to