Athanassios,

I googled some time around Python console:
It  is single threaded.  
But your expectations seem to be that the behavour is like a terminal.

To achieve this your have to run 2 Phyton consoles / shells as you required 2 Terminals.
a) 1 passive to receive messages from WRITE  see attaches example starting before b)
b) 1 active to trigger action in Caché

Your initial code from your questions using the Caché Phyton binding covers b) OK!

for a) you may use a listener similar to this Phyton example with the correct port, buffer,...  ToDo

   1 #!/usr/bin/env python
   2 
   3 import socket
   4 
   5 
   6 TCP_IP = '127.0.0.1'
   7 TCP_PORT = 5005
   8 BUFFER_SIZE = 20  # Normally 1024, but we want fast response
   9 
  10 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  11 s.bind((TCP_IP, TCP_PORT))
  12 s.listen(1)
  13 
  14 conn, addr = s.accept()
  15 print 'Connection address:', addr
  16 while 1:
  17     data = conn.recv(BUFFER_SIZE)
  18     if not data: break
  19     print "received data:", data
  20     conn.send(data)  # echo
  21 conn.close()

Dashboards are always fresh calculated.

Compare the performance in .NET  to  IE.  It should be rather close to each other being based on similar technology.

If there is a significant difference then you dig at  .NET end (buffers, ...)

If Chrome is significant faster then IE it's most likely the faster JS engine in Chrome.

Next you could look into global buffers of Caché and concurrent use of the Caché instance.
And (rarely) the complexity of your dashboard
 

Hi  Athanassios,

you can not run the sender code in the same terminal as the receiver code
you have to use 2 terminals:

Terminal #1) start receiver. This simulates your Phyton Console

set tcp="|TCP|4200"
open tcp:(:4200):1 write $s($t:"OK",1:"failed"),!
for line=1:1 use tcp read text use 0 write line,?5,text,!

now you wait for something to be sent:

#Terminal #2): run sender

    set person = ##class(Samples.Person).%OpenId(1)
    w person.Name
    do person.PrintPersonTCP()

 

for this test it's essential that the sender finds a receiver waiting for input. Probably the same issue with PhytonConsole?

It's like real life: If nobody listens, your words are lost. laugh  And it has to happen at the same time.

The ouput goes to port 4200. That works with Caché.  (see test code)

Attention:  The ! at the end of the WRITE is important as it triggers the send.
in SAMPLES it is at the beginning:  So you just get an empty line. and rest remains in buffer.
You may also add  WRITE !! before the CLOSE to flush the buffer and send an empty line for termination .

I have no knowledge on Python or PythonConsole but from your code I see no indication
where it starts listening at port 4200. pls. check.

Test code from Caché Terminal:

USER>set tcp="|TCP|4200"
USER>open tcp:(:4200):1 write $s($t:"OK",1:"failed"),!
OK
USER>for line=1:1 use tcp read text use 0 write line,?5,text,!
1    Name: Uhles,Rob O.

<READ>

 

[ <READ>  is the reaction to the connection CLOSE of the sender as I don't check termination ]

Sorry, I saw just that one Print method fromSAMPLES.
The redirect is especially required to convert a Write Command to a Write() Method and vice versa.
For "classic" devices as files , TCP, UDP, all kind of pipes ,SPOOL,Console, Teerminal,...all you find in Caché I/O Device Guide I just see no added value  except fiddling around $P which I never had the need to do over 40yrs

The parameters are defined all over here:

 Searching for 'SERVICEINPUTCLASS' in 'Ens*.cls' (whole words,case sensitive)
Ens.Enterprise.MsgBank.BankTCPAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
Ens.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.DICOM.Adapter.TCP.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.EMail.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.File.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.HTTP.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.Pipe.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.SQL.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.TCP.CountedInboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.TCP.DuplexAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.TCP.FramedInboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.TCP.TextLineInboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
EnsLib.UDP.InboundAdapter.cls(SERVICEINPUTCLASS): Parameter SERVICEINPUTCLASS 
Found 13 occurrence/s in 13 file/s.

 Searching for 'SERVICEOUTPUTCLASS' in 'Ens*.cls' (whole words,case sensitive)
Ens.Enterprise.MsgBank.BankTCPAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
Ens.InboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
EnsLib.DICOM.Adapter.TCP.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
EnsLib.HTTP.InboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
EnsLib.TCP.CountedInboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
EnsLib.TCP.FramedInboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
EnsLib.TCP.TextLineInboundAdapter.cls(SERVICEOUTPUTCLASS): Parameter SERVICEOUTPUTCLASS 
Found 7 occurrence/s in 7 file/s.

But there is no case where it is used.

Looks like "reserved for future use "

The diagramm shows to me  2 object REFERENCES (oref)
oref consists of a  (local) integer@Classname  and points to an object.
in your case both are of type %Collection.ListOfObj 
by the reference you can't tell that this is the same.
any ##class(%Collection.ListOfObj).%New() will create a new oref
in your case I see a count of 1 and then a count of 2 
you should look what happens in or after (19)  and in or after (29)
looks to me like a fresh return value

set CountRow=pObject.IssuesList.GetAt(i).Count()

you assume pObject.IssuesList.GetAt(i) gives back a %Collection Object (Iist, Array, ..)
Before applying method .Count() you should check if this assumption is true.

your previous description with ASSIGN / APPEND wasn't that convincing that you always have the object you expect.

ref: "out of the scope of ENSEMBLE to an external class" 
you should save anything that you want to keep over that call in one/multiple property of %context Object.