Running FIRMS
within FilterPipeline
Community
Grids Lab, Indiana University
1. Introduction
This document explains
how to run the WS-ReliableMessaging & WS-Reliability applications within
the prototype Filter Pipeline. The following assumptions have been made for the
purpose of explaining this demo. The user may appropriately change any of these
values to suite their needs.
WS-Reliability
|
FIRMS
base (distribution) directory: C:\webservices\FIRMS Host_Name:
156.56.104.175 Source
Node port number: 8000 Sink
Node port number: 9000 Database
Configuration File for Source Node: WsrSourceConfig.properties Database
Configuration File for Sink Node: WsrSinkConfig.properties Source
Database: wsreliability Sink Database: wsreliability1 |
WsrSourceConfig.properties file has database
connection parameters for Source Node.
|
Database_JDBC_Driver=org.gjt.mm.mysql.Driver Database_ConnectionProvider=jdbc:mysql Database_ConnectionHost=localhost Database_ConnectionPort=3306 Database_WSR_Database=wsreliability Database_WSR_username=root Database_WSR_password=root |
WsrSinkConfig.properties file has database
connection parameters for Sink Node.
|
Database_JDBC_Driver=org.gjt.mm.mysql.Driver Database_ConnectionProvider=jdbc:mysql Database_ConnectionHost=localhost Database_ConnectionPort=3306 Database_WSR_Database=wsreliability1 Database_WSR_username=root Database_WSR_password=root |
User
can change any of above parameters according to the database needs. Here we use
MySql4.1. We already have wsreliability
and wsreliability1 databases for Source Node
and Sink Node respectively. For the table structure refer to the sqlTableDefinition file available under the docs folder. Figure 1 shows the table structure for wsrealiability and wsrealiability1 databases in MySql.
|
|
|
|
|
|
|
|
Figure 1 Structure of wsreliability and wsreliability1 database
2. Running WS-Reliability
Web Services
2.1 Starting Wsr Source on Filter Pipeline: - We
are assuming host is a localhost and port number is 8000 for Wsr Source. Using
ANT build.xml file we can run the target wsr-sourcefilter
by passing arguments for host name and port number where you want to run the
application. Open a MS-DOS command prompt on the Windows OS and change the
directory to your FIRMS base directory (C:\webservices\FIRMS). Execute the following
command from directory.
C:\WebServices\FIRMS>ant wsr-sourcefilter
-Dwsr.source.hostname=localhost -Dwsr.source.port=8000
-Dwsr.source.config=config/wsr/WsrSourceConfig.properties
Figure
2 depicts the Source Service running on port 8000.

Figure 2 Execution of wsr-sourcefilter command
After successful
execution of the above command type ‘h’
for help at the Wsr Source and you will see the options available for you to
execute at the Source. Figure 3 depicts the output of command “h”.

Figure 3 List of Commands at Source
2.2 Starting Wsr Sink on Filter Pipeline: -
We are assuming that the host is localhost and port number is 9000 for the Wsr
Sink. Using ANT build.xml file execute the target wsr-sinkfilter
by passing arguments for host name and port number where you want to run the
application. Open a MS-DOS command prompt on the Windows OS and change the
directory to your WSR installation directory. Execute the following command
from directory.
C:\WebServices\wsr> ant wsr-sinkfilter -Dwsr.sink.hostname=localhost
-Dwsr.sink.port=9000 -Dwsr.sink.config=config/wsr/WsrSinkConfig.properties
Figure
4 depicts the Sink Service running on the port 9000.

Figure 4 Execution of Command wsr-sinkfilter
After successful
execution of the above command type ‘h’
for help at the Wsr Sink and you will see the options available for you to
execute at the Sink. Figure 5 depicts the output of command “h”

Figure 5 List of commands at Sink
3. Running Demo WS Reliability after starting
3.1 Creating links between Source and Sink service:
You have to create links
between all applications to open to receive and send data across. Use ‘cr’ command as follows.
From Wsr Source to Wsr Sink
cr
localhost 9000
Figure 6 depicts the execution of command “cr localhost 9000”

Figure 6 Execution of command "cr
localhost 9000"
From Wsr Sink to Wsr Source
cr
localhost 8000
Figure 7 depicts the execution of command “cr
localhost 8000”

Figure 7 Execution of command "cr
localhost 8000"
Above mentioned commands
create links between all applications and you are ready to send and receive the
SOAP Messages between all applications.
3.2 Send SOAP Message from
source to sink:
Here
demo explains the execution of single command which sends SOAP message to sink
with Response Reply pattern, with groupID: abcd and with last message = false
within group.
From the Wsr Source,
issue the following command to send a SOAP message with Reply pattern =
Response, Last message = false and groupID: abcd
“1 tcp://localhost:8000
tcp://localhost:9000 abcd”
Figure 8 depicts the SOAP message issued by source
application. 
Figure 8 Execution of command "1
tcp://localhost:8000 tcp://localhost:9000 abcd"
The generated SOAP
message directly goes to source node. Source node adds request reliability
header to the SOAP message header. Figure 9 depicts the SOAP message generated at source node.
Finally the source node sends this SOAP message to the sink node to ensure
reliability features.

Figure 9 Request SOAP Message generated by Source Node
Sink
node receives the SOAP message with request header from the source node. Figure 10 shows the SOAP message received by sink node.

Figure 10 Request message received by Sink
Node
Sink
node checks the SOAP message header for any errors and ensures all reliability
parameters E.g. message ordering, duplicate elimination and guaranteed delivery
and sends a response back to source node. Response can be a fault or an acknowledgement.
The following figure shows the response SOAP message from sink node to source
node. This response message depicted in Figure 11 is the acknowledgement for the request message sent
by source to sink.

Figure 11 Response generated by Sink Node
The source node
receives the response back from sink node. It processes the response. It
notifies the application only when there is any permanent fault or payload from
the sink. Figure 12 shows the SOAP message received by the source node
from the sink node.

Figure 12 Response received by Source Node
After
sending the SOAP request message from source node to sink node and receiving
SOAP response message from the sink node to the source node, source and sink
databases will display the entry for message with group”abcd”, with sequence number= 0.
Figure 13 shows the “wsrgroupdestinationinfo”
table entry in the “wsreliability” database.
Figure 13 Database - wsreliability and Table -
wsrgroupdestinationinfo
Figure 14 shows the “wsrgroupinfo”
table entry in the “wsreliability” database.
Figure 14 Database - wsreliability and Table -
wsrgroupinfo
Figure 15 shows the “wsrgroupterminationinfo”
table entry in the “wsreliability” database.
Figure 15 Database - wsreliability and Table -
wsrgroupterminationinfo
Figure 16 shows the “wsrstoragewidget”
table entry in the “wsreliability” database.
Figure 16 Database - wsreliability and Table -
wsrstoragewidget
Figure 17 shows the “wsrgroupinfo”
table entry in the “wsreliability1” database.
Figure 17 Database - wsreliability1 and Table
- wsrgroupinfo
Figure 18 shows the “wsrgroupterminationinfo”
table entry for “wsreliability1” database.
Figure 18 Database - wsreliability1 and Table
- wsrgroupterminationinfo
Follwing
Figure 19 shows the “wsrstoragewidget”
table entry for “wsreliability1” database.
Figure 19 Database - wsreliability1 and Table
- wsrstoragewidget
Similarly, user can test
options marked from “2” to “8” at source node.
Option 2: sends SOAP message to sink node with reply
pattern=Response” and last message of group = true.
Command: 2 tcp://localhost:8000
tcp://localhost:9000 {optional groupID}
Option 3: sends SOAP message to sink node with reply pattern=”Callback”
and last message of group=false and replyTo= address where to send response
back.
Command: 3 tcp://localhost:8000
tcp://localhost:9000 replyTo {optional groupID}
Option 4: sends SOAP message to sink node with reply
pattern=”Callback” and last message of group=true and replyTo=address where to
send response back.
Command: 4 tcp://localhost:8000
tcp://localhost:9000 replyTo {optional groupID}
Option 5: sends SOAP message to sink node with reply
pattern=”Callback” and last message of group=false
Command: 5 tcp://localhost:8000
tcp://localhost:9000 {optional groupID}
Option 6: sends SOAP message to sink node with reply
pattern=”Callback” and last message of group=true
Command:
6tcp://localhost:8000 tcp://localhost:9000 {optional groupID}
Option 7: sends SOAP message to sink node with reply
pattern=”Poll” and last message of group =false
Command: 7 tcp://localhost:8000
tcp://localhost:9000 {optional groupID}
Option
Option 8: sends SOAP message to sink node with reply
pattern=”poll” and last message of group=true
Command: 8 tcp://localhost:8000
tcp://localhost:9000 {optional groupID}
WS-ReliableMessaging
|
WSRM
base (distribution) directory: C:\webservices\FIRMS Host
Name: localhost Source
Node port number: 8000 Sink
Node port number: 9000 Database
Configuration File for Source Node: wsrm1.txt Database
Configuration File for Sink Node: wsrm2.txt Source
Database: wsrmdatabaseone Sink
Database: wsrmdatabasetwo |
WsrmSourceConfig.properties
file has database connection parameters for Source Node.
|
Database_JDBC_Driver=org.gjt.mm.mysql.Driver Database_ConnectionProvider=jdbc:mysql Database_ConnectionHost=localhost Database_ConnectionPort=3306 Database_WSRM_Database=wsrmdatabaseone Database_WSRM_username=root Database_WSRM_password=root |
WsrmSinkConfig.properties
file has database connection parameters for Sink Node.
|
Database_JDBC_Driver=org.gjt.mm.mysql.Driver Database_ConnectionProvider=jdbc:mysql Database_ConnectionHost=localhost Database_ConnectionPort=3306 Database_WSRM_Database=wsrmdatabasetwo Database_WSRM_username=root Database_WSRM_password=root |
Users
can change any of above parameters according to the database needs. Here we use
MySql4.1. We already have wsrmdatabaseone and wsrmdatabasetwo databases for
Source Node and Sink Node respectively. For the table structure refer
sqlTableDefinition file. Figure 20shows the table structure for wsrmdatabaseone database
in MySql.
|
|
|
|
|
|
Figure 20 WSRM
database table’s info
4. Running WS-ReliableMessaging Web Services
4.1 Starting Wsrm Source on Filter Pipeline: - We
are assuming that the host is a localhost and port number for Wsrm Source is 8000.
Using ANT build.xml file we can run the target wsrm-node1 by passing arguments
for host name and port number where you want to run the application. Open a
MS-DOS command prompt on the Windows OS and change the directory to your WSRM base
directory (C:\webservices\FIRMS).
Execute the following command from directory.
ant
wsrm-node1 -Dwsrm.source.hostname=localhost -Dwsrm.source.port=8000
-Dwsrm.source.config=config/wsrm/wsrm1.txt
Figure
21depicts the Source Service running on port 8000.

Figure 21: Execution of Wsrm-node1 (Source) command
After successful
execution of the above command type ‘h’
for help at the Wsrm Source and you will see the options available for you to
execute at the Source.

Figure 22: List of commands at wsrm-node1 (Source)
4.2 Starting Wsrm Sink on Filter Pipeline: -
We are assuming host is localhost and port number for the Wsrm Sink is 9000.
Using ANT build.xml file execute the target wsrm-node2 by passing arguments for
host name and port number where you want to run the application. Open a MS-DOS
command prompt on the Windows OS and change the directory to your WSRM
installation directory. Execute the following command from directory.
C:\WebServices\FIRMS> ant wsrm-node2 -Dwsrm.sink.hostname=localhost
-Dwsrm.sink.port=9000 -Dwsrm.sink.config=config/wsrm/wsrm2.txt
Figure
23 depicts the Sink Service running on the port 9000.

Figure 23: Execution of wsrm-node2 (Sink) command
After successful
execution of the above command type ‘h’
for help at the Wsrm Sink and you will see the options /commands available for execution
at the Sink.

Figure 24: List of commands at
wsrm-node2 (Sink)
5. Running
Demo WS ReliableMessaging after starting:
5.1 Creating links between Source and Sink service:
You have to create links
between all applications to open to receive and send data across. Use ‘cr’ command as follows.
From Wsrm Source to Wsrm Sink
cr
localhost 9000
Figure 25 depicts the execution of command “cr localhost 9000”

Figure 25: Execution of "cr localhost
9000" command from Source
From Wsrm Sink to Wsrm Source
cr
localhost 8000
Figure 26 depicts the execution of command “cr localhost 8000”

Figure 26: Execution of "cr localhost
8000" command from Sink
The above mentioned commands
creates links between all applications and you are ready to send and receive
the SOAPMessages between all applications.
Following demo explains Sending
SOAPMessage between two nodes (Source and Sink ) in FilterPipeLine.
5.2 Send SOAPMessage from
source to sink:
From the Wsrm Source,
issue the following command to send a SOAP message
“s tcp://localhost:8000
tcp://localhost:9000 ”
Figure 27 depicts the SOAP message issued by Source
application. 
Figure 27: SOAP message issued by Source
application
This SOAP message
directly goes to Source Node. Source Node adds Sequence Request to the SOAP
message header. Figure 28 shows the SOAP message generated at Source Node.
Finally source node sends this message to Sink node to ensure ReliableMessaging
features.

Figure 28: Create sequence SOAP message generated at Source Node
Sink
node receives the SOAP message with request header. Figure
29 shows the SOAP message received by sink node.

Figure 29: Create sequence SOAPMessage request
received at Sink
Sink
node checks SOAP message header for any errors and ensures all reliability
parameters and sends a create sequence response back to source node. Response
can be a fault or create sequence response. The Figure
30 shows the response SOAP message from sink node to
source node.

Figure 30: Create Sequence response received
at Source from Sink
The source node
receives the create sequence response back from the sink node. It processes the
response. Source Node will generate Reliable Message and send back to the Sink
Node and Figure 31 depicts the WSRM SOAPMessage generated at Source
Node.

Figure 31: Reliable SOAPMessage generated at Source
SOAPMessage
received at the Sink Node in depicted in Figure 32 below.

Figure 32: Reliable SOAPMessage received at
Sink
Sink Node will
process the WSRM SOAPMessage and send acknowledgement back to the Source. Figure 33 depicts the acknowledgement created at the Sink Node

Figure 33: Acknowledgement SOAPMessage created at the Sink
Source
Node receives acknowledgement from Sink node and Figure 34 depicts the acknowledgement received at the Source
Node.

Figure 34: Acknowledgement SOAPMessage received at the Source Node
After
sending the SOAP request message from source to sink and receiving SOAP
response message from sink to source, source and sink database will display the
entry for message.
Figure 35 depicts the “protocolfull” table entry in the “wsrmdatabaseone” database.

Figure 35: protocolfull table entry in
wsrmdatabaseone database
Figure 36 depicts the “protocollight” table entry in the “wsrmdatabaseone” database.

Figure 36: protocollight table entry in
wsrmdatabaseone database
Figure 37 depicts the “protocolstorageoperation” table entry in
the “wsrmdatabaseone” database.

Figure 37: protocolstorageoperation table
entry in wsrmdatabaseone database
Figure 38 depicts the “sequenceinfofull” table entry in the “wsrmdatabaseone”
database.

Figure 38: sequenceinfofull table entry in
wsrmdatabaseone database
Figure 39 depicts the “sequenceinfolight” table entry in the “wsrmdatabaseone”
database.

Figure 39: sequenceinfolight table entry in
wsrmdatabaseone database
Figure 40 depicts the “protocolfull” table entry for “wsrmdatabasetwo”
database.

Figure 40: protocolfull table entry for
wsrmdatabasetwo database
Figure 41 shows the “protocollight” table entry for “wsrmdatabasetwo”
database.

Figure 41: protocollight table entry for
wsrmdatabasetwo database
Figure 42 depicts the “sequenceinfofull” table entry for
“wsrmdatabasetwo” database.

Figure
42: sequenceinfofull table entry for
wsrmdatabasetwo database
Figure 43 depicts the “sequenceinfolight” table entry for
“wsrmdatabasetwo” database.

Figure
43: sequenceinfolight table entry for
wsrmdatabasetwo database