Skip to content

Commit

Permalink
Update adr-001-jan-deployable-cloud-native.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nam-john-ho authored Oct 9, 2023
1 parent 33abc71 commit f596131
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions adr/adr-001-jan-deployable-cloud-native.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f596131

Please sign in to comment.