jupyter / nb2kg

Other
73 stars 31 forks source link

More than one ip:port for KG_URL #46

Open wkorz opened 4 years ago

wkorz commented 4 years ago

I found that KU_URL should have only one ip:port like this export KG_URL='ipA:8888' I want to do llike this: export KG_URL='ipA:8888, ipB:8888, ipC:8888' what should I do

kevin-bates commented 4 years ago

Your observation is correct, only one IP/Port is currently supported by a given NB2KG configuration.

What is it you would like to do with multiple destinations? How would the client launching a kernel specify the ultimate destination where the kernel should be managed?

Understanding your use case would be helpful. Thanks.

DonneyF commented 4 years ago

Hi Kevin,

A use case I was investigating and demo-ing with Enterprise Gateway is the ability for a single JupyterHub server to connect to remote kernels with specific hardware attached to those servers (think instruments and sensors). In this case there is a deliberate relationship between the kernel and the hardware it's running on, which may not be true with data science applications that use cloud clusters. So with Enterprise Gateway I was able to show that a JupyterHub instance running on some VM was able to connect to my local PC and pull images from my webcam without directly exposing the webcam to the internet. Now I'd like to extend this functionality to multiple local PCs if you will (i.e. remote kernels) and the user can launch a specific kernel that we've configured knowing exactly what hardware is available for them to use.

I'm not sure if this or Enterprise Gateway is the solution to this problem, so I'm still searching.

Thanks!

kevin-bates commented 4 years ago

Hi @DonneyF - what an interesting use case!

NB2KG is just a notebook server extension that turns the notebook server to which it's associated into a client of Enterprise (or Kernel) Gateway and is essentially obsolete since Notebook 6.x has this functionality builtin.

Yes, this would be more related to Enterprise Gateway and we should probably move this discussion to https://github.com/jupyter/enterprise_gateway. EG exposes the /api/kernels REST API and I wonder if having your own client of that API would be more applicable here - unless you drive these remote "sensors" using code from a notebook.

I'd like to get more information from you to see how we might be able to move you forward here, so please open an issue in the EG repo and we'll go from there.

(Sorry, I would normally use the git 'transfer' function here, but we should leave the original issue here. Please restate your use case on the new issue.)

kevin-bates commented 4 years ago

@wkorz - ping (would like to hear more about your use case).