Ok the python solution mentioned is one way - however this multi
threading
you requiree is not a multi threading requirement - you are consuming a
socket service, and not accepting connections, - we do this kind of
thing
all the time using phantoms.
Lets say your batch of transactions is in a file, as you process each
one
set a flag saying it is done, or delete the record or something, then
yourprogram can select the file, loop through the records and if the
flag is
set or the record does not exist it just skips onto the next one. You
can
then start 10 processes running all doing the same thing and they
will work
through the file. Or you could have process 1 doing all the ones
beginning
with a 1, 2 for 2 and so on. You may want a controlling program that
runs
up, counts the records on the file/in the batch and from that
determined how
many phantoms to run up. It then runs up the phantoms and then stops.
Rgds
Symeon.
From: [email protected]
[mailto:[email protected]] On Behalf Of nschroth
Sent: 05 March 2011 16:55
To: [email protected]
Subject: [U2] Multi-Threading Universe Socket traffic
On Universe 10.1.14 over AIX 5.3, we currently communicate Credit Card
transactions via sockets (ISO-8583) using the following logic (works
fine):
OPEN.ERR=openSocket(THIS.IP,THIS.PORT,TCP.MODE,TIMEOUT,THIS.HANDLE)
INFO.ERR=getSocketInformation(THIS.HANDLE,PEER.FLAG,SOCKETINFO)
WRITE.ERR=writeSocket(THIS.HANDLE,SEND.MSG,TIMEOUT,TCP.MODE,SEND.SIZE)
READ.ERR=readSocket(THIS.HANDLE,RECV.MSG,RECV.LEN,TIMEOUT,TCP.MODE,RECV.SIZE
)
I am looking into using some sort of multi-threading logic to allow
increased volume in shorter timeframes. For example, we now send
batches of
up to 3,000 cards via a ftps mechanism that responds normally within 3-5
minutes. We want to benchmark doing this via the sockets instead.
The Subroutine that does this Socket comm takes about 0.7 secs per
trx, so a
3,000 card batch would take over 30 minutes single-threaded
(unacceptable).
Probably 80% of that 0.7 secs is transforming the data to send and then
transforming the response back to process.
I hearthat my BASIC applicaton program can utilize PHANTOM processes
(unfamiliar territory) to launch multiple requests but I am not sure
how to
throw multiple trxs over the wall and make sure to put te correct
responses
back together with the appropriate request.
Can anyone point me to some good documentation and/or example code
for doing
this?
--
View this message in context:
http://old.nabble.com/Multi-Threading-Universe-Socket-traffic-tp31076011p310
76011.html
Sent from the U2 - Users mailing list archive at Nabble.com.
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_____
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1204 / Virus Database: 1435/3482 - Release Date: 03/04/11
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users