Rapid Publishing of Messages on PubNub. You can publish message efficiently using this mechanism. How efficient you ask? This method allows you to publish upwards of 30 messages Per TCP Packet. Wow!
Sending messages in parallel and in a Single TCP Packet (one Ethernet Frame) is really easy with PubNub HTTP Pipelining! We provide an example below of the Socket level data you send per message. Note that we support the full Pipelining mechanism for HTTP Pipelining. You may send serially on a single socket without waiting for the response and the responses return in order.
Essentially -- To really make this happen with top tier performance you would follow this recipe:
GET /publish/<PUB_KEY>/<SUB_KEY>/0/<CHANNEL>/0/<PAYLOAD> HTTP/1.1\r\n Host: pubsub.pubnub.com\r\n\r\n
GET /publish/demo/demo/0/chan/0/"ONE" HTTP/1.1\r\n Host: pubnub\r\n\r\n GET /publish/demo/demo/0/chan/0/"TWO" HTTP/1.1\r\n Host: pubnub\r\n\r\n GET /publish/demo/demo/0/chan/0/"THREE" HTTP/1.1\r\n Host: pubnub\r\n\r\n
This following example will show you what publishing three messages in a single TCP Packet may look like. You should test this directly in your Terminal Window via TELNET app.
telnet pubsub.pubnub.com 80 GET /publish/demo/demo/0/my_channel/0/"ONE" HTTP/1.1 Host: pubnub GET /publish/demo/demo/0/my_channel/0/"TWO" HTTP/1.1 Host: pubnub GET /publish/demo/demo/0/my_channel/0/"THREE" HTTP/1.1 Host: pubnub