Using IPython notebooks to teach Python

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Using IPython notebooks to teach Python

Ramalingam Saravanan-2
Hi Sébastien,

The multi-user IPython server would be the best option for your needs, but here are some alternatives:



    https://github.com/mitotic/graphterm (my own project; somewhat experimental)

Here's a paper from SciPy14 proceedings that discusses these alternatives:


Best,
Saravanan


On Thu, Aug 21, 2014 at 4:55 PM, Sébastien Hinderer <[hidden email]> wrote:

> Dear all,
>
> My team currently studies the possibility to use IPython notebooks in a
> Python Mooc, more precisely for doing exercises. Teachers would prepare
> the questions in a notebook and students could answer the questions
> directly in the notebook itself. Actually, we would provide one copy of
> the original teacher's notebook for each student, so that all of them have
> their own notebook on which they can work independently.
>
> What I'm trying to study here is the server's security. How to prevent
> students from both doing malicious things on the server and accessing /
> modifying the notebooks of other students.

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Using IPython notebooks to teach Python

Clare Sloggett

Wakari (wakari.io) is another free service with fairly quick sign-up. I've used Wakari and SageMathCloud as backup options for when a student had an issue with the uni infrastructure. 

My understanding is that these services manage security is to provide each user with their own virtualised environment so they can't really do any harm, and that this can be something lightweight, like docker.

If you're going to use a service outside your institution you might want to watch out for websocket proxying issues.. I've run into these problems in some places!


On 23 August 2014 10:24, Ramalingam Saravanan <[hidden email]> wrote:
Hi Sébastien,

The multi-user IPython server would be the best option for your needs, but here are some alternatives:



    https://github.com/mitotic/graphterm (my own project; somewhat experimental)

Here's a paper from SciPy14 proceedings that discusses these alternatives:


Best,
Saravanan


On Thu, Aug 21, 2014 at 4:55 PM, Sébastien Hinderer <[hidden email]> wrote:

> Dear all,
>
> My team currently studies the possibility to use IPython notebooks in a
> Python Mooc, more precisely for doing exercises. Teachers would prepare
> the questions in a notebook and students could answer the questions
> directly in the notebook itself. Actually, we would provide one copy of
> the original teacher's notebook for each student, so that all of them have
> their own notebook on which they can work independently.
>
> What I'm trying to study here is the server's security. How to prevent
> students from both doing malicious things on the server and accessing /
> modifying the notebooks of other students.

_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev



_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Using IPython notebooks to teach Python

Sébastien Hinderer
Dear all,

First of all, let me thank all those who have provided so useful
responses to the question about setting up a multi-user notebook server.

Basically, we will do it as all of you seem to have done it: creating a
Unix account for each user so that security relies on Unix permissions.
Technically, we will write our own scripts but they will definitely
devrive from existing work, so thanks again for having provided
valuable resources.

One issue I'm curious about and that did not seem to be addressed in the
resources I explored is the termination of webserver and
kernel processes. Since we develop the solution in the context of a
MOOC, there is the possibility of having plenty of users. So, letting
all the processes run forever does not seem an option. There is
indeed a limit in how many processes can run simultaneously on a system
and, perhaps even more importantly, the number of available TCP ports is
even smaller than that. Of course, the transpor beween web servers and
kernels can be set-up to use Unix local sockets, but the webservs will
all need a different port so if they are kept alive that means a limit
on the number of users.

Perhaps one possibility here would be to have a web server running in
front and redirecting connections to the notebook severs, based on a URL
prefix or a similar solution. Not sure whether/ how this can be
implemented, though.

Another suggestion, regarding IPython 3.0, would be to provide
configuration parameters to let a kernel and a web server stop after
some given idle time, or something like that.

Any comment on this aspect will of course be welcome!

Bes wishes,
Sébastien.


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev
Reply | Threaded
Open this post in threaded view
|

Re: Using IPython notebooks to teach Python

Matthias Bussonnier
Hi, 

Please have a look at 
and


This is what will be used for IPython multi-user.

Le 28 août 2014 à 09:05, Sébastien Hinderer <[hidden email]> a écrit :

Dear all,

First of all, let me thank all those who have provided so useful
responses to the question about setting up a multi-user notebook server.

Basically, we will do it as all of you seem to have done it: creating a
Unix account for each user so that security relies on Unix permissions.
Technically, we will write our own scripts but they will definitely
devrive from existing work, so thanks again for having provided
valuable resources.

One issue I'm curious about and that did not seem to be addressed in the
resources I explored is the termination of webserver and
kernel processes. Since we develop the solution in the context of a
MOOC, there is the possibility of having plenty of users. So, letting
all the processes run forever does not seem an option. There is
indeed a limit in how many processes can run simultaneously on a system
and, perhaps even more importantly, the number of available TCP ports is
even smaller than that. Of course, the transpor beween web servers and
kernels can be set-up to use Unix local sockets, but the webservs will
all need a different port so if they are kept alive that means a limit
on the number of users.

Perhaps one possibility here would be to have a web server running in
front and redirecting connections to the notebook severs, based on a URL
prefix or a similar solution. Not sure whether/ how this can be
implemented, though.

This is what above link do. 


Another suggestion, regarding IPython 3.0, would be to provide
configuration parameters to let a kernel and a web server stop after
some given idle time, or something like that.


Probably not. 
as you are in control of the server/proxy, you can have a 
deamon that monitor the connexion and send the rest command
 to shutdown with the logic you like. 

It will be much more reliable and flexible than baking in all the imaginable logic in IPython.

Any comment on this aspect will of course be welcome!


We will be happy to get help on the developpement of this, 
The current funding of IPython is (as far as I know) coming to 
an end at the end of this year, so  we cannot promise that things 
will continue to move fast in the future. 

If your MOOC as a lot of audience and you use IPython/Python a lot, 
please consider proposing your hierarchy to give something to Python community. 

Be aware that isolating user on the server-side using container or alike is 
not the hard part of the security issue in using IPython.
The hard part is on the browser side. 

To anyone that say that container are used on server-side for security, 
be aware that what you say is equivalent to say :

«  The server of your bank is in a vault with 5 ton door, of course you can 
 send plain text email with your credit card number to any people that claim 
         to be the server, no one can access this server »

The risk is js injection in the browser, if it is a MOOC, steeling credential, replaying cookie auth,
CORS on web socket, and so on and so forth. 
— 
M



Bes wishes,
Sébastien.


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev


_______________________________________________
IPython-dev mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-dev