Sudu Cloud IDE Backend

Scalable cloud native source code model and language server for IDEs and Github like services

Stage
prototype-ready
Tool Category
productivity
Supported Languages

java 

cpp 
Reason

Store and process huge code graphs in cloud, providing smart features like code navigation, code search, etc. Allows to switch between branches instantly.

Sudu for C++

Next generation technology for C++ developers. Its benefit from advanced distributed cloud native backend technologies. It is compatible with tooling commonly used by C++ developers nowadays, like VsCode and Clangd.

Support of big and hyper big C/C++ projects

Sudu backend services are distributed and horizontally scalable. Sudu uses cloud native storages for its data. Additionally, Sudu applies incremental approach to data structures. So, for any change only tiny amount of data is stored even for huge projects. As a result, Sudu can serve codebase model for repositories with 10+ billions LOC altogether with its history of thousands of Git revisions. Another big benefit is that one can quickly switch between Git revisions w/o downloading full index database or running re-indexing.

Precise code model for projects with cross compilation

Macro is a powerful tool to manage cross compilation in C++ projects. Side effect of its usage are possible issues in code navigation provided by IDE. Sudu addresses code model precision issues by building composite precise code model for all used combinations of compiler configuration options AKA “compilation profile”. User is being asked to define used compilation profiles in a file stored in Git repository.

cpp-comp-profile

Taken this configuration Sudu runs Clangd for all defined profiles, stores its result (code model indexes) and supports aggregation of results. Sudu also supports “compilation profiles” in C++ VsCode extension. Allowing to choose / switch currently used profile, search for usages across profiles.

cpp-vscode

cpp-vscode

cpp-vscode

Advanced code information based on Git historical data

Sudu VsCode extension uses historical data stored for code model elements (classes / methods) to display methods, classes age in UI. Class history tool window provides overview of evolution for all class structure elements.

Sudu for Java

Shared code model as a service, supported history indexing. It provides public API’s, allow to develop lightweight agents (bots)

java-arch-scheme

For more details, see paper

Sudu ClangD

Modified version of well-known clangd LSP server from LLVM project

Problem

The one-to-one client-server model imposed by the LSP specification (and by existing implementations, e.g. clangd itself) limits scalability of the applications and makes it hard to implement and use in a cloud native environment. The LSP server should be statefull according to the specification as it has to track files opened and modified by the client. Even usage of stdin/stdout as the most common LSP transport shows this is hardly scalable. Usually it means that there should be one LSP server instance running per each client session.

Solution

Modify the existing clangd LSP server to make it almost stateless. It still needs to track files opened by the clients, but now it can do this for multiple user sessions and multiple projects. A single clangd instance can serve any number of clients and is limited only by the available system resources. It also does not need to have a local copy of the project repository thanks to Sudu DVFS. And it does not need to build and maintain a local copy of the project’s code model thanks to Sudu Code Model backend. This means that time needed to deploy and launch a new instance of clangd LSP server becomes neglible. And this greatly improves scalability of the resulting solution because new stateless instances of clangd can be launched and stopped on demand depending on the current load and the number of active client sessions.

Features

  • Works with Sudu Distributed File System
  • Code/project models provided by Sudu backend
  • Stateless to support multiple IDE sessions
  • Querying of historical data from code model