Websocket Long-polling fallback

375 views
Skip to first unread message

Che Yonggang

unread,
Jan 30, 2019, 12:11:37 PM1/30/19
to vert.x
Our current Websocket application is quite simple, only one endpoint.

Now we have requirements to support long-polling fallback when websocket is blocked or unable to use.
After reading some articles, it seems to me that if running websocket over TLS (wss://) then no proxy/firewall should block websocket connection, but not sure about that.

Do you have some patterns to implement long-polling fallback within Vertx?

Julien Viet

unread,
Jan 30, 2019, 4:12:20 PM1/30/19
to ve...@googlegroups.com
Hi,

you can look at the SockJS socket that provides this feature.


Julien

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/11c2d01f-3dc0-4dd9-befd-ca135b60fd86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Che Yonggang

unread,
Jan 31, 2019, 9:20:52 AM1/31/19
to vert.x
Thanks Julien, will have a look.

Che Yonggang

unread,
Feb 1, 2019, 11:04:14 AM2/1/19
to vert.x
Any suggestion on how to test the SockJS long-polling fallback in UT (without opening browser)?

Thomas SEGISMONT

unread,
Feb 1, 2019, 11:28:29 AM2/1/19
to ve...@googlegroups.com

I'm not a SockJS expert but I believe long polling works on /xhr_stream endpoint, not just /xhr.

Che Yonggang

unread,
Feb 1, 2019, 12:35:44 PM2/1/19
to vert.x
Thanks.

So if the request URI end with xhr meaning it is intended to do long-polling? Interesting
client.post("/test/400/8ne8e94a/xhr" client.post("/test/400/8ne8e94a/xhr_send"

Reply all
Reply to author
Forward
0 new messages