osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Checking network input processing by Python for a multi-threaded server


> 	Why not provide them so that anyone trying to analyze what you are
> seeing can try them for themselves.

I assume that an other information system can be more appropriate
for file distribution than this mailing list.


> 	Starting a full process takes time

This is usual. - Such an action would be necessary for the test case.


> 	Do you have ANY synchronization enabled,

I would expect that this is provided by the run time system for the
Python scripting language.


> 	so that you start all the children

The main process waits on the exit for the single started command
in each loop iteration.


> and they all wait for a single "go" signal to be set

No.


> -- so that they all start processing at the same time?

I suggest to take another look at the description for the test algorithm.


> 	No idea what is in each loop...

An instance for the class ?threaded_TCP_server? and a call of ?subprocess.run(?)?.


> 	If there is only one list (implied by #1)

There are two lists adjusted.

1. Storage for received records before the statement ?server.shutdown()?
   (and a reset to an empty list) is executed at the end of each loop iteration.

2. List lengths are recorded for analysis after the data collection phase.


> 	Again, it is not clear what is being counted here...

How many record sets were stored and are accessible at one point in time
in such a data structure?


> 	What is an "incidence", how is "available records" determined?

The generated table shows how often a specific number of record sets
was temporarily available for further data processing.
I would expect that the correct count should be 100 (once) here
(instead of the display of deviations from the original six test records).


> 	Also, TCP is a stream protocol, not a record protocol.

This view is generally fine.

JSON data structures are transmitted by the discussed approach.


> A client could use, say, 6 separate .send() operations,

This should be happening in this test.


> while the server receives everything in a single .recv() call.

I hope that the execution of the statement ?server.shutdown()? triggers
a separation in the reported inter-process communication.

Regards,
Markus