[IPython-dev] Kernel-client communication
Fri Sep 3 05:12:51 CDT 2010
On 3 September 2010 11:18, Hans Meine <firstname.lastname@example.org> wrote:
> Am Freitag 03 September 2010, 10:30:29 schrieb Almar Klein:
> > * You plan on keeping history in the kernel. In this case I think this is
> > the task of the client. Otherwise you'd get your own history mixed with
> > that of someone else using that kernel? History is, I think, a feature of
> > the client to help the programmer. I see no use for storing it at the
> > kernel.
> That's an interesting issue. Some more random thoughts:
> - If you decide to connect to an existing session (from home or the bar via
> your smartphone) to check something and/or issue a command, it is very
> to reuse your existing history -> should be in the kernel
You're right, that makes sense too.
> - If you are using only one frontend/client, it does not matter anyhow,
> - If the kernel is busy, it could still be useful to browse through the
> history to compose the next command(s) -> should be in the client?
Well, the kernel could be implemented in such a way that messages are
received in a separate thread, which may also handle the introspection
requests. Introspection (+history) will then still work if the process is
busy (unless it's running extension code).
- In the multiple GUI/observer scenario, I think it would not hurt to share
> the history with the observer either -> could be in the kernel
> Is there any other reason to have the history in the client, Almar?
> Otherwise, I's say of course it's a feature of the client, but obviously
> are good reasons (in particular when detaching/attaching) to have the
> be stored in the kernel. Maybe it needs to be duplicated/synchronized to
> support situations where the kernel cannot respond, though.
It seemed intuitively more correct (it still does, to me), but in practice
it may be better to store it in the kernel. Thanks for enlightening me!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev