 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Atmapuri Guest
|
Posted: Tue Nov 11, 2003 7:12 pm Post subject: How to... |
|
|
Hi!
I have 30-60 clients on the Ethernet network. They support UDP, TCP/IP,
DataSocket..
All clients send 19200 bytes long blocks of data every 2 seconds.
The network can be 100MBit, but 10MBit should work if possible..
(The network should be able to service some other operations also.)
My job is to make a single receiver that will collect data from all clients
and:
- Minimize the network load
- Ensure all packets got in or at least know that one has been missed,
(but that would signal a hardware error.).
I would appreciate if anyone would suggest the protocol to use
and any other suggestions how to go about this thing..
I was looking at TPC/IP, but the Indy TCP/IP server creates a separate
thread for every connnection. With 60 clients that would be 60 threads.
Maybe not a good idea ...
Thanks!
Atmapuri.
|
|
| Back to top |
|
 |
Atmapuri Guest
|
Posted: Tue Nov 11, 2003 8:23 pm Post subject: Re: How to... |
|
|
Hi!
Thank you very much for your reply.
| Quote: | You can use ICS components (TWSocket and TWSocketServer). I uses a totally
different programming model: asynchronous and event driven. With ICS,
you'll
be able to handle as many connections as you like with only a single
thread.
Of course depending on the load, you may want to use several threads. If
your application is just to collect data and store it to a file, I'm sure
a
single thread will handle the work load you specified.
- Minimize the network load
It is dependent on your protocol. The bandwidth you need is roughly 19200
*
8 / 2 * 60 * 1.10 = 5Mbps.
|
Humm... I computed about 200kBytes. 19200 is per two seconds... Would that
mean the required bandwidth is 2.5 Mbps? Thats pretty important, because
I have to have an estimate of the hardware load.
| Quote: | Note that you must also have a disk subsystem abale to handle that
throuput
continuesly. This is not a problem for most disks, but be aware that the
disk could be shared with other tasks !
|
Not a problem. Data is resolved in memory, only a small fraction gets
written.
| Quote: | - Ensure all packets got in or at least know that one has been missed,
(but that would signal a hardware error.).
That is a job for TCP. Nothing to do for that if you use a TCP stream.
You can download ICS full source code (freeware) from
http://www.overbyte.be
(it is also on Delphi 6/7 companion CD but the version on the website is
more up-to-date). There are several sample Tcp servers, either as
applications ou services.
ICS has a dedicated support mailing list. You should subscribe if you have
questions. A team is dedicated to answer your questions, without mention
about one thousand subscribers sharing their knowledges. See "support"
link
at ICS website for details.
|
Thanks a lot...
Atmapuri.
|
|
| Back to top |
|
 |
Francois PIETTE Guest
|
Posted: Tue Nov 11, 2003 8:32 pm Post subject: Re: How to... |
|
|
| Quote: | I have 30-60 clients on the Ethernet network.
They support UDP, TCP/IP, DataSocket..
All clients send 19200 bytes long blocks of data every 2 seconds.
It is dependent on your protocol. The bandwidth you need is roughly
19200 * 8 / 2 * 60 * 1.10 = 5Mbps.
Humm... I computed about 200kBytes. 19200 is per two seconds... Would
that |
19200 was given in bytes, i divided by two because it is two per second, I
multiplied by 8 because it was bytes not bits, I multiplied by 1.10 because
of some overhead of TCP/IP protocol. I muliplied by 60 because there are 60
simultaneous connexions. The total gives 5,068,800 bits per second which I
roiunded to 5 Mbps. (Note that Mbps is Mega bit per second whils MBps would
be Mega Bytes per second).
So my computation seems correct to me... Don't you agree with me ?
--
Contribute to the SSL Effort. Visit
http://overbyte.delphicenter.com/eng/ssl.html
--
[email]francois.piette (AT) overbyte (DOT) be[/email]
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be
"Atmapuri" <janez.makovsek (AT) usa (DOT) net> a écrit dans le message de
news:3fb14530 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi!
Thank you very much for your reply.
You can use ICS components (TWSocket and TWSocketServer). I uses a
totally
different programming model: asynchronous and event driven. With ICS,
you'll
be able to handle as many connections as you like with only a single
thread.
Of course depending on the load, you may want to use several threads. If
your application is just to collect data and store it to a file, I'm
sure
a
single thread will handle the work load you specified.
- Minimize the network load
It is dependent on your protocol. The bandwidth you need is roughly
19200
*
8 / 2 * 60 * 1.10 = 5Mbps.
Humm... I computed about 200kBytes. 19200 is per two seconds... Would
that
mean the required bandwidth is 2.5 Mbps? Thats pretty important, because
I have to have an estimate of the hardware load.
Note that you must also have a disk subsystem abale to handle that
throuput
continuesly. This is not a problem for most disks, but be aware that the
disk could be shared with other tasks !
Not a problem. Data is resolved in memory, only a small fraction gets
written.
- Ensure all packets got in or at least know that one has been missed,
(but that would signal a hardware error.).
That is a job for TCP. Nothing to do for that if you use a TCP stream.
You can download ICS full source code (freeware) from
http://www.overbyte.be
(it is also on Delphi 6/7 companion CD but the version on the website is
more up-to-date). There are several sample Tcp servers, either as
applications ou services.
ICS has a dedicated support mailing list. You should subscribe if you
have
questions. A team is dedicated to answer your questions, without mention
about one thousand subscribers sharing their knowledges. See "support"
link
at ICS website for details.
Thanks a lot...
Atmapuri.
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Nov 11, 2003 9:01 pm Post subject: Re: How to... |
|
|
"Atmapuri" <janez.makovsek (AT) usa (DOT) net> wrote
| Quote: | I was looking at TPC/IP, but the Indy TCP/IP server creates a separate
thread for every connnection. With 60 clients that would be 60 threads.
|
For Indy 9, that is correct. For Indy 10, that will not be the case. In
addition to threads, Indy 10 will also support fibers. Long story short, it
would be possible to execute 60 fibers within the context of 1-2 actual
threads (instead of 60) with little or no performance delays (if anything,
performance can be improved by using fibers).
Gambit
|
|
| Back to top |
|
 |
Atmapuri Guest
|
Posted: Wed Nov 12, 2003 6:43 am Post subject: Re: How to... |
|
|
Hi!
| Quote: | 19200 was given in bytes, i divided by two because it is two per second, I
multiplied by 8 because it was bytes not bits, I multiplied by 1.10
because
of some overhead of TCP/IP protocol. I muliplied by 60 because there are
60
simultaneous connexions. The total gives 5,068,800 bits per second which I
roiunded to 5 Mbps. (Note that Mbps is Mega bit per second whils MBps
would
be Mega Bytes per second).
So my computation seems correct to me... Don't you agree with me ?
|
I did not understand your formula... Thanks...
Atmapuri.
|
|
| Back to top |
|
 |
Martin James Guest
|
Posted: Thu Nov 13, 2003 1:03 pm Post subject: Re: How to... |
|
|
| Quote: | I was looking at TPC/IP, but the Indy TCP/IP server creates a separate
thread for every connnection. With 60 clients that would be 60 threads.
Maybe not a good idea ...
|
60 threads is nothing. My 2k box has 230 threads loaded while doing
nothing - just from the system & background stuff. There are 293 threads
loaded as I write this mail - no problem.
Rgds,
Martin
|
|
| Back to top |
|
 |
Atmapuri Guest
|
Posted: Thu Dec 04, 2003 6:53 am Post subject: Re: How to... |
|
|
Hi!
| Quote: | I was looking at TPC/IP, but the Indy TCP/IP server creates a separate
thread for every connnection. With 60 clients that would be 60 threads.
Maybe not a good idea ...
60 threads is nothing. My 2k box has 230 threads loaded while doing
nothing - just from the system & background stuff. There are 293 threads
loaded as I write this mail - no problem.
|
Humm... Microsofts recommends that the number of threads per proces
should not exceed 16. But it is clear that system wide there are more
threads
running.
Regards!
Atmapuri
|
|
| Back to top |
|
 |
Chad Z. Hower aka Kudzu Guest
|
Posted: Fri Jan 02, 2004 6:28 pm Post subject: Re: How to... |
|
|
"Atmapuri" <janez.makovsek (AT) usa (DOT) net> wrote in
news:3fced9ed (AT) newsgroups (DOT) borland.com:
| Quote: | Humm... Microsofts recommends that the number of threads per proces
should not exceed 16. But it is clear that system wide there are more
threads
running.
|
This recommendation is too general and was targeted at simple GUI apps. IIS
itself runs several hundred threads and this comment was not intended for
servers.
Outlook alone is using 17 thread on my system right now.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Got Indy? Got the book?
http://www.atozed.com/indy/book/
ELKNews - Get your free copy at http://www.atozedsoftware.com
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|