This is the first post of my Eclipse Che series I’m going to release during the next weeks. Today’s topic is the fundamental concept of Eclipse Che since it is a completely new and different approach compared to other Eclipse versions.
Eclipse Che was officially released in January 2016. Eclipse Che is a workspace server which comes with a cloud integrated development environment (IDE). Codenvy, IBM, SAP, Red Hat and Microsoft are among the main contributors in this project. But why would anyone want to have a cloud IDE and what are the advantages over a local IDE if you are managing your source code inside repositories anyway? This post will give a short overview of the approach that the Eclipse Foundation has taken with Eclipse Che and why they decided to go for it.
Let’s start with some explanation of the environment and some specific terms which you will hear often in the context of Eclipse Che.
The Che Server is running on an application server like Tomcat anywhere in your infrastructure. With that said, let me just clarify one thing right here:
There won’t be anything coming in or going out of your intranet. Everything you do will stay inside your environment!
The Che Server can hold any amount of workspaces while a workspace may contain any amount of projects and has at least one machine. A project in the context of Eclipse Che is nothing else than a standard development project and can be mapped to a remote repository like a git repository. A machine is a running Docker container that is used to execute projects. One project can be executed on multiple machines to test compatibility with different environments. Machines provide SSH access so you can configure each machine individually.
Fine, there are workspaces, projects and machines, but how and where do I write my code?
The Che Server hosts the IDE. One can access the IDE using a simple web browser. The changes in the IDE are pushed to the server using the provided APIs which themselves call the Workspace Master. The Workspace Master is kind of a replica of an actual workspace which injects data like the installed plug-ins, commands and projects into the workspace. To execute projects, the IDE connects to the machine using the SSH connection. One can (and might have to) define custom execution commands which can contain any valid command of the machine.
Since the IDE is hosted on the Che Server, multiple developers can access the IDE and develop inside the same workspace and even the same project. But be warned: “Che currently uses a last-write-wins policy during simultaneous file access, and will add multi-cursor visuals soon.” (source). For now, this might result in a mess because one user does not see the changes of another user until he refreshes the page. In the future, it is planned for Eclipse Che to work similar to Google Docs. One can see the cursor and the changes of another user in real-time in the same file. But what about scaling since everything runs on the same node right now?
Looking at the official documentation brings up three ways how Che can be scaled to be used by a large number of developers:
- Nginx router: One way is to have a lot of Che instances inside a farm with an Nginx router where each user would have his own instance mapped to his identity.
- Remote Docker container: Another way – which will come soon – is having remote Docker containers. There is no actual need to have Docker running on the same node as the Che Server so it would be possible to install Docker on many other nodes and configure Che to use them instead of a locally installed Docker.
- Codenvy: The recommended way is Codenvy. Codenvy is a Che based multi-tenant and multi-user system distributed by Codenvy, one of the main contributors of Eclipse Che. One downside of Codenvy is that if you have more than 10 users you’ll have to pay for it.
The next post will take a look at the installation and configuration of Eclipse Che. Furthermore, there will be a guide about how you can create workspaces and projects and a short introduction to the IDE itself. Make sure you won’t miss it by subscribing this blog.