Skip to content

Architecture

peder2911 edited this page Aug 10, 2021 · 10 revisions

Architecture

This article gives an overview of the architectural decisions made for ViEWS 3, as well as the infrastructure running the resulting system.

ViEWS 3 has a service-oriented architecture (SOA). Each reasonably delineable piece of functionality is served by a discrete service. For ViEWS 3, a service is defined as a docker container running a web-server process, for example uvicorn.

A good analogy for explaining what a service is, is the biological cell. Like a cell, a service has a clearly delineated border, and a set of functions. Also like a cell, a service interacts with its environment, and forms systems with other cells. In concert, cells and services form super-organisms that yield much more functionality than the sum of their parts.

services

With recent developments in deployment technologies and practices, the analogy between a biological cell and a service can be extended further: Services can now be scaled up and down, like a superorganism creating and destroying instances of cells to fit its needs, and to heal (replace) damaged or malfunctioning cells.

A central principle of SOA is that a service has responsibility for a set of related functionalities, which does not grow beyond what is practical (in which case, a separate service is warranted). This encourages strict separation of code, functionality and information between services, making it easier to follow modular programming principles. This makes it possible to write big, complex systems that remain maintainable and simple to reason about, as well as extend and rewrite: Each service becomes an interchangeable module that is replaceable with any other module that offers the same API.

The choice of Docker for deployment makes ViEWS 3 extremely portable. In addition, using a SOA makes it possible to partition different services between various hosts, increasing the scalability; the potential performance of the system.