Last updated: 30-03-2023 09:18:55+0000

1. Introduction and Goals

1.1. Requirements Overview

1.2. Quality Goals

1.3. Stakeholders

Role/Name Contact Expectations







2. Architecture Constraints

3. System Scope and Context

Inventory service - System ContextTeam AMaintains and operates theWarehouseTeam BMaintains and operates theOrder serviceGraphQL FederationProvides a federated Graphto clientsInventory serviceReads inventory data andprovides it to clients viasubgraph-inventory. Ordersnew goods if they run out ofstockOrder serviceOrders new goodsWarehouseProvides inventory data viaKafkasubgraph-inventoryTriggers order ifgoods run out ofstock[REST]Reads inventorydata from[Kafka]maintains andoperatesmaintains andoperatesLegendsystemexternal_personexternal_systemasync relationship(dashed)Context diagram for the web shop inventory system

3.1. Business Context

<Diagram or Table>

<optionally: Explanation of external domain interfaces>

3.2. Technical Context

<Diagram or Table>

<optionally: Explanation of technical interfaces>

<Mapping Input/Output to Channels>

4. Solution Strategy

5. Building Block View

5.1. Whitebox Overall System

Inventory service - ContainersInventory service[System]GraphQL Federation[System]Warehouse[System]Inventory Database[PostgreSQL]Stores inventory itemsInventory Provider[SpringBoot, Spring Data JDBC,Kafka Streams]Reads inventory data andprovides it to clients viasubgraph-inventory. Ordersnew goods if they run out ofstocksubgraph-inventory[GraphQL]Provides inventory datawarehouse.stock_v1[Kafka]Contains data regarding theamount of goods in stockwarehouse.goods[Kafka]Contains metadata regardinggoodsOrder serviceOrders new goodsReads and writesinventory datato/fromTriggers order ifgoods run out ofstock[REST]contributes tofederated graphReads[Kafka]Reads[Kafka]Legendcontainerexternal_systemexternal_containersystem boundary(dashed)async relationship(dashed)Container diagram for the inventory domain

<text explanation>

Contained Building Blocks

<Description of contained building block (black boxes)>

Important Interfaces

<Description of important interfaces>

5.1.1. <Name black box 1>



<(Optional) Quality/Performance Characteristics>

<(Optional) Directory/File Location>

<(Optional) Fulfilled Requirements>

<(optional) Open Issues/Problems/Risks>

5.1.2. <Name black box 2>

<black box template>

5.1.3. <Name black box n>

<black box template>

5.1.4. <Name interface 1>


5.1.5. <Name interface m>

5.2. Level 2

Inventory service - Inventory Provider - ComponentsInventory Provider[Container]GoodsConsumerConsumes goods KafkatopicInventoryQuery[GraphQL]Query providing inventorydata to clientsInventoryReadServiceService reading inventorydataInventoryRepositoryJDBC repositoryreading/writing inventorydataInventoryWriteServiceWrites Inventory data todatabase and triggers ordersif goods run out of stockOrderClientSends orders via POST toOrder serviceStockConsumerConsumes stock Kafka topicInventory Database[PostgreSQL]Stores inventory itemsOrder serviceOrders new goodssubgraph-inventory[GraphQL]Provides inventory datawarehouse.goods[Kafka]Contains metadata regardinggoodsWrites receivedgoods viaConsumes[Kafka]Reads inventorydata usingIs part ofReads inventorydata usingReads/writesInventory data[JDBC]Writes Inventorydata toUses to order newgoodsSends orders viaPOST requests to[REST]Writes receivedstock dataLegendcontainercomponentexternal_systemexternal_containercontainer boundary(dashed)Component diagram for the Inventory Provider service

5.2.1. White Box <building block 1>

<white box template>

5.2.2. White Box <building block 2>

<white box template>


5.2.3. White Box <building block m>

<white box template>

5.3. Level 3

5.3.1. White Box <_building block x.1_>

<white box template>

5.3.2. White Box <_building block x.2_>

<white box template>

5.3.3. White Box <_building block y.1_>

<white box template>

6. Runtime View

6.1. <Runtime Scenario 1>

  • <insert runtime diagram or textual description of the scenario>

  • <insert description of the notable aspects of the interactions between the building block instances depicted in this diagram.>

6.2. <Runtime Scenario 2>

6.3. …​

6.4. <Runtime Scenario n>

7. Deployment View

Inventory service - Deployment - DefaultAWSaccountId123456regioneu-central-1Elastic Kubernetes Service (EKS)Inventory PODautoscaling.max_replicas10autoscaling.min_replicas5imagePullPolicyIfNotPresentport8080resources.limits_cpu3000mresources.limits_memory1500Miresources.requests_cpu2000mresources.requests_memory1500MiDocker ContainerRelational Database Service (RDS)Apollo StudioIngress[NGINX]Used for load balancing andSSLterminationInventory Provider[SpringBoot, Spring Data JDBC,Kafka Streams]Reads inventory data andprovides it to clients viasubgraph-inventory. Ordersnew goods if they run out ofstockInventory Database[PostgreSQL]Stores inventory itemsGraphQL FederationProvides a federated Graphto clientsForwardssubgraph-inventoryqueries toForwards requeststoReads and writesinventory datato/fromLegendcontainerexternal_systemnodeDeployment diagram for the Inventory service

7.1. Infrastructure Level 1

<Overview Diagram>


<explanation in text form>

Quality and/or Performance Features

<explanation in text form>

Mapping of Building Blocks to Infrastructure

<description of the mapping>

7.2. Infrastructure Level 2

7.2.1. <Infrastructure Element 1>

<diagram + explanation>

7.2.2. <Infrastructure Element 2>

<diagram + explanation>


7.2.3. <Infrastructure Element n>

<diagram + explanation>

8. Cross-cutting Concepts

8.1. <Concept 1>


8.2. <Concept 2>



8.3. <Concept n>


9. Architecture Decisions

10. Quality Requirements

10.1. Quality Tree

10.2. Quality Scenarios

11. Risks and Technical Debts

12. Glossary

Term Definition