Skip to content

Commit

Permalink
general/architecture: Add stub page
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Apr 25, 2023
1 parent bc7b023 commit 8fa938f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/general/architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Architecture
============

.. note::

This page is a stub.

Monoliths
---------

At present:

- Each of our services can run on a single server.
- Each service has at most two repositories: backend and frontend, excluding non-service dependencies.
- Each service's codebase has at most 3000 relevant lines, according to `Coveralls <https://coveralls.io>`__.
- Each service's Docker Compose file defines the containers for the backend, frontend and workers (if any).

When using :doc:`../python/django`, the workers are written as Django `management commands <https://docs.djangoproject.com/en/4.2/howto/custom-management-commands/>`__. In other cases, the workers are written as Click commands, sharing code with other commands.

In other words, **nothing is a microservice**, where a `microservice <https://en.wikipedia.org/wiki/Microservices>`__ means a sub-service that is developed and deployed *independently* of others, as part of a service.

Instead, we achieve loose coupling and proper encapsulation by other means: dividing program logic by UI responsibility (e.g. :ref`model-template-view`); organizing a set of features into an `application <https://docs.djangoproject.com/en/4.2/ref/applications/#projects-and-applications>`__, when using Django; and otherwise organizing code carefully.
1 change: 1 addition & 0 deletions docs/general/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ General
preferences
code
api
architecture
2 changes: 2 additions & 0 deletions docs/python/django.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Filename conventions

.. cookiecutter-django uses ``config`` as the project name, but a ``config.settings`` module is mind-bending.
.. _model-template-view:

Model Template View
-------------------

Expand Down

0 comments on commit 8fa938f

Please sign in to comment.