From f59613188777dd06e210454cd9131c47849f5955 Mon Sep 17 00:00:00 2001 From: nam-john-ho <146448941+nam-john-ho@users.noreply.github.com> Date: Mon, 9 Oct 2023 22:48:54 +0700 Subject: [PATCH] Update adr-001-jan-deployable-cloud-native.md --- adr/adr-001-jan-deployable-cloud-native.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/adr/adr-001-jan-deployable-cloud-native.md b/adr/adr-001-jan-deployable-cloud-native.md index 284d5ac9e4..4ea0913eca 100644 --- a/adr/adr-001-jan-deployable-cloud-native.md +++ b/adr/adr-001-jan-deployable-cloud-native.md @@ -26,15 +26,21 @@ ### Key Design Decisions -![Key Design](images/adr-001-01.png "Key Design") -Introduce 2 components in Jan: -- Middleware: responsible for routing the user interface to the appropriate platform (Electron/WebApp) that is built when packaged. -- Http server: a http server on cloud environment which interacts with plugin directly. +![Key Design](images/adr-001-02.png "Key Design") +#### Why middleware +* The /web codebase needs to operate in both browser and electron environments +* The /web codebase needs to route plugin routes accordingly, either to /server or /electron +* Middleware takes care of this +* We will have a /server codebase that takes care of routing to plugins +#### Unsuitable Alternatives +* Not possible to just run electron headless +* /web is on a different chromium window +* Does not have all the electron handlers +* Does not have the IPC handler ### Detailed Design #### FE - Middleware: - ![Middleware](images/adr-001-01.png "Middleware") - Httpserver: TBD - Custom build for httpweb/electron: TBD - IPC