Update adr-001-jan-deployable-cloud-native.md

This commit is contained in:
nam-john-ho 2023-10-09 22:48:54 +07:00 committed by GitHub
parent 33abc71974
commit f596131887
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,15 +26,21 @@
### Key Design Decisions ### Key Design Decisions
![Key Design](images/adr-001-01.png "Key Design") ![Key Design](images/adr-001-02.png "Key Design")
Introduce 2 components in Jan: #### Why middleware
- Middleware: responsible for routing the user interface to the appropriate platform (Electron/WebApp) that is built when packaged. * The /web codebase needs to operate in both browser and electron environments
- Http server: a http server on cloud environment which interacts with plugin directly. * 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 ### Detailed Design
#### FE #### FE
- Middleware: - Middleware:
![Middleware](images/adr-001-01.png "Middleware")
- Httpserver: TBD - Httpserver: TBD
- Custom build for httpweb/electron: TBD - Custom build for httpweb/electron: TBD
- IPC - IPC