vidartf / phoila

BSD 3-Clause "New" or "Revised" License
9 stars 5 forks source link

Allow opening comm connections #11

Closed saulshanabrook closed 5 years ago

saulshanabrook commented 5 years ago

helps on https://github.com/vidartf/phoila/issues/7.

Using this I can create a labextension that communicates over comms:

Screen Shot 2019-10-21 at 12 17 05 PM
vidartf commented 5 years ago

This PR should also be opened against the main voila repo (this code is just vendored on a temporary basis).

vidartf commented 5 years ago

Note: There might be an argument against opening comm's from the client side (although there are clearly strong arguments for allowing it), as it might allow arbitrary code execution from the client side.

saulshanabrook commented 5 years ago

Note: There might be an argument against opening comm's from the client side (although there are clearly strong arguments for allowing it), as it might allow arbitrary code execution from the client side.

Aren't we kinda forced to open them from the client side in a mime renderer? Otherwise, when would the server open the comm? We need a listener on the client registered before the server would open it.

I mean it doesn't matter to me really how it's done, I just need bidirectional communication from frontend to backend. Whatever way we decide is the sanctioned way to do that, I am happy to adopt. See some longer thoughts here ("Protocol Agnostic") https://github.com/Quansight/ibis-vega-transform/issues/14

This PR should also be opened against the main voila repo (this code is just vendored on a temporary basis).

OK I will open one there as well.

vidartf commented 5 years ago

Probably also add comm_close, and then we can merge, since this was merged upstream