Part of OpenDreamKit’s mission is to work on user interfaces for better collaboration and also component architectures. This is why the SageMathCloud platform is of special interest for us. One of our tasks is even to have a deeper look into its code base. In this post, as part of our Review on emerging technologies, we propose an overview of the platform.
What is SageMathCloud?
Its codebase is open-source, distributed under the GNU General Public License. The platform is run by a private company (SageMath Inc.) created by William Stein who is also the initiator of the SageMath software. The platform offers both free and paying premium accounts.
The main tool of the SageMathCloud platform is the possibility to create projects from which you can access the many features. A single user can create as many projects as needed. Each project is an independant Linux virtual machine. It thus comes with a full file system and an online terminal that allows you to run Linux commands. The storage of each project is limited by default but can be extended on premium accounts. You can access the files through the SageMathCloud web interface or also through ssh.
One key feature is that each project can be shared by multiple users. This allows sharing access to the files and also real time editing though the platform. Single files or folders can also be made public. A link is then provided which allows either viewing or downloading the files (even without a SageMathCloud account) and also an easy way to copy onto a different SageMathCloud project owned by the viewer.
When you create a SageMathCloud project, your Linux virtual machine comes with many softwares and tools especially useful for mathematicians and scientists in general. We list here the most important ones.
Sage and Sage worksheets. As the name indicates, the platform was primarily developed as a replacement for the old Sage notebook server to allow collaborative online work using Sage. The SageMath software is of course installed by default on the virtual machine and one can run Sage through the online terminal. The platform also offers its own Sage worksheet filetype to edit and run Sage code in a cell-type system (as in the Jupyter notebook or the old Sage notebook) mixed with other cell types like text and HTML. This is used to create interactive worksheets that can be easily shared and copied.
Jupyter. SageMathCloud includes a Jupyter notebook interface with many kernel options (Python 2, Python 3, Anaconda, Sage, R, Julia, and more). On top of the usual interface, SageMathCloud’s Jupyter offers real time synchronization among multi users.
Latex. The common document preparation system Latex is installed on the virtual machine. It also offers a multi user editor with real time synchronization and a dual view of both the Latex source code and pdf output.
Notebooks: SMC, Sage and Jupyter
SageMathCloud offers very inovative features in terms of notebooks which should be studied both on technichal and usability aspects.
Real time notebooks. Real time multi user synchronization is a key aspect of SageMathCloud development. In particulatr, it has been a motivation for the development of SageMathCloud homemade Sage worksheet. More recently, it has also been added to the Jupyer notebook by enhancing the original software. This enhancement is of particular interest for OpenDreamKit as this could benefit all Jupyer users.
Muli-kernel, multi-client. The multi-kernel philosophy is an inherent part of Jupyer development. Indeed, Jupyer is a notebook interface that can be used with many different language kernels (python, Sage, Julia, and more). SageMathCloud follows the same spirit and offers a variety of kernels on the Sage worksheet. One advantage of the Sage worksheet is that it allows for many kernels to be used in different cells of one single worksheet (in Jupyer, the kernel has to be chosen once and for all for the entire worksheet). Furthermore, SageMathCloud has developed what they call the Jupyer bridge: allowing user to run a Jupyer kernel from within a Sage worksheet. In this sense, the Sage worksheet could be seen as alternative client to Jupyer the same way one can develop alternative kernels. More on this question can be read on the github page of SageMathInc.
Sharing and teaching with SageMathCloud
The great advantage of SageMathCloud is that it offers a complete scientific environment without the usual setting up hassle. It makes the different software very easy to access independently of the user personal system as long as there is an access to a good Internet connexion. As an example, a mathematician can share a demo of code (in a Jupyter or a Sage notebook) that could be used directly by its collaborators. Of course, the Internet access is itself a limit. Given poor network access, for example but not only in some developing countries where bandwidth is sometimes limited.
When teaching is concerned, the sharing facilities of SageMathCloud come very useful. Moreover, the platform offers a course managing system. The principle is as follows: the teacher has acces to a “main project” containing the class material; every student has its own project which is shared with the teacher. The course management system allows for automatic actions like:
- Create all the student projects where the teacher is automatically added as a collaborator.
- Create assignments by copying some material from the main project to the students projects.
- Collecting, grading, and returning assignments by copying back and forth between the students projects and the main project.
An assignment is just a folder. It can have multiple content depending on the class. Of course, the system is especially interesting when the assignment is given within an interactive worksheet and can then be achieved by the student directly on the interface. SageMathCloud then becomes a very good interface to initiate students to the many scientific softwares it offers.
SageMathCloud and OpenDreamKit
The many features of SageMathCloud make it a very interesting project for OpenDreamKit to look at. Indeed, it offers one of the leading technologies for scientists in terms of cloud project management, teaching and sharing facilities. In particular it showcases a collection of features that have been selected and adopted by a wide community.It also has some limits which we would like to address through our project:
Accessibility. As previously mentioned, the cloud based interface can not be easily accessed in places where the Internet connexion is not good enough. One solution would be to have clear easy-to-follow instructions on how to install a SageMathCloud platform in a local institution or on a personal machine. This is to be taken care of in D3.2 and D3.4.
Interoperability and file formats. At the moment, the SageMathCloud platform offers two file formats for interactive worksheet: the Jupyter one and a home-made Sage worksheet one. It is not possible to run the Sage worksheets elsewhere than on the platform. Especially, there is no way to run a Sage worksheet on a local Sage installation. It is not yet clear what a long term unified worksheet solution would be and it is part of the OpenDreamKit project to work on this question. The technical choices made for the Sage worksheets are interesting to investigate in this regard, as well as, file conversions and so on.