Eclipse GLSP 1.0: Separation of concerns and flexible data sources

August 3, 2022 | 3 min Read

In this article, we highlight a new feature of the Eclipse GLSP 1.0 release: The flexible architecture to integrate arbitrary data sources and model management frameworks. For a general overview of the GLSP 1.0 release and other notable features, please see the GLSP 1.0 release announcement.

Eclipse GLSP is a framework for efficiently building web-based diagram editors and makes it easy to embed them into Eclipse Theia, VS Code, Eclipse desktop or even an arbitrary web page. Please visit the Eclipse GLSP website to learn more.

Diagrams are often not “just drawings” but are usually connected to some sort of data source under the hood. As a common example, there is often an underlying domain model that captures the respective domain data of a diagram. If for instance the diagram shows a process in a flow chart, the actual process steps and their connections might be stored in a database that is then used for executing the defined process later on. The diagram itself is just an editable visual representation of the underlying data for the end-user.

Eclipse GLSP maintains a strict separation of concerns about the following three parts of a diagram editor solution:

  • Diagram client: Responsible for rendering the diagram and direct user interactions.
  • Diagram server: Responsible for the editing logic of the diagram editor, including the coordination between a diagram and its data source, called the source model
  • Source model: Represent the underlying data model of a diagram.The source model can be managed either by the GLSP server itself, or by an external component, modeling framework, etc.

The split between GLSP Server and source model provides you with full freedom on where your domain data comes from and how it is managed. Your diagram could work on a simple JSON File, on an EMF Model,  custom file formats, or even on data of an external database or REST service. The same concept applies to model-specific features such as validation.

Consequently, GLSP supports all use cases, from simple JSON files that are managed directly within your GLSP server without an external data source component, usages of existing modeling or data management frameworks, through to the integration of external data services of your company’s infrastructure.

For some popular combinations, e.g. JSON, EMF and the model server, GLSP even provides ready-to-use integrations and examples to get you jump started.

As you can see, the architecture of GLSP is prepared for the integration into modern, distributed and loosely coupled toolchains. Starting from a very simple diagram without any external sources to a full integration into your company’s infrastructure, everything is possible.

If you want to integrate a GLSP diagram editor into your custom environment, we provide you with professional support for GLSP. Further, if you have any questions about Eclipse GLSP, please get in touch with us! EclipseSource provides support and training for building custom diagram editors using Eclipse GLSP and for building custom IDEs or tools based on VS Code or Eclipse Theia.

Jonas, Maximilian & Philip

Jonas Helming, Maximilian Koegel and Philip Langer co-lead EclipseSource. They work as consultants and software engineers for building web-based and desktop-based tools. …