vertx-eventbus-bridge-clients
vertx-eventbus-bridge-clients copied to clipboard
Add HTTPS long polling or streaming transport
It's my understanding that HTTPS streaming (keeping one request open for the server to respond in chunked mode) has the advantage of having less overhead than long polling (with which a server response results in the closing of the HTTPS request and a the creation of a new one) and thus better performance.
Are there any advantages of long polling over streaming?
why would it be better than WebSocket or plain TCP ?
My issue is mainly with corporate firewalls and their defaults for handling WebSockets (not allowing them at all or disconnecting them after a while). The latter issue can be lightened with the auto reconnect mechanism, though each auto reconnect adds protocol overhead (authentication et al).
My thinking was that HTTPS long polling / streaming would be a good fallback for EventBusClient, just as it is for the SockJS JavaScript client, as most firewalls accept outgoing HTTPS connections on 443.
Do you think TCP would be a suitable fallback in this regard? Iam afraid that that simply (mis)using ports 80 / 443 for that would probably trigger firewall reactions on firewalls with packet validation / inspection and other ports might be blocked at all.
I think we should ask @pmlopes his opinion
As netty can currently not handle WebSocket connections over (HTTP) proxy client side (https://github.com/netty/netty/issues/5070), having this as a fallback would help, too.
So tonight I finished this (long polling & streaming, which was surprisingly similar to each other), passing all tests. It even passes TLS + Proxies, which does not work with WebSockets as mentioned above right now.
It is based on the ideas outlined in https://github.com/vert-x3/vertx-eventbus-bridge-clients/issues/19.
As I have another PR open right now, I'd like to gather feedback on that one first - I just started using netty two weeks ago and I expect that there are some fundamental efficiency "faux pas" and other things to fix before moving on. Thanks!
Hello @pmlopes @vietj @PhilLehmann . Thanks for your detailed work, is this work part of outreachy, if Yes can i start working on it as i seek your mentorship.
Hello @pmlopes can you please assigne me to this issue.
Hi @sherrif10 you can work on this if you wish. Technically I can't assign it to you because GitHub requires you to be a member of the vertx committeers group first.
Thanks @pmlopes for clarification