<!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>Birmingham, UK
∗ Corresponding author.
† These authors contributed equally.
ob@wunu.edu.ua (O. Berezsky); o.pitsun@wunu.edu.ua (O. Pitsun); mgm@wunu.edu.ua (G. Melnyk);
hstakhyra@wunu.edu.ua (H. Poperechna);</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Microservices-based architecture for biomedical image processing software⋆</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Oleh Berezsky</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Oleh Pitsun</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Grygory Melnyk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Hanna Poperechna</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>West Ukrainian National University</institution>
          ,
          <addr-line>11 Lvivska st., Ternopil, 46001</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>At the stage of diagnosis, cytological, histological, immunohistochemical images are actively used. A feature of this type of processing is the need for a large amount of processed data and the complexity of calculations. Currently, the image classification process is actively used not only by using computer vision algorithms, but also by means of deep machine learning. To develop high-quality software that combines conventional data processing algorithms and deep learning approaches, it is necessary to develop an improved version of monolithic architecture, namely microservice architecture, which is characterized by an increased level of reliability. In this work, a microservice architecture is proposed for performing the tasks of image processing by means of computer vision and using convolutional neural networks for classification and U-net networks for automatic segmentation.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Microservices</kwd>
        <kwd>biomedical images</kwd>
        <kwd>deep learning</kwd>
        <kwd>software architecture</kwd>
        <kwd>image processing</kwd>
        <kwd>neural networks</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>In modern processing of biomedical images based on the calculation of quantitative characteristics
and deep learning, it is especially important to ensure high performance, flexibility and scalability of
systems. Traditional typical monolithic architectures in most cases cannot meet the needs of
realtime, efficient processing of large volumes of data and rapid adaptation. Microservice architecture is
a powerful tool that allows you to divide a system into independent services, each of which performs
specific tasks and can be deployed, scaled, and updated separately.</p>
      <p>Biomedical images, in particular cytological, histological, immunohistochemical, are used to
diagnose cancer by analyzing the characteristics of micro-objects (cell nuclei). The difficulty lies in
the automatic selection of cell data and image classification by means of artificial intelligence to
facilitate diagnosis and improve the quality of work of doctors.</p>
      <p>To carry out the analysis of biomedical images, it is necessary to analyze both the quantitative
characteristics of the studied objects and the graphic images as a whole. Quantitative characteristics
are developed by segmenting images and extracting cell nuclei. At the next stage, the quantitative
characteristics of the cores are calculated, such as the area, the brightness level, the average value of
the RGB channels.</p>
      <p>Deep learning tools are used for the tasks of image classification using convolutional neural
networks or the task of image segmentation using U-net networks for further selection of the studied
cell nuclei and calculation of their characteristics (area, brightness, etc.).</p>
      <p>The advantages of microservice architecture for biomedical image processing systems based on
deep learning are its ability to efficiently work with large volumes of data, provide high availability
and flexibility, and facilitate the integration of new algorithms and technologies. The main aspects of
microservice architecture include:</p>
      <p>- division into small services;
- facilitation of failure management;
- decentralized data management;
- horizontal scaling;
- communication via API.</p>
      <p>The purpose of this work is to design a software system to perform the tasks of calculating the
quantitative characteristics of objects and classifying, segmenting images using deep learning tools
based on microservice architecture in order to improve the reliability and quality of the complex
system.</p>
      <p>The scientific novelty consists in the development of a microservice architecture for a biomedical
image processing system with elements of computer vision and deep learning algorithms to perform
classification and segmentation tasks.</p>
      <p>The practical value lies in the software implementation of microservice architecture based on
Laravel, vue.js, Java, OpenCV, Tensorflow, keras technologies.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Literature review</title>
      <p>
        Scientists pay considerable attention to approaches to the development of software with elements of
artificial intelligence, since such software systems require a significant amount of resources and are
often executed in cloud environments. In addition, software developers and researchers have faced
the problem of low reliability of traditional monolithic approaches to designing software systems. In
[
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], the author analyzes microservice architectures and evaluates their advantages. In the work [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
the authors pay considerable attention to the use of Docker and, in general, the problem of
containerization for the implementation of microservice architecture of various levels of complexity.
The authors in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] analyze the microservice architecture in terms of the use of cloud technologies for
the implementation of complex systems with high load. A generalized approach to the analysis of
modern approaches to the analysis and development of software is considered in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The principles
of using cloud technologies are discussed in works [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5-7</xref>
        ]. The use of blockchain technology for the
design and development of microservice architecture is considered in [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Examples of designing and
developing software systems for the task of processing immunohistochemical, cytological, and
histological images are given in works [
        <xref ref-type="bibr" rid="ref10 ref9">9-11</xref>
        ]. A feature of these works is the use of deep learning
tools to solve the problem of classification and segmentation. The use of cloud technologies in image
processing tasks using Docker technology is given in [12], the features of using cloud technologies
for the task of segmentation are considered in [13]. Features of segmentation of biomedical images in
cloud services are discussed in [14]. A significant role in calculations is played by the process of
vaporization and the use of graphics processors to speed up calculations [15,16]. The use of cloud
services as a means of classifying histological images is considered in [17].
      </p>
    </sec>
    <sec id="sec-3">
      <title>3. Problem statement</title>
      <p>Combining a large number of software modules to ensure the operation of a software system leads to
an increase in its complexity and a decrease in reliability. In this study, a microservice architecture is
proposed. For its implementation, the following tasks must be completed:
- analyze the existing biomedical image processing systems;
- specify the requirements for the developed software;
- develop the architecture of the software system based on the microservice approach;
- to conduct a comparative analysis of the obtained results.</p>
    </sec>
    <sec id="sec-4">
      <title>4. Architecture of a microservice image processing system</title>
      <p>The design of hardware and software systems based on microservice architecture is currently gaining
particular popularity. The difference of the microservice architecture compared to the monolithic one
is in increasing the reliability of the system and at the same time decomposition and increasing the
complexity of the development.</p>
      <p>A feature of processing biomedical images is the need to pay attention to pre-processing of data,
selection of quantitative and qualitative characteristics in the image and direct processing of the
images themselves. To calculate the quantitative characteristics, it is necessary to implement the
stages of image processing, selection of features for research, calculation of their characteristics,
storage in the database and further processing.</p>
      <p>The use of deep learning elements in the image processing system requires significant computing
resources and the need to use specialized libraries. This necessity contrasts with the requirements for
the development of typical systems for data processing in medicine.</p>
      <sec id="sec-4-1">
        <title>4.1. The architecture of the developed system approach based on the microservice</title>
        <p>Microservice architecture has significant advantages compared to monolithic ones, especially when
developing systems that use specialized libraries and development tools. To implement the task, it is
necessary to design a complex architecture and take into account many key points that will allow to
develop a safe and reliable system with specialized distribution of functionality among system users.</p>
        <p>For example, users working with research records do not need to configure the convolutional
neural network module and vice versa. The possibility of using a microservice approach significantly
increases the isolation and reliability of software modules connected to each other through an API
interface.</p>
        <p>In the microservice architecture, the API (Application Programming Interface) plays a key role,
providing interaction between different microservices, as well as their communication with external
systems. Since each microservice is an independent component with its own logic and often a
database, an API acts as an interface through which these components exchange data and interact.
4.2.</p>
      </sec>
      <sec id="sec-4-2">
        <title>Data processing</title>
        <p>Data processing is one of the determining factors in this system, since this module is responsible for
selecting objects in the image (cell nuclei) and calculating their quantitative characteristics. The
backend part is implemented in the Java programming language and using the OpenCV library. UML
- a class diagram for implementing the functionality of selecting input image parameters for further
processing is shown in Figure 2.</p>
        <p>The JavaFX framework was chosen as the front-end part, which allows you to develop a
convenient and functional modern interface. JavaFX enables the creation of modern user interfaces
with rich graphical capabilities. It supports extensive customization of components, as well as
animations, graphics, and multimedia, allowing developers to create visually appealing and
interactive applications.
4.3.</p>
      </sec>
      <sec id="sec-4-3">
        <title>Data storage</title>
        <p>There are two main approaches to data storage:
- use of the mysql database to store records in the relational database. This database contains
research records and results of calculation of input image parameters and results of
processing cell nuclei. Algorithms and algorithm input parameters are also stored in the
database.
- images are stored on disk space with a specific name in an encrypted form. It is assumed that
the data sets will be stored in the cloud storage and will be divided into training, test and
validation samples.
4.4.</p>
      </sec>
      <sec id="sec-4-4">
        <title>Data preparation</title>
        <p>Pre-processing of data involves the presence of a module for preparing data for processing by
computer vision algorithms, in particular using filtering algorithms, adjusting the level of brightness,
contrast, and segmentation algorithms. In addition, this module provides functionality for preparing
images for training using neural networks. In particular, the selection of width, height, type of images,
color gamut, proportion of distribution between test, training and validation sample for conducting a
specific study. To implement the task, Laravel frameworks were used as the backend and vue.js for
the development of the graphical interface.
4.5.</p>
      </sec>
      <sec id="sec-4-5">
        <title>Data classification</title>
        <p>The classification module is one of the most important and resource-intensive in this system, as it
involves the use of deep learning algorithms, such as convolutional neural networks and U-net
networks for image segmentation. Keras, tensorflow, and other additional libraries are used for
processing and visualization of research results.
4.6.</p>
      </sec>
      <sec id="sec-4-6">
        <title>REST API</title>
        <p>The REST API mechanism was used to implement interaction between microservices. It is also
possible to protect information transmitted through communication channels. A modern mechanism
based on JWT tokens is used to ensure interaction between the web system and the application
program.</p>
        <p>To work with the web system, you must be a registered user. The user needs to generate his own
token. An example of a simple query to store trial and patient information is shown in Figure 3.</p>
        <p>The format of the request depends on the task, for example, image parameters and results of
studies that have been carried out locally can be transferred. Using the REST API, it is possible to
transfer data to the server for further storage in the database.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Computer experiments</title>
      <p>An example of the graphical interface is shown in Figure 4. This page is intended for storing research
results. Research information is completed via a web interface or by transferring data through a
dedicated API.
The web interface is a convenient mechanism for viewing and managing information, in addition, the
data is stored in a common database. In this way, changes are made locally - they are transferred to
a shared server, which increases convenience and reliability. Examples of immunohistochemical
images are shown in Figure 5.
A comparative analysis of modern systems used for diagnosis using immunohistochemical studies is
given in Table 1.</p>
      <p>Based on the results of the research, it can be concluded that the developed system has a larger set
of functionality, and is also implemented in the form of a microservice architecture for the
distribution of functionality and increasing the reliability of the system.</p>
    </sec>
    <sec id="sec-6">
      <title>6. Сonclusions</title>
      <p>In this work, a microservice architecture is proposed for performing the tasks of processing
biomedical images.</p>
      <p>- existing biomedical image processing systems were analyzed, which made it possible to
highlight their functional advantages and disadvantages; to develop own microservice architecture;
- the architecture of the software system for processing biomedical images was developed
using elements of computer vision and deep learning based on a microservice approach, which made
it possible to increase the reliability of the system by isolating individual modules;
- the conducted comparative analysis demonstrated the advantage of the proposed system in
comparison with analogues, in particular the presence of an API interface for communication
between modules.</p>
    </sec>
    <sec id="sec-7">
      <title>Declaration on Generative AI</title>
      <p>The author(s) have not employed any Generative AI tools
[11] Berezsky, O. , Pitsun, O. , Melnyk, G. , Derysh, B. , Liashchynskyi, P. Application Of MLOps
Practices For Biomedical Image Classification. CEUR Workshop Proceedings, 2022, 3302, pp. 69–
77 https://ceur-ws.org/Vol-3302/short3.pdf
[12] González, Germán, and Conor L. Evans. "Biomedical Image Processing with Containers and Deep
Learning: An Automated Analysis Pipeline: Data architecture, artificial intelligence, automated
processing, containerization, and clusters orchestration ease the transition from data acquisition
to insights in medium‐to‐large datasets." BioEssays 41, no. 6 (2019): 1900004.
[13] Rajput, Amitesh Singh, Vishesh Kumar Tanwar, and Balasubramanian Raman. "-Score-Based
Secure Biomedical Model for Effective Skin Lesion Segmentation Over eHealth Cloud." ACM
Transactions on Multimedia Computing, Communications, and Applications (TOMM) 17, no. 2s
(2021): 1-19. https://doi.org/10.1145/3430806
[14] Navale, Vivek, and Philip E. Bourne. "Cloud computing applications for biomedical science: A
perspective." PLoS computational biology 14, no. 6 (2018): e1006144.
https://doi.org/10.1371/journal.pcbi.1006144
[15] O. Berezsky, O. Pitsun, B. Derish, K. Berezska, G. Melnyk and Y. Batko, "Adaptive
Immunohistochemical Image Pre-processing Method," 2020 10th International Conference on
Advanced Computer Information Technologies (ACIT), Deggendorf, Germany, 2020, pp.
820823, doi: 10.1109/ACIT49673.2020.9208920.
[16] Berezsky, O. , Pitsun, O. , Batryn, N. , ... Berezska, K. , L.Dubchak, Modern automated microscopy
systems in oncology. CEUR Workshop Proceedings, 2018, 2255, pp. 311–325
https://ceurws.org/Vol-2255/paper28.pdf
[17] Abhinav Kumar, Sanjay Kumar Singh, K Lakshmanan, Sonal Saxena, and Sameer Shrivastava.
2021. A Novel Cloud-Assisted Secure Deep Feature Classification Framework for Cancer
Histopathology Images. ACM Trans. Internet Technol. 21, 2, Article 52 (June 2021), 22 pages.
https://doi.org/10.1145/3424221</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Kruisz</surname>
            ,
            <given-names>Manuel.</given-names>
          </string-name>
          <article-title>"Evaluation of microservice implementation approaches for image processing." PhD diss</article-title>
          .,
          <string-name>
            <surname>Wien</surname>
          </string-name>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Brogi</surname>
            , Antonio, Davide Neri, and
            <given-names>Jacopo</given-names>
          </string-name>
          <string-name>
            <surname>Soldani</surname>
          </string-name>
          .
          <article-title>"A microservice‐based architecture for (customisable) analyses of Docker images."</article-title>
          <source>Software: Practice and experience 48</source>
          , no.
          <issue>8</issue>
          (
          <year>2018</year>
          ):
          <fpage>1461</fpage>
          -
          <lpage>1474</lpage>
          . https://doi.org/10.1002/spe.2583
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Lotz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Vogelsang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Benderius</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Berger</surname>
          </string-name>
          ,
          <article-title>"Microservice Architectures for Advanced Driver Assistance Systems: A Case-</article-title>
          <string-name>
            <surname>Study</surname>
          </string-name>
          ,
          <article-title>"</article-title>
          2019 IEEE International Conference on Software Architecture
          <string-name>
            <surname>Companion (ICSA-C)</surname>
          </string-name>
          , Hamburg, Germany,
          <year>2019</year>
          , pp.
          <fpage>45</fpage>
          -
          <lpage>52</lpage>
          , doi: 10.1109/ICSAC.
          <year>2019</year>
          .
          <volume>00016</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Liu</surname>
            , Xiaobin, Weijia Liu, Siyuan Yi, and
            <given-names>Jinyang</given-names>
          </string-name>
          <string-name>
            <surname>Li</surname>
          </string-name>
          .
          <source>"Research on Software Development Automation Based on Microservice Architecture." In Proceedings of the 2020 International Conference on Aviation Safety and Information Technology</source>
          , pp.
          <fpage>670</fpage>
          -
          <lpage>677</lpage>
          .
          <year>2020</year>
          . https://doi.org/10.1145/3434581.3434711
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>V.</given-names>
            <surname>Singh</surname>
          </string-name>
          and
          <string-name>
            <given-names>S. K.</given-names>
            <surname>Peddoju</surname>
          </string-name>
          ,
          <article-title>"Container-based microservice architecture for cloud applications," 2017 International Conference on Computing, Communication and Automation (ICCCA), Greater Noida</article-title>
          , India,
          <year>2017</year>
          , pp.
          <fpage>847</fpage>
          -
          <lpage>852</lpage>
          , doi: 10.1109/CCAA.
          <year>2017</year>
          .
          <volume>8229914</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Sergi</surname>
          </string-name>
          , Ilaria, Marco Leo, Pierluigi Carcagnì, Marco La Franca,
          <article-title>Cosimo Distante i Luigi Patrono. "A Microservices Architecture based on a Deep-learning Approach for an Innovative Fruition of Art and Cultural Heritage."</article-title>
          <source>Journal of Communications Software and Systems 18, br. 2</source>
          (
          <year>2022</year>
          ):
          <fpage>184</fpage>
          -
          <lpage>194</lpage>
          . https://doi.org/10.24138/jcomss-2022
          <source>-0001</source>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>T.</given-names>
            <surname>Cerny</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. S.</given-names>
            <surname>Abdelfattah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Bushong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. Al</given-names>
            <surname>Maruf</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Taibi</surname>
          </string-name>
          ,
          <article-title>"Microservice Architecture Reconstruction and Visualization Techniques: A Review," 2022 IEEE International Conference on Service-Oriented System Engineering (SOSE), Newark</article-title>
          , CA, USA,
          <year>2022</year>
          , pp.
          <fpage>39</fpage>
          -
          <lpage>48</lpage>
          , doi: 10.1109/SOSE55356.
          <year>2022</year>
          .
          <volume>00011</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>D.</given-names>
            <surname>Nagothu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Xu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. Y.</given-names>
            <surname>Nikouei</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <article-title>"A Microservice-enabled Architecture for Smart Surveillance using Blockchain Technology," 2018 IEEE International Smart Cities Conference (ISC2), Kansas City</article-title>
          ,
          <string-name>
            <surname>MO</surname>
          </string-name>
          , USA,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>4</lpage>
          , doi: 10.1109/ISC2.
          <year>2018</year>
          .
          <volume>8656968</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Berezsky</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pitsun</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Datsko</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsmots</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Teslyuk</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <article-title>Specified diagnosis of breast cancer on the basis of immunogistochemical images analysis</article-title>
          .
          <source>CEUR Workshop Proceedings</source>
          ,
          <year>2020</year>
          ,
          <volume>2753</volume>
          , pp.
          <fpage>129</fpage>
          -
          <lpage>135</lpage>
          https://ceur-ws.
          <source>org/</source>
          Vol-
          <volume>2753</volume>
          /short5.pdf
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Berezsky</surname>
            , Oleh, Oleh Pitsun, Grygoriy Melnyk, Tamara Datsko, Ivan Izonin, and
            <given-names>Bohdan</given-names>
          </string-name>
          <string-name>
            <surname>Derysh</surname>
          </string-name>
          .
          <year>2023</year>
          .
          <article-title>"An Approach toward Automatic Specifics Diagnosis of Breast Cancer Based on an Immunohistochemical Image" Journal of Imaging 9</article-title>
          , no.
          <volume>1</volume>
          : 12. https://doi.org/10.3390/jimaging9010012
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>