|
31 | 31 | this operator is still active, any incoming tuple into this operator at that time |
32 | 32 | will not be sent to the remote server at all. In this case, the application logic |
33 | 33 | 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. |
35 | 35 | It is a good practice for the application logic to backoff and wait for a |
36 | 36 | reasonable amount of time when there is a connection error with the |
37 | 37 | remote WebSocket server before inputting a tuple again into this operator. |
38 | 38 | Otherwise, it will trigger too many connection attempts on every incoming |
39 | 39 | 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 |
41 | 41 | there is an ongoing connection problem with the remote server. |
42 | 42 |
|
43 | 43 | This operator provides one input port through which an application can send data to the |
|
56 | 56 | non-zero value, then the application can have additional logic to retransmit that same |
57 | 57 | data item at a later time. Please refer to the output port section below for more details. |
58 | 58 |
|
| 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 | + |
59 | 65 | Requirements: |
60 | 66 | * Intel RHEL6 or RHEL7 hosts installed with IBM Streams. |
61 | 67 |
|
|
100 | 106 | <description>Indicates the current active status of the WebSocket connection.</description> |
101 | 107 | <kind>Gauge</kind> |
102 | 108 | </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> |
103 | 133 | </metrics> |
104 | 134 |
|
105 | 135 | <customOutputFunctions> |
|
274 | 304 | <type>float64</type> |
275 | 305 | <cardinality>1</cardinality> |
276 | 306 | </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> |
277 | 317 | </parameters> |
278 | 318 |
|
279 | 319 | <inputPorts> |
|
0 commit comments