WebSocket Emulation mechanism in TIBCO Web Messaging for TIBCO EMS (TWM).
book
Article ID: KB0091183
calendar_today
Updated On:
Products
Versions
TIBCO Web Messaging for TIBCO Enterprise Message Service
-
Not Applicable
-
Description
Resolution: Description: ============ WebSocket Emulation mechanism in TIBCO Web Messaging for TIBCO EMS (TWM).
Environment: =========== All versions of TIBCO Web Messaging for TIBCO EMS
Resolution: ==========
Native WebSocket is not widely support in many mainstream programming languages or browser clients. For those clients, TWM use two HTTP request channel for emulating WebSocket-like duplex communication.
Those two HTTP request channel are described as "upstream" and "downstream":
Upstream is the channel in which TWM client will send HTTP request to server. Typical it will be used when clients request connecting to the TWM server, client subscribe/un-subscribe to a destination and client close the connection
Downstream is the channel that TWM uses to push data to the client. Due to the nature of the HTTP protocol, it is impossible for the server to actively push data to a client. In this case, TWM maintains a long-live HTTP connection and sends HTTP 1.0 responses without a content-length header. To "push" data to a client, the TWM server adds the data to the response body within the same HTTP connection. The client shall expect more data coming from the server side since it does not have the information of the content-length.
1). Initial Request
POST /;post/jms/;e/cb HTTP/1.1
TWM return two URLs which are called the "upstream" resource and the "downstream" resource.