After some more digs into the source of notebook's 
service/kernelmanager/handler/session, I find the relationship are as follows.

1: Session keeps the record and relationship of ipynb and kernel,it will do 
kernel startup and release and handling web session create.
2. Kernel part looks like only have interact with kernel's four port, that's 
hb/stdin/iopub ports.

And KernelManage is just a container(interface) which contains these four 
ports, and notebook do only expect to use these ports to run command(to be more 
specific shell port for sending cmd and iohub for stdin/stout/steer).
A BlokgingJupyterClient is what a KernelManager generates from kernel-pid.json 
,it will bind the tcp port connection to zmq communications.

So I guess If I would like to let notebook directly talk to a ipykernel, I need 
to 
1: Create a ipykernel, and create a kernel.json config file
2: Use KernelManage to load the config,and create a BlockingClient, 
start_channels && wait_for_ready()
3:  Wrap this client object all other functions what needed by notebook(like 
restart callback etc.)

So to sum up. In MultiKernelManager , create out a wrapped 
BlockingKernelClient(interface like KernelManager) which in charge of talk to 
ipykernel broker, and expose four ports ZMQStream, and expose this to 
start_kernel method of MultiKernelManager. Is that right?

Currently the biggest confuse I think is why a Client() is generated by a 
KernelManager, and KenrelManager does have connect_shell/hb/ioputs, and so does 
a Client instance. 
For client instance, it usages shell.execute to communicate with the ipykernel. 
And for KernelManager, my guess is it will directly talk to the 
subporcess,which those ports should be useless, so under this circumstance, 
what does those ports used for?

Don't know if my understanding are correct, now I'm already get the jupyter 
running on the device, but always fails at receiving kernel info from the 
server(on the top right banner it have shown connected, and no further actions 
can be run here).

Hope anyone can get me some directions so I can jump into :)

Best,
EmiNarcissus

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/0c39786a-d82b-4ccd-afab-aa762ef125d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to