Skip to content

Commit dfb1b9c

Browse files
committed
Changes done for v1.1.1.
1 parent 5624d62 commit dfb1b9c

File tree

13 files changed

+1047
-107
lines changed

13 files changed

+1047
-107
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The streamsx.websocket toolkit provides the following C++ and Java operators tha
1818

1919
If you clone this toolkit from the IBMStreams GitHub, then you must build this toolkit via `ant all` and `ant download-clean` from this toolkit's top-level directory. If there is no direct Internet access from the IBM Streams machine and if there is a need to go through a proxy server, then the `ant all` command may not work. In that case, you can try this command instead. `ant all -Dwebsocket.archive=file://localhost$(pwd)/ext -Dwebsocket.version=0.8.2 -Dboost.archive.src0=file://localhost$(pwd)/ext/boost-install-files/boost_1_73_0.tar.gz`
2020

21-
In a Streams application, these operators can either be used together or independent of each other.
21+
In a Streams application, these operators can either be used together or independent of each other. When they are used in an IBM Streams application, the WebSocket operators in this toolkit generate important metrics data that can be viewed from the IBM Streams web console to observe details such as data transfer time, payload size, number of data items transferred etc.
2222

2323
## Documentation
2424
1. The official toolkit documentation with extensive learning and operational details is available at this URL:

com.ibm.streamsx.websocket/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
Changes
22
=======
3+
## v1.1.1:
4+
* Jan/29/2023
5+
* Fixed a major network performance impact in the ws_data_sender method of all the three WebSocket operators by changing it from a long running thread loop method into a non-thread one shot callable method that can send the text and/or binary data item via active WebSocket connection(s) and return back to the caller immediately after that..
6+
* Added a new tcpNoDelay parameter and a low level socket init handler to all the three WebSocket operators so that the user can turn on or off TCP_NODELAY to control Nagle's algorithm. This new feature will work only with a websocketpp library version 0.8.3 and higher.
7+
* Added a few more metrics for the three WebSocket operators to view send and receive performance numbers in terms of data transfer time and payload size.
8+
* Enhanced the operator documentation with more details about the above-mentioned changes.
9+
310
## v1.1.0:
411
* Nov/19/2021
512
* Fixed a problem in the HttpPost operator where the HTTP GET query string not getting sent to the remote server.

com.ibm.streamsx.websocket/com.ibm.streamsx.websocket.op/WebSocketSendReceive/WebSocketSendReceive.xml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
this operator is still active, any incoming tuple into this operator at that time
3232
will not be sent to the remote server at all. In this case, the application logic
3333
invoking this operator can retransmit that tuple at a later time just because
34-
this operator will keep trying to restablish the connection behind the scenes.
34+
this operator will keep trying to reestablish the connection behind the scenes.
3535
It is a good practice for the application logic to backoff and wait for a
3636
reasonable amount of time when there is a connection error with the
3737
remote WebSocket server before inputting a tuple again into this operator.
3838
Otherwise, it will trigger too many connection attempts on every incoming
3939
tuple to send it to the remote server. So, the application logic should make an
40-
attempt to wait for a while before attempting to send the data after knowing that
40+
attempt to wait for a while before deciding to send the data after knowing that
4141
there is an ongoing connection problem with the remote server.
4242

4343
This operator provides one input port through which an application can send data to the
@@ -56,6 +56,12 @@
5656
non-zero value, then the application can have additional logic to retransmit that same
5757
data item at a later time. Please refer to the output port section below for more details.
5858

59+
Since WebSocket at its low level is based on TCP, you have to be aware of the
60+
effects of the Nagle's algorithm which is usually controlled by TCP_NODELAY.
61+
This operator has an optional parameter named tcpNoDelay to enable or disable
62+
Nagle's algorithm for your needs. The tcpNoDelay parameter will do its job
63+
correctly only with the websocketpp library version 0.8.3 and higher.
64+
5965
Requirements:
6066
* Intel RHEL6 or RHEL7 hosts installed with IBM Streams.
6167

@@ -100,6 +106,30 @@
100106
<description>Indicates the current active status of the WebSocket connection.</description>
101107
<kind>Gauge</kind>
102108
</metric>
109+
110+
<metric>
111+
<name>nTimeTakenToSendMostRecentDataItem</name>
112+
<description>Time taken in milliseconds to send the most recent data item to the remote server.</description>
113+
<kind>Gauge</kind>
114+
</metric>
115+
116+
<metric>
117+
<name>nSizeOfMostRecentDataItemSent</name>
118+
<description>Size of the most recent data item sent to the remote server.</description>
119+
<kind>Gauge</kind>
120+
</metric>
121+
122+
<metric>
123+
<name>nSizeOfMostRecentDataItemReceived</name>
124+
<description>Size of the most recent data item received from the remote server.</description>
125+
<kind>Gauge</kind>
126+
</metric>
127+
128+
<metric>
129+
<name>nTcpNoDelay</name>
130+
<description>Did the user configure TCP_NODELAY for this operator?</description>
131+
<kind>Gauge</kind>
132+
</metric>
103133
</metrics>
104134

105135
<customOutputFunctions>
@@ -274,6 +304,16 @@
274304
<type>float64</type>
275305
<cardinality>1</cardinality>
276306
</parameter>
307+
308+
<parameter>
309+
<name>tcpNoDelay</name>
310+
<description>This parameter can be used to control the TCP Nagle's algorithm. Setting it to true will disable Nagle's algorithm and setting it to false will enable. (Default is false.)</description>
311+
<optional>true</optional>
312+
<rewriteAllowed>true</rewriteAllowed>
313+
<expressionMode>AttributeFree</expressionMode>
314+
<type>boolean</type>
315+
<cardinality>1</cardinality>
316+
</parameter>
277317
</parameters>
278318

279319
<inputPorts>

0 commit comments

Comments
 (0)