The language server protocol has several implementations for various technologies. Their communication protocols are low level like socket to socket and stdin/stdout. In addition they are targeted at running on the developer machine and not on cloud environment. cloud-language-servers-container is a wrapper server that can run inside an isolated container. It exposes language servers functionality through web socket and REST APIs. The solution covers exposing the language servers, synchronization of source code, security aspects, isoation, etc.
- Converting socket/stdin/stdout/etc. into websocket
- Start and stop LSP specific implementations per project/language
- Sync workspace changes and call LSP protocol relevant notifications accordingly
- Manage security tokens life cycle
cloud-language-servers-container should run in a JEE container such as Tomcat or Jetty. cloud-language-servers-container integration tests require ruby installation (see below). For integration with CloudFoundry there should be an available end point, org and space in CloudFoundry to deploy there the server as a Java application.
The server is designed to run in a container dedicated for a single user workspace. Specific language servers should be installed and configured via environemnt variables. For CloudFoundry there is a dedicated buildpack responsible for this setup with support currently for java LSP.
In order to build and run cloud-language-servers-container in CloudFoundry follow these steps from command line:
- Download Maven
- Install Cloud Foundry Command Line Interface
- Run
mvn clean install
- Run
cf login
to login to cloud foundry endpoint, org and space - Run
cf push
- An application named
lsp
should be created with a running cloud-language-servers-container
- Find your IP
- Update environemnt variables in cf:
JAVA-OPTS
(correct the IP) andJBP_CONFIG_DEBUG
according to https://github.com/SAP/cloud-language-servers-container/blob/master/manifest.yaml#L12-L13. If push is done from another server populate these environment variables using the debugger - After push to CF run from terminal:
cf ssh -N -T -L 8000:localhost:8000 <app-name>
- Use your favorite IDE to remote debug localhost with port 8000
Mocha integration tests are dependent on ruby mock language server.
- Set variables in user env for all variables configured in travis
- install ruby using RubyInstaller
mvn install -Pintegration-test
mvn jetty:run -Pintegration-test
cloud-language-servers-container is integrated fully in CloudFoundry using the language server buildpack. However there is a small gap for full integration on local machine or Docker.
- Memory footprint for JEE server is substantial when each user workspace gets his own server instance.
- rsync or websocket interfaces might have better performance than the current HTTP REST (for a setting that require sync)
For bugs, questions and ideas for enhancement please open an issue in github.
- Coplete travis integration
- Setup official releases
- Make integration tests also work on windows
- Easy automated way to install cloud-language-servers-container together with language servers on local machine
- Remove CloudFoundry specific code
Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file