Skip to content
GitLab Next
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 43,874
    • Issues 43,874
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,383
    • Merge requests 1,383
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.org
  • GitLabGitLab
  • Issues
  • #16069
Closed
Open
Created Oct 03, 2016 by Sid Sijbrandij@sytsesOwner

IDE / editor with a local editor via mirroring / sync

So far online IDE's have not been very popular. The team members of GitLab prefer to use their existing local editor, even when working on a remote development environment.

Instead of putting the online editor first https://gitlab.com/gitlab-org/gitlab-ce/issues/22863 we can alterntively have the local editor as the primary use case.

The advantage of a local editor and a remote development environment over a completely local environment using docker are:

  1. Use a similar environment as production
  2. Quickly switch between projects (no need to boot them, they are running already)
  3. Use less RAM
  4. Use less CPU
  5. Use less battery
  6. Have more horsepower available (mostly RAM)
  7. Easy to share the same edits in realtime with a team member

When using a VM the advantages are not as big. It takes time to spin up and is commonly as powerful as a laptop. Only now that we have container schedulers the load can be spread among machines. Apart from running faster it can also make tests and builds faster by parallelizing them. An 'online IDE' is not about online editing nor about a special development environment. It is about running your environment in the cloud. But the editor can be local and it should resemble production instead of a special development environment. Also see https://gitlab.com/gitlab-org/gitlab-ce/issues/23966

The requirements are:

  1. Sync with the remote filesystem
  2. Easy to set up
  3. Boring technology
  4. Reusable for the online editor
  5. Preferably no unfamiliar client on my system

I propose to use unison, a proven, familiar, and popular cross-platform file synching solution. It is easy to install on many platforms, for example on MacOS it as a homebrew formula.

We show the user a list of commands to set up unison and a mirrored directory.

Problems:

  • Remote usage requires an ssh connection http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html to the container
  • Probably we'll have to establish a tunnel https://github.com/koding/tunnel to reach the container
  • You have to monitor the filesystem with something like fswatch (inspired by https://github.com/leighmcculloch/docker-unison ) to run unison

It seems that Koding already solved these problems so maybe we can reuse the kd client. The Koding KD client as detailed on http://www.koding.com/docs/connect-your-machine is something I can't find the source code of. I tried following https://kodi.ng/d/kd to https://koding-kd.s3.amazonaws.com but https://github.com/koding/kd seems to be something different (a UI framework) as does https://github.com/koding/broker-client

Alternatives:

  1. Only offer an online IDE
  2. Use the terminal solution for executing commands on the docker container to start and sync unison
  3. Run the web editor web server on the container itself

/cc @jschatz1

Edited Aug 14, 2020 by 🤖 GitLab Bot 🤖
Assignee
Assign to
Time tracking