vertx-eventbus-bridge-clients icon indicating copy to clipboard operation
vertx-eventbus-bridge-clients copied to clipboard

Add HTTPS long polling or streaming transport

Open PhilLehmann opened this issue 7 years ago • 9 comments

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?

PhilLehmann avatar Sep 24 '17 12:09 PhilLehmann

why would it be better than WebSocket or plain TCP ?

vietj avatar Sep 25 '17 06:09 vietj

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.

PhilLehmann avatar Oct 08 '17 10:10 PhilLehmann

I think we should ask @pmlopes his opinion

vietj avatar Oct 08 '17 14:10 vietj

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.

PhilLehmann avatar Oct 09 '17 10:10 PhilLehmann

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!

PhilLehmann avatar Oct 12 '17 07:10 PhilLehmann

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.

sherrif10 avatar Apr 08 '22 04:04 sherrif10

Hello @pmlopes can you please assigne me to this issue.

sherrif10 avatar Apr 12 '22 11:04 sherrif10

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.

pmlopes avatar Apr 12 '22 19:04 pmlopes

Thanks @pmlopes for clarification

sherrif10 avatar Apr 12 '22 19:04 sherrif10