Skip to content

Doc: Core, Bedrock and Distribution layers #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions doc/adr/0001-record-architecture-decisions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 1. Record architecture decisions

Date: 2025-04-10

## Status

Accepted

## Context

We need to record the architectural decisions made on this project.
Copy link

@david-monichi david-monichi May 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get more and more lost even I thought I finally got an overview. Important for me would also be for which repositories this ADR's are made/responsible.

In short, till now I referenced always one of following ADR's locations for OpenSCD:

Maybe we can also add an explanation how this existing ADR's are related to this ADR's here? Do this ADR's replace them? Should we collect all ADR's for all repositories in the documentation repository (https://github.com/openscd/Documentation)? Just some ideas ...


## Decision

We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).

## Consequences

See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 2. Core, Badrock and Distribution as base layers of OpenSCD

Date: 2025-04-10

## Status

Accepted

## Context

As a community we would like to have a stable and UI technology agnostic API to use in our plugins and build on top of it.
Current, the name "OpenSCD Core" can lead to misunderstandings. It not only contains and API but it provides a ready-to-go UI, the plugin loading mechanism and other things.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Current, the name "OpenSCD Core" can lead to misunderstandings. It not only contains and API but it provides a ready-to-go UI, the plugin loading mechanism and other things.
Current, the name "OpenSCD Core" can lead to misunderstandings. It not only contains an API but it provides a ready-to-go UI, the plugin loading mechanism and other things.

However, we still need an API and specification, and a a quick way to create and configure a new distribution of OpenSCD.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
However, we still need an API and specification, and a a quick way to create and configure a new distribution of OpenSCD.
However, we still need an API and specification, and a quick way to create and configure a new distribution of OpenSCD.


## Decision

We will split up OpenSCD Core by its focus and target groups:

```txt
┌──────────────────────┐
│ Distribution │
└──┬────────────────┬──┘
│ Bedrock │
└──┬──────────┬──┘
│ Core │
└──────────┘
```

1. Distribution: It is for distributors who want to create a new instance of OpenSCD and tailor it for specific needs through possible configurations.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is in a distribution - is it just a collection of plugins built on top of bedrock or is it more? Does it include bundling/packaging?

Should we show plugins here in relation to a distribution? I feel they should be in this diagram somewhere...

```txt
┌──────────────────────┐   ┌─────────┐
│     Distribution     │<--│ Plugins |
└──┬────────────────┬──┘   └─────────┘      
   │    Bedrock     │   
   └──┬──────────┬──┘   
      │   Core   │      
      └──────────┘      


2. Bedrock: You can use a given Bedrock to build your own OpenSCD distribution. It is a Web Component that you can easily deploy and configure. If you need more or different functionality that you cannot achive by configuring a Bedrock, you can create your own.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we describe what is in bedrock with some concrete examples? For instance:

  • Providing information to plugins for state management
  • Provide basic user interface for undo and redo
  • Provide identity management and back-end integration
  • Provide overall look and feel for distribution

Does it also include

  • Plugin loading? Or is that the distribution? Or is that core?


3. Core: it is mainly for plugin-, bedrock- and distribution developers in the ecosystem to help each other create plugins that are compatible with every distributions and also to create distributions that are compatible with most of the plugins.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Core: it is mainly for plugin-, bedrock- and distribution developers in the ecosystem to help each other create plugins that are compatible with every distributions and also to create distributions that are compatible with most of the plugins.
3. Core: it is mainly for plugin-, bedrock- and distribution developers in the ecosystem to help each other create plugins that are compatible with every distribution and also to create distributions that are compatible with most plugins.


## Consequences

- With the new, simpler Core we can agree on the common API on the code level
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- With the new, simpler Core we can agree on the common API on the code level
- With the new, simpler Core we can agree on the common API at the code level

- Other components and layers are not bound to a specific UI technology
- We aggre on what belongs into the core
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- We aggre on what belongs into the core
- We agree on what belongs into the core

- We have to create a new bedrock with the extracted core functionality