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

[xmlblaster] Re: Fortran with socket communication



owner-xmlblaster at server.xmlBlaster.org wrote:

Hi

I am evaluating xmlBlaster for our organisation and we will need to use =
the socket interface
to communicate with some of our legacy (Fortran) code.

Ahh, Fortran support sounds interesting!


The specification of the socket protocol looks easy enough to implement = so I have tried writing some simple test examples using Python to check out the socket = conversation.

Yes, the SOCKET protocol is simple. The main hassle is having multithreading or an event loop to listen to callbacks during normal Fortran code execution.


Code and logfile outputs attached.

The mail got bounced please send the attachments directly to xmlblaster at marcelruff.info.


Thanks for any assistance. Colin Brown

The setup is:

Linux Server: (info from xmlBlaster dump)
    =
versionInfo=3Dversion=3D0.903,os.name=3DLinux,os.version=3D2.4.21-15.0.3.=
ELsmp,java.vm.vendor=3DSun Microsystems =
Inc.,java.vm.version=3D1.3.1_02-b02,os.arch=3Di386,build.timestamp=3D05/1=
2/2004 11:58 PM,build.java.vendor=3DIBM =
Corporation,build.java.version=3D1.3.1

running (unconfigured xmlBlaster - no security settings):
 /home/oracle/jre/1.3.1/bin/java -jar lib/xmlBlaster.jar -logConsole =
false -useKeyboard false >> xmlblaster_log.txt 2>&1 &


Windows 2000 client, Python 2.3

RUNNING THE TESTS:
1.  Publish/get works fine.
2.  Connect with callback suceeds, but there are warning messages in the =
xmlBlaster logfile
that I cannot figure out how to handle. The 04:47:17 entry is my attempt =
to eliminate the
04:47:18 warnings.

Start the server like this

  java org.xmlBlaster.Main -dump[socket] true -trace[socket] true

to get a dump of all messages received/send,
you can send the log output to me directly if problems remain.

3.  Connect with oneway callback fails horribly at the Server with Java =
Null-pointer exceptions.

The last days we have worked on oneway messages (added UDP support and fixed some oneway bugs), please check out the current xmlBlaster from cvs and try again. For the current cvs xmlBlaster please send all errors with stack traces to the mailing list so we can fix this for the coming release!

4.  RPC works (once), but I suspect callback acknowledgement problems as =
in 2 above.

OUTPUT from 2 above:
C:\Documents and =
Settings\cbrown\Desktop\xmlblaster\xmlblastersocket>python examples.py

    1   test publish/get
    2   test connect with callback
    3   test connect with oneway callback
    4   test remote procedure call

Enter number to test:2

WR: "       370\x00\x00I\x00\x001\x00connect\x00\x00\x00<qos>\n  =
<securityServic
e type=3D'htpasswd' version=3D'1.0'>\n    <user>conncb_Tue Aug 24 =
16:47:15 2004</use
r>\n    <passwd>xyz</passwd>\n  </securityService>\n  <ptp>true</ptp>\n  =
<queue
relating=3D'callback' maxEntries=3D'100' maxEntriesCache=3D'100'>\n    =
<callback type=3D
'SOCKET'>\n    </callback>\n  </queue>\n  <address type=3D'SOCKET'>\n  =
</address>\
n</qos>\x00\x000\x00"

RD: '       =
855\x00\x00R\x00\x001179\x00connect\x00sessionId:10.10.194.2-null-10
93322837709-66380214-63\x00\x00\n <qos>\n  <securityService =
type=3D"htpasswd" vers
ion=3D"1.0"><![CDATA[\n   <user>conncb_Tue Aug 24 16:47:15 2004</user>\n =
  <passwd

xyz</passwd>\n ]]></securityService>\n <ptp/>\n <session =

name=3D\'/node/xmlBla ster_10_10_194_2_3412/client/conncb_Tue Aug 24 16:47:15 2004/-62\' = timeout=3D\'864 00000\' maxSessions=3D\'10\' clearSessions=3D\'false\' = reconnectSameClientOnly=3D\'fal se\' = sessionId=3D\'sessionId:10.10.194.2-null-1093322837709-66380214-63\'/>\n = <qu eue relating=3D\'connection\' maxEntries=3D\'10000000\' = maxEntriesCache=3D\'1000\'>\n <address type=3D\'SOCKET\' dispatchPlugin=3D\'undef\'>\n \n = </address>\n </q ueue>\n <queue relating=3D\'subject\'/>\n <queue = relating=3D\'callback\' maxEntrie s=3D\'100\' maxEntriesCache=3D\'100\'>\n <callback type=3D\'SOCKET\' = dispatchPlugin=3D \'undef\'>\n

Here i would expect somthing like 'socket:127.0.0.1:37998' ??


\n </callback>\n </queue>\n </qos>\x00\x000\x00'

WR: " = 135\x00\x00I\x00\x001\x00subscribe\x00sessionId:10.10.194.2-null-109 3322837709-66380214-63\x00\x00<qos/>\x00<key oid=3D'trivia_Tue Aug 24 = 16:47:15 200 4'/>\x000\x00"

RD: "       =
178\x00\x00R\x00\x001180\x00subscribe\x00sessionId:10.10.194.2-null-
1093322837709-66380214-63\x00\x00\n <qos>\n  <subscribe =
id=3D'__subId:xmlBlaster_1
0_10_194_2_3412-16'/>\n <isSubscribe/>\n </qos>\x00\x000\x00"

WR: "       =
145\x00\x00I\x00\x001\x00publish\x00sessionId:10.10.194.2-null-10933
22837709-66380214-63\x00\x00<qos/>\x00<key oid=3D'trivia_Tue Aug 24 =
16:47:15 2004'
/>\x0011\x00big fat cat"

RD: "       =
208\x00\x00R\x00\x001181\x00publish\x00sessionId:10.10.194.2-null-10
93322837709-66380214-63\x00\x00\n <qos>\n  <key oid=3D'trivia_Tue Aug 24 =
16:47:15
2004'/>\n  <rcvTimestamp nanos=3D'1093322837751000000'/>\n =
<isPublish/>\n </qos>\x
00\x000\x00"

RD: "       376\x00\x00I\x00\x001conncb_Tue Aug 24 16:47:15 =
2004:182\x00update\x
00unknown\x00\x00\n <qos>\n  =
<sender>/node/xmlBlaster_10_10_194_2_3412/client/co
nncb_Tue Aug 24 16:47:15 2004/-62</sender>\n  <subscribe =
id=3D'__subId:xmlBlaster_
10_10_194_2_3412-16'/>\n  <rcvTimestamp =
nanos=3D'1093322837751000000'/>\n  <queue
index=3D'0' size=3D'1'/>\n </qos>\x00\n <key oid=3D'trivia_Tue Aug 24 =
16:47:15 2004'/>
\x0011\x00big fat cat"

WR: '        =
95\x00\x00R\x00\x001unknown\x00update\x00sessionId:10.10.194.2-null
-1093322837709-66380214-63\x00\x00<qos/>\x00\x000\x00'

WR: '       =
185\x00\x00I\x00\x001\x00disconnect\x00sessionId:10.10.194.2-null-10
93322837709-66380214-63\x00\x00<qos>\n  =
<deleteSubjectQueue>true</deleteSubjectQ
ueue>\n  <clearSessions>false</clearSessions>\n</qos>\x00\x000\x00'

RD: ''          <---------------  A null string (ie TCP session has been =
closed by remote user)

C:\Documents and Settings\cbrown\Desktop\xmlblaster\xmlblastersocket>

xmlBlaster logfile:

[24/08/2004 04:47:17 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 SOCKET-HandleClientRequest-conncb_Tue Aug 24 16:47:15 =
2004] SOCKET client connected, coming from =
host=3Dcbrown.met.co.nz/10.10.192.140 port=3D1342
[24/08/2004 04:47:17 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 =
DispatchConnection-callback:/node/xmlBlaster_10_10_194_2_3412/client/conn=
cb_Tue Aug 24 16:47:15 2004/-62] Connection 'SOCKET' transition UNDEF -> =
ALIVE: Success, =
callback:/node/xmlBlaster_10_10_194_2_3412/client/conncb_Tue Aug 24 =
16:47:15 2004/-62 connected.
[24/08/2004 04:47:17 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 Authenticate-/node/xmlBlaster_10_10_194_2_3412] =
Successful login for client =
/node/xmlBlaster_10_10_194_2_3412/client/conncb_Tue Aug 24 16:47:15 =
2004/-62, session expires after [ 24 h 0 millis ], 1 of 10 sessions are =
in use.
[24/08/2004 04:47:17 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 XmlKey] DOM parsed the XmlKey trivia_Tue Aug 24 =
16:47:15 2004
[24/08/2004 04:47:17 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 =
TopicHandler-/node/xmlBlaster_10_10_194_2_3412/topic/trivia_Tue Aug 24 =
16:47:15 2004] New topic is ready, history/maxEntries=3D10, =
persistence/msgUnitStore/maxEntries=3D100000000
[24/08/2004 04:47:17 WARN  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 SocketExecutor] Ignoring received 'update' message =
id=3Dunknown, nobody is interested in it

Why does the server receive an update? Is it the update return?

[24/08/2004 04:47:17 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 Authenticate-/node/xmlBlaster_10_10_194_2_3412] =
Sleeping cb.disconnect.pending.sleep=3D1000 millis in =
disconnect(/node/xmlBlaster_10_10_194_2_3412/client/conncb_Tue Aug 24 =
16:47:15 2004/-62) to deliver 1 pending messages ...
[24/08/2004 04:47:18 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 Authenticate-/node/xmlBlaster_10_10_194_2_3412] =
Disconnecting client /node/xmlBlaster_10_10_194_2_3412/client/conncb_Tue =
Aug 24 16:47:15 2004/-62, instanceId=3D-62, =
secretSessionId=3DsessionId:10.10.194.2-null-1093322837709-66380214-63
[24/08/2004 04:47:18 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 =
SubjectInfo-60-/node/xmlBlaster_10_10_194_2_3412/client/conncb_Tue Aug =
24 16:47:15 2004] Destroying SubjectInfo =
/node/xmlBlaster_10_10_194_2_3412/client/conncb_Tue Aug 24 16:47:15 =
2004. Nobody is logged in and no queue entries available
[24/08/2004 04:47:18 WARN  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 =
org.xmlBlaster.util.queue.cache.CacheQueueInterceptorPlugin-callback:/nod=
e/xmlBlaster_10_10_194_2_3412/client/conncb_Tue Aug 24 16:47:15 =
2004/-62] Shutting down cache queue which contains 1 transient messages
[24/08/2004 04:47:18 WARN  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 SOCKET-HandleClientRequest-conncb_Tue Aug 24 16:47:15 =
2004] There are 1 messages pending without a response, request IDs are =
conncb_Tue Aug 24 16:47:15 2004:182
[24/08/2004 04:47:19 INFO  XmlBlaster.SOCKET.HandleClient-conncb_Tue Aug =
24 16:47:15 2004 Authenticate-/node/xmlBlaster_10_10_194_2_3412] =
loginNameSubjectInfoMap has 7 entries and sessionInfoMap has 6 entries

regards,

Marcel