Dendron Engine Architecture
Components
From Engine
Go to text ā
The engine is the main interface into the core dendron functions (lookup, rename, delete, etc).
Lifecycle
From Lifecycle
Go to text ā
Initialization
This goes into details of the startup sequence when Dendron first loads
sequenceDiagram
participant vscodePlugin
participant EngineAPIService
participant apiServer
participant engine
participant store
participant fileSystem
participant noteParser
rect rgb(150, 170, 150)
vscodePlugin->>EngineAPIService: creates
EngineAPIService->>apiServer: initialize
note right of vscodePlugin: plugin
end
apiServer->>engine: initialize
rect rgb(150, 170, 150)
note right of engine: local server
engine->>store: initialize
store->>fileSystem: fetchAllnotes
fileSystem->>store: sendNotes;
store->>noteParser: parseAllNotes
noteParser->>store: parsedNotes
store->>engine: return resp
end
engine->>apiServer: return resp
rect rgb(150, 170, 150)
note right of vscodePlugin: plugin
apiServer->>EngineAPIService: return resp
EngineAPIService->>vscodePlugin: return resp
end
Trace
- src/extension.ts: activate {
Logger.configure(context, "debug")
}
- src/_extension:activate - ... - startServerProcess
Details
These are some implementation details for further reading
See the Video walkthrough that goes through initialization in detail
It covers the following components:
- vscodePlugin
- EngineAPIService
- created in ../packages/plugin-core/src/_extension.ts (Private)
- implements DEngineClient interface for engine -> ../packages/common-all/src/types/typesv2.ts (Private)
- apiServer
- in production, we launch
apiServer
in a separate process, but if not, we run everything in same process. see ../packages/plugin-core/src/_extension.ts (Private)
- in production, we launch
- engine
- See Engine for additional details on engine initialization
- store
- fileSystem
- noteParser
Resources:
- Entry Point: ../packages/engine-server/src/enginev2.ts (Private)
- See Engine for additional details
Layout
The Dendron Engine is organized into modules that are a top level folder
- src/
- metadata/
- service.ts
- index.ts
- ...
- migration/
- service.ts
- index.ts
- ...
Children
Backlinks