Skip to content

Commit 131225c

Browse files
authored
Add paragraph about gunicorn usage (#43)
1 parent af047ac commit 131225c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ flowchart LR
3434
subgraph d [Data tier]
3535
db["Database<br>_(Postgres)_"]
3636
end
37-
subgraph a ["Application tier<br>_(Django application)_"]
37+
subgraph a ["Application tier<br>_(Gunicorn server)_"]
3838
a_whitespace:::hidden
3939
admin[Admin interface]
40-
API
40+
API["API<br>_(Django application)_"]
4141
static_build[Static files]
4242
end
4343
subgraph p ["Presentation tier<br>_(Nginx server)_"]
@@ -53,9 +53,9 @@ flowchart LR
5353
Browser-.->api_proxy
5454
Browser-.->static
5555
56-
admin_proxy-->admin
57-
api_proxy-->API
58-
static -.- static_build
56+
admin_proxy--proxy_pass-->admin
57+
api_proxy--proxy_pass-->API
58+
static -.docker build.- static_build
5959
6060
admin-->db
6161
API-->db
@@ -73,21 +73,25 @@ The end-user facing user interface (UI) of the application is implemented as Sve
7373

7474
The HTML, JavaScript, and CSS files that implement the user UI are delivered to the end-users browser by an static file server. This application uses [nginx](https://nginx.org/) which, in addition to hosting the static files, acts as a reverse proxy towards the application layer: when the user interacts with the application, the browser contacts the presentation tier which then proxies the requests to application tier. <!-- TODO: add note on preventing direct access to the application server -->
7575

76+
<!-- TODO: static (Svelte app) vs dynamic (admin panel) web pages -->
77+
7678
### Application tier
7779

7880
<!-- TODO: Intro to application tier -->
7981

8082
The application tier of the application is implemented with Django in [back-end](./back-end) directory. [Django](https://www.djangoproject.com/) is a Python web framework that could be used to implement both presentation and the application tiers as well as managing the data tier. In this project it implements the application programming interface (API), handles interaction with the database, and provides an administrator panel for managing the data stored in the database.
8183

82-
<!-- TODO: more detailed description of the server and how it is executed and connected to UI and DB -->
84+
The Django application is exposed using a [Gunicorn](https://gunicorn.org/) server that handles incoming connections using multiple worker threads. I.e., Gunicorn implements a production ready webserver where as the Django application is responsible for implementing the application logic behind the server. Gunicorn server communicates with the Django application using WSGI, a standardized interface for connecting web servers to applications.
85+
86+
<!-- TODO: more detailed description of the DB connection -->
8387

8488
### Data tier
8589

8690
<!-- TODO: Intro to data tier -->
8791

8892
The data tier of the application is provided by Postgres SQL database.
8993

90-
<!-- TODO: move relevant parts from here to sections above
94+
<!-- TODO: move relevant parts from here to sections above and/or to README.md files in back-end and front-end directories.
9195
9296
This section describes step-by-step how this application was created. To be able to follow these step-by-step instructions, you will need:
9397

0 commit comments

Comments
 (0)