<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Journal of Systems and Software
199 (2023). URL: https://www.scopus.com/inward/record.uri?eid=2</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1109/TSE.2007</article-id>
      <title-group>
        <article-title>Empirical evidence of using C4 design method in development of edge-cloud systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ja¯nis Grabis</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ja¯nis Kampars</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Information Technology, Riga Technical University</institution>
          ,
          <addr-line>Zunda krastmala 10, Riga</addr-line>
          ,
          <country country="LV">Latvia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2025</year>
      </pub-date>
      <volume>2020</volume>
      <fpage>17</fpage>
      <lpage>19</lpage>
      <abstract>
        <p>The paper reports the findings of case studies on the application of the C4 software architecture development method. It focuses on development of edge and cloud systems and aims to analyze peculiarities of collaborative software design and practices of designing the edge and cloud systems. Three applied research projects are considered on the development of smart systems. The C4 method proved valuable in establishing a common understanding on the development of distributed systems. However, there were significant diferences among the projects in a way the method was applied and a level of details represented in software architecture. That is at least partially influenced by the organizational structure of development teams. The research is envisioned to lead to a set of recommendations and best practices for software modeling, applying the C4 method and the collaborative development of distributed systems in general.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;software architecture</kwd>
        <kwd>collaborative modeling</kwd>
        <kwd>edge and cloud architecture</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Many modern information systems are characterized by a high level of complexity due to their distributed
nature, data heterogeneity, scalability requirements and other factors. Systems architecture provides
an overview of the envisioned technical solution by defining key components and their relationships.
It helps developers to conceptualized and reason about technical challenges and plays an important
role in communication of the solution among stakeholders, allocation of work to development teams,
analyzing non-functional requirements and evaluation of design choices.</p>
      <p>
        Architecture has been recognized as a way to coordinate software development activities [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. The
coordination is of major importance in development of distributed systems. Edge and cloud systems are
inherently distributed and increasingly find applications in areas requiring advanced sensing capabilities,
for example, in smart manufacturing [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>
        Visualization of software architecture facilitates collaboration and comprehension [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Infrastructure
as a code specifications such as Docker compose can be transformed in architecture diagrams for
their specific application domain [ 4]. Collaboration and support for domain specific languages are
among the requirements the teams have towards model driven development [5]. The C4 method [6] has
emerged as a lightweight method for development of system architecture. It provides a simple to follow
methodological guidance for step-wise elaboration of the architecture and the Structurizr development
tool for on-line collaborative work [7].
      </p>
      <p>We have applied the C4 method in several applied research projects conducted in collaboration
between a university and industry. These projects deal with development of software systems for
sensing enterprises and involve using IoT, big data and edge and cloud technologies. The development
work is divided between the university and industry partners (more than one industry partner in some
cases). This paper aims to summarize experiences accumulated during the system architecting phase
and on usage of the C4 method in particular.</p>
      <p>The overall goal of this research is to understand challenges and best practices of development
of architecture of distributed systems and edge and cloud systems in particular. The evaluation is
performed with respect to key features and components of the edge and cloud system architectures
reported in literature. In future research, that would lead to a set of recommendations one could use
to guide the system development process in the collaborative environment. Case study research [8]
is adopted as a research method. System architecture documentation as well as messages exchanged
among the developers during the development process are analyzed from three applied research projects.</p>
      <p>The rest of the paper is organized as follows. Section 2 briefly reviews the C4 method and analyzes
existing work on architecture of edge and cloud systems to identify typical features of this architecture.
The case study is reported in Section 3, and Section 4 concludes.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Background</title>
      <p>2.1. C4 Method
C4 is a method for development of software architecture [6]. It allows for a gradual decomposition of
the system, defining the main components and designing and detailing the specific services sequentially.
The C4 method is an "abstraction-first" approach to diagramming software architecture, and it attempts
to mimic a way software architects and developers think about software design and development [6]. It
uses a limited set of constructs (i.e., person, software system, container and component) arranged in
four levels of elaboration. The design process starts with a context diagram (a landscape diagram can
be added as an optional Level 0 diagram), proceeds with a container diagram and a set of component
diagrams for each container. A detailed design can be elaborated at Level 4 using variety of software
engineering techniques such as UML. This paper concerns levels one to three.</p>
      <p>C4 starts with identification of the core software system to be built and defines its context in the
Context diagram (Level 1). This diagram shows users of the software system and key related systems.
The Container diagram (Level 2) splits the software system into applications and data stores required to
have a running system. It is useful for showing the overall allocation of responsibilities to specific parts
of the software system. The component diagram (Level 3) is created for each container and shows major
building blocks and their interactions. A component is a grouping of related functionality and has a
clear access interface. Technology choices and implementation details can be represented at this level.</p>
      <p>The C4 Domain specific language (DSL) allows to describe software architecture following the
model-as-code principle. Elements of the software architecture and their relationships that define
the software model are declared. These elements are subsequently arranged into views displayed as
diagrams. Various visual aids can be added to the diagrams.</p>
      <p>The C4 method was selected primarily because of its ability to clearly allocate responsibilities to
parties involved as well as due to its light-weight approach and quick ramp-up. Other advantages of
the method are a collaborative on-line workplace, version management, getting ready methodological
guidance and DSL.</p>
      <sec id="sec-2-1">
        <title>2.2. Edge and Cloud System Architecture</title>
        <p>
          Edge and cloud computing combines an ability to process data at their origin with capabilities of
cloud computing. It finds applications in IoT solutions, Industry 4.0 and smart systems. It follows
a distributed computing paradigm requiring integration of diferent data processing technologies.
The key requirements towards the edge and cloud architecture include proactive control in real time,
decoupling of control from physical devices, interoperability, visualization, data availability, scalability,
operational/long-term data storage and eficient usage of computational resources [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. The review of
such edge computing architectures as FAR-Edge, ECC and ICC [9] reveals that their main features are
Connectivity and communication, Device management, Data collection, analysis and performance,
Scalability, Compliance with standards and Security. Key components of the reference architecture
can be allocated to IoT, Edge and Business Solution (Cloud) layers [10]. The IoT layer includes sensors,
actuators and controllers and concerns data collection and initial processing. The Edge layer includes
an edge server for local processing and an edge gateway for data integration. The Cloud layer performs
advanced data processing and provides front-end service. The layers are connected by a vertical security
layer. At the component level, there are best practices to ensure resilience of edge and cloud systems [11].
These include redundancy, rerouting, verification and access control.
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Case Study</title>
      <p>A case study research is conducted to observe application of the C4 method in practice. The cases selected
are three university and industry joint applied research projects. All projects deal with development of
smart systems. The university and companies involved have their own separate development teams
with separate management, and the chief system architect was from the university’s team. Diferent
companies were involved in the projects while the core university’s team was the same although two
persons served as the chief architect in these projects.</p>
      <sec id="sec-3-1">
        <title>3.1. Research Question</title>
        <sec id="sec-3-1-1">
          <title>The following research questions are formulated:</title>
          <p>• Do system architects follow best practices of design of edge and cloud systems?
• What are peculiarities of using the C4 method?
• Does using the C4 method facilitate collaboration among the teams?
The first research question compares the models created with the reference model reported in literature
with focus on types of components used. The second question aims to identify diferences and
commonalities of using the C4 method across the projects. Finally, one is interested into utility of using C4
or similar methods, and the third question aims to provide initial insights on value of the method.</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Cases and Data Collection</title>
        <p>One completed and two on-going projects are selected for exploration. Project 1: The project aims to
create a platform for ensuring a safe working environment that integrates advanced information and
communication technologies and biotechnologies. The platform combines business continuity planning,
IoT, computer vision, machine learning and wastewater analytics technologies for comprehensive
Covid-19 and other infections risk assessment, mitigation and prevention in workplaces where the
nature of work limits remote working options, such as shift-based manufacturing companies. Project
2: The project concerns work-in-progress inventory management in the production environment. A
production operator receives information about production orders what includes a list of materials
required to produce an end-product. Sensing technologies such as computer vision and RFID provide
data on location of the materials. These data are aggregated and processed to create a materials pick-up
route, which is executed to set-up a production step. The production step yields an intermediate product,
which should be placed in a suitable location on the shop-floor for the next production step. A software
system is being developed as a service, which can be integrated with the existing ERP system used
by the manufacturing company. Project 3: The aim of the project is to develop an edge-cloud based
AI-driven power resource management and balancing platform for ofice buildings, which would be
compatible with the building’s local systems and external data sources, and would maximise the use of
renewable resources, minimise electricity costs while ensuring the desired level of user convenience.
Although software systems are being developed in diferent efilds of application, they all rely on
intelligent processing of sensor data and combine edge and cloud capabilities for eficient data processing.</p>
        <p>Complete software architecture documentation was available for all three projects. That included
diagrams and descriptions created as well as the complete version history of updates made in the models
and diagrams during their continuous elaboration. A drawing tool based on templates was used in
Project 1, while Structurizr on-premise installation was used in Project 2 and Project 3.</p>
        <p>Project 1 is completed and Project 2 and Project 3 are currently entering the implementation phase.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Results and Discussion</title>
        <p>Level 1 to Level 3 diagrams were elaborated in all projects. An optional Level 0 landscape diagram was
created for Project 3 because the participants required a more detailed understanding of the application
context. The architecture was strongly influenced by a three tier client-server system with easily
recognizable data, application and presentation layers (Fig.1). That can be explained by having a legacy
time management application at its core. The architecture is also characterized by a wealth connections
with external systems. The architectures in Project 2 and Project 3 start with explicit separation of edge
and cloud systems (Fig.2) and are influenced by the microservice approach.</p>
        <p>Structurizr was not used in Project 1. Although the main syntax requirements were observed,
diagrams also included additional pictograms and variety of explanatory comments. This approach
was possible because the chief architect centralized the architecture management. A more distributed
approach was taken in other projects and following DSL allowed to keep diagrams consistent and
readable. Typical edge and cloud architecture components can be identified in all three projects
(Table 1). Project 2 has the most advanced edge processing and limited number of edge devices, and the
sensor data flow is also handled using the edge server using dedicated components for each sensor type.
Project 3 stores and updates device profiles in the edge and has a central edge system responsible for
data gathering and processing for a specific location (i.e., building). The cloud system is responsible for
advanced analytical features using machine learning. Many technology choices are identified in the
software architecture for Project 1, while Project 3 mainly uses generic terms, e.g., user interface wise
just an abstract Front-end system component is provided. All three projects use diferent approaches to
showing relationships. Technical terms specifying interfaces and protocols are used in Project 1 (Fig.3).
Project 2 operates with a limited set of verbs and nouns to describe exchange of messages in style close
to REST. Textual descriptions are in used in Project 3 (Fig.4). Project 3 also has the largest number of
connections. Many connections were defined in the model and subsequently excluded from the views
to improve readability. Many of the connections were made to service components such as logging and
there were discussions of the most suitable ways to represent such service components. It is observed
that diagrams are becoming more verbose as one moves to the component level. That is especially
noticeable in elaboration of analytical features what might be explained by limited DSL expressiveness
or uncertainty about solutions to be developed. Detailed descriptions were added to elements and
connections in the diagrams in Project 3. The development company used subcontractors in this project
and there very several additional rounds of reviews and approvals. None of the software architectures
created explicitly accounted for security management what is an essential part for edge and cloud
systems. Perhaps, the hierarchical structure of C4 is not well suited to representation of cross-cutting
features. Nevertheless, Project 1 and Project 2 included components for device management in the
cloud.</p>
        <p>Getting started materials provided by C4 and a brief introduction sessions proved suficient for
companies’ developers to pick-up the core principles and concepts of the method. The choice of the
light-weight approach proved to be helpful because industry architects and developers were much
less used to structured modeling methods and were primarily relying on free-form visualizations or
low-level of abstraction forms.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>The paper has explored empirical experiences on using the C4 software architecture method in three
applied research projects on development of edge and cloud systems. The exploration was guided by a
brief literature review on typical characteristics of edge and cloud systems. The overall observation is
that application of the C4 method achieved its stated objective of coordinating software architecture
development among development teams involved.</p>
      <p>Although the typical features of the edge and cloud system are present in all diagrams, significant
variations were identified among the projects. The software architecture is more detailed in Project
1, and it was used to guide the development process without much of an additional work on detailed
design. It is possible that models in Projects 2 and 3 will be further elaborated as the projects are
entering the implementation phase. The project’s organizational structured influenced the way the
C4 method was used and models were prepared. The degree of centralization and the way reviews
were organized had significant impact of appearance of the diagrams. The variations also suggest that
software architects need additional guidance on using the C4 method.</p>
      <p>The paper reports only analysis of the models created. However, it would be beneficial to survey
projects’ stakeholders about their views on eficiency of the development process. That would yield
a more comprehensive answer to the third question. The software architecture was implemented as
planned in Project 1, while retrospectives for Project 2 and Project 3 will be performed in due time.</p>
    </sec>
    <sec id="sec-5">
      <title>Declaration on Generative AI</title>
      <sec id="sec-5-1">
        <title>The authors have not employed any Generative AI tools.</title>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P.</given-names>
            <surname>Ovaska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Marttiin</surname>
          </string-name>
          ,
          <article-title>Architecture as a coordination tool in multi-site software development</article-title>
          ,
          <source>Software Process Improvement and Practice</source>
          <volume>8</volume>
          (
          <year>2003</year>
          )
          <fpage>233</fpage>
          -
          <lpage>247</lpage>
          . URL: https://www.scopus.com/inward/record.uri?eid=
          <fpage>2</fpage>
          -
          <lpage>s2</lpage>
          .
          <fpage>0</fpage>
          -
          <lpage>14344262656</lpage>
          &amp;doi=10.
          <source>1002%2fspip. 186&amp;partnerID=40&amp;md5=85209a2cbef41c1ae9a5fdec6f1d707f. doi:10</source>
          .1002/spip.186, cited By 65.
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Vater</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Harscheidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Knoll</surname>
          </string-name>
          ,
          <article-title>A reference architecture based on edge and cloud computing for smart manufacturing</article-title>
          , volume
          <volume>2019</volume>
          -
          <article-title>July, Institute of Electrical and Electronics Engineers Inc</article-title>
          .,
          <year>2019</year>
          . URL: https://www.scopus.com/inward/record.uri?eid=
          <fpage>2</fpage>
          -
          <lpage>s2</lpage>
          .
          <fpage>0</fpage>
          -
          <lpage>85073154392</lpage>
          &amp;doi=10.1109%
          <fpage>2fICCCN</fpage>
          .
          <year>2019</year>
          .
          <volume>8846934</volume>
          &amp;partnerID=
          <volume>40</volume>
          &amp;md5=25dd203a2bd907a47f2a5480db857fa1. doi:
          <volume>10</volume>
          .1109/ ICCCN.
          <year>2019</year>
          .
          <volume>8846934</volume>
          , cited By 19.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>K.</given-names>
            <surname>Gallagher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hatch</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Munro</surname>
          </string-name>
          ,
          <article-title>Software architecture visualization: An evaluation framework and its application</article-title>
          ,
          <source>IEEE Transactions on Software Engineering</source>
          <volume>34</volume>
          (
          <year>2008</year>
          )
          <fpage>260</fpage>
          -
          <lpage>270</lpage>
          . URL: https://www.scopus.com/inward/record.uri?eid=
          <fpage>2</fpage>
          -
          <lpage>s2</lpage>
          .
          <fpage>0</fpage>
          -
          <lpage>42549103058</lpage>
          &amp;doi=10.1109%2f TSE.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>