Open ax3l opened 6 years ago
First if all: What is NGC? Secondly, do you want, that the client is always asking the server for updates via http
instead of keeping a ws
connection open the whole time? In fact that would be possible, but need a new isaac-server
DataConnector
and of course a supporting client. I am not sure whether lws
will helpful at all for this task or whether this new connector should use a different http 1.1
library.
NGC is a cloud service, such as AWS (Amazon) or GCP (Google), with GPUs: https://ngc.nvidia.com/
It's one of PIConGPU's new distribution channels: https://github.com/ComputationalRadiationPhysics/picongpu/pull/2557
Cloud computers are, like HPC compute nodes, not directly reachable from the internet. We can select specific ports (isaac-server) that are forwarded to the outside world on a "secret" (per-container) URL. This forwarding (proxying) on NGC is currently limited to HTTP1.
One can run websockets via long polling on HTTP1 as a (less efficient) fallback. lws
seems to support various protocols (http1, http2, ws, ...) but I am not sure what we need to change in the HTML client for that, maybe we need to include a helper .js
lib.
Okay, it seems to be possible as far as I understand. https://libwebsockets.org/lws-api-doc-master/html/md_READMEs_README_8coding.html I need to investigate this further.
Hey also seem to have new quick-start http/ws examples: https://libwebsockets.org/git/libwebsockets/tree/minimal-examples
I am having a look into this at the moment, but it is not as clear as intended. :laughing:
On the HTML client site, we probably will have to do manual XMLHttpRequest
requests if I don't see something more fancy. (jQuery example)
@theZiz how is your progress? Something in sight? :-)
Not really, I took a look, but I guess I would need to refactor the whole code to a different API. The way I am using libwebsockts I doubt I can add this feature.
Ok. Wonna have, plz.
But, pretty please! We need it desperately to make awesome demos and user tutorials in - da - cloud.
Okay, I took a deeeeep look into lws. It is not possible to just change the protocol and magically http instead of websockets is working. The method = "GET"
option we found is only for clients (I am a ws server) and it meant for pure http connections.
So what are our possibilities?
DataConnector
. For this lws could be used, too, and we already got some experience with lws, so it may make sense. However we need to implement some benefits of websockets ourself, e.g. a heartbeat functionality to work around the statelessness.Writing an independent http
DataConnector
[with the same lwf dependency]
sounds legit.
we need to implement some benefits of websockets ourself, e.g. a heartbeat functionality
Yes, unfortunately we have to do this on the client side. That's what I was referring to above.
Some tunneling approach
I am still talking to them, but they don't do TCP-level tunneling but only on a http/1 proxy which does not yet support UPGRADE
which means no http/2 and no websockets since both rely on it.
Is there a way to use a
http://
fallback inisaac-server
?Some platforms (NGC) do not yet proxy
ws://
(or http2) fully. If we could usehttp(s)://
(http 1.1!) polling on those (and also adjust the HTML client accordingly) this would be awesome, because otherwise we can't simply ship live demos.libwebsockets
should support that as well: https://github.com/warmcat/libwebsockets