== Some thoughts regarding Microservice-based application
.Distributed Service Placement for Microservice-based Applications
****
Nowadays whith applications becoming more and more powerfull, users more demanding and IOT devices taking swarming our lives, the need for maximizing *_location awarenes_* and minimizing delay has entered the field.
Thus we cannot relliably trust a signle central data point and have to mingrate to versatile and distributed systems moving the brain of our application ever closer to the user (edge).
*_Multi-access Edge (MEC)_* Computing was born.
[TIP]
====
*_Location-aware_* technology is any technology that is able to detect its current location and then analyze this data to control event and information flow. https://en.wikipedia.org/wiki/Location_awareness[Wikipedia^]
*_MEC_* can be defined as cloud services running at the edge of a network and performing specific tasks — in real- or near-real-time https://en.wikipedia.org/wiki/Edge_computing[wikipedia]
====
To adapt to the above we can shift towards:
* small and scalable data-centers placed closed to the cloud edge
* minimalization of backbone data transmission
****
=== this tools will help
*Container technologies* (Docker), and *orchestration/maintenance tools* (Kubernetes, DockerSwarm etc), are becoming the mainstream solution for packaging, deploying, maintaining, and healing applications.
Each microservice decoupled from the application can be packaged as a Docker image and each microservice instance is a Docker container.
Kubernetes for example is one of the best examples for creating cloud-native applications and leveraging the benefits of a distributed system.
=== and here is the problem
*Problem:*
When all of the services are placed on one edge site, network congestion is inevitable.
*Solution:*
With one service deployed on more than one edge site, requests from different end users at different locations can be balanced, so as to ensure the high availability of service and the robustness of the provision platform.
*But*, most tools used have some hard limits concerning this.
* It is often treated as a single abstract service with given input and output data size.
* Time series or composition property of services are not fully taken into consideration.
* Due to the heterogeneity of edge sites, such as different CPU cycle frequency and memory footprint, varying background load, transient network interrupts and so on, the service provision platform might face greatly slowdowns or even runtime crash.
* the default assignment, deployment, and management of containers does not fully take the heterogeneity in both physical and virtualized nodes into consideration.
* Besides, the healing capability of Kubernetesis principally monitoring the status of containers, pods, and nodes and timely restarting the failures, which is not enough for high availability.
* in some cases when the pod failure happens, the outage time of the corresponding service could be dozens of seconds.
** When node failure happens, the outage time could be dozens of minutes
=== Suggestion
Therefore, we have to create a better maybe even using different tools to better manage the distribution of our system data and eliminate the problems mentioned above.
This solution will most likely have to be able to utilize multiple edge applications/host at once to balance out the load on one single node.
However,
* Such kind of service requires redundancy and the amount of hosts needed is difficult to agree upon since the network constantly changes.
* Therefore our best bet is to seperate the different cases and try our best to analyze the data and plan our service.
Another problem , currenty not tackled by any major providers are unique attributes of each location, like traditional or human behavioural patterns (for example parking in cetral Rome or a Greek island!).
Gathering data from different requests and places we have to design an algorithm to better utilize the location-specific information.
Our target would be to slowly adapt to all locations and various unique details of each of them.
* better services for the end users always keeping in mind to best distribute our system
* creation of a general microservice based chain-application that works as one, large, redundant, distributed system
@ -588,6 +595,159 @@ Dynamic infrastructure: services can scale up and down without waiting for each
<divclass="sect2">
<h3id="_configuration">1.4. Configuration</h3>
</div>
</div>
</div>
<divclass="sect1">
<h2id="_some_thoughts_regarding_microservice_based_application">2. Some thoughts regarding Microservice-based application</h2>
<divclass="sectionbody">
<divclass="sidebarblock">
<divclass="content">
<divclass="title">Distributed Service Placement for Microservice-based Applications</div>
<divclass="paragraph">
<p>Nowadays whith applications becoming more and more powerfull, users more demanding and IOT devices taking swarming our lives, the need for maximizing <strong><em>location awarenes</em></strong> and minimizing delay has entered the field.</p>
</div>
<divclass="paragraph">
<p>Thus we cannot relliably trust a signle central data point and have to mingrate to versatile and distributed systems moving the brain of our application ever closer to the user (edge).</p>
</div>
<divclass="paragraph">
<p><strong><em>Multi-access Edge (MEC)</em></strong> Computing was born.</p>
</div>
<divclass="admonitionblock tip">
<table>
<tr>
<tdclass="icon">
<iclass="fa icon-tip"title="Tip"></i>
</td>
<tdclass="content">
<divclass="paragraph">
<p><strong><em>Location-aware</em></strong> technology is any technology that is able to detect its current location and then analyze this data to control event and information flow. <ahref="https://en.wikipedia.org/wiki/Location_awareness"target="_blank"rel="noopener">Wikipedia</a></p>
</div>
<divclass="paragraph">
<p><strong><em>MEC</em></strong> can be defined as cloud services running at the edge of a network and performing specific tasks — in real- or near-real-time <ahref="https://en.wikipedia.org/wiki/Edge_computing">wikipedia</a></p>
</div>
</td>
</tr>
</table>
</div>
<divclass="paragraph">
<p>To adapt to the above we can shift towards:</p>
</div>
<divclass="ulist">
<ul>
<li>
<p>small and scalable data-centers placed closed to the cloud edge</p>
</li>
<li>
<p>minimalization of backbone data transmission</p>
</li>
</ul>
</div>
</div>
</div>
<divclass="sect2">
<h3id="_this_tools_will_help">2.1. this tools will help</h3>
<divclass="paragraph">
<p><strong>Container technologies</strong> (Docker), and <strong>orchestration/maintenance tools</strong> (Kubernetes, DockerSwarm etc), are becoming the mainstream solution for packaging, deploying, maintaining, and healing applications.</p>
</div>
<divclass="paragraph">
<p>Each microservice decoupled from the application can be packaged as a Docker image and each microservice instance is a Docker container.</p>
</div>
<divclass="paragraph">
<p>Kubernetes for example is one of the best examples for creating cloud-native applications and leveraging the benefits of a distributed system.</p>
</div>
</div>
<divclass="sect2">
<h3id="_and_here_is_the_problem">2.2. and here is the problem</h3>
<divclass="paragraph">
<p><strong>Problem:</strong></p>
</div>
<divclass="paragraph">
<p>When all of the services are placed on one edge site, network congestion is inevitable.</p>
</div>
<divclass="paragraph">
<p><strong>Solution:</strong></p>
</div>
<divclass="paragraph">
<p>With one service deployed on more than one edge site, requests from different end users at different locations can be balanced, so as to ensure the high availability of service and the robustness of the provision platform.</p>
</div>
<divclass="paragraph">
<p><strong>But</strong>, most tools used have some hard limits concerning this.</p>
</div>
<divclass="ulist">
<ul>
<li>
<p>It is often treated as a single abstract service with given input and output data size.</p>
</li>
<li>
<p>Time series or composition property of services are not fully taken into consideration.</p>
</li>
<li>
<p>Due to the heterogeneity of edge sites, such as different CPU cycle frequency and memory footprint, varying background load, transient network interrupts and so on, the service provision platform might face greatly slowdowns or even runtime crash.</p>
</li>
<li>
<p>the default assignment, deployment, and management of containers does not fully take the heterogeneity in both physical and virtualized nodes into consideration.</p>
</li>
<li>
<p>Besides, the healing capability of Kubernetesis principally monitoring the status of containers, pods, and nodes and timely restarting the failures, which is not enough for high availability.</p>
</li>
<li>
<p>in some cases when the pod failure happens, the outage time of the corresponding service could be dozens of seconds.</p>
<divclass="ulist">
<ul>
<li>
<p>When node failure happens, the outage time could be dozens of minutes</p>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<divclass="sect2">
<h3id="_suggestion">2.3. Suggestion</h3>
<divclass="literalblock">
<divclass="content">
<pre>Therefore, we have to create a better maybe even using different tools to better manage the distribution of our system data and eliminate the problems mentioned above.</pre>
</div>
</div>
<divclass="literalblock">
<divclass="content">
<pre>This solution will most likely have to be able to utilize multiple edge applications/host at once to balance out the load on one single node.</pre>
</div>
</div>
<divclass="paragraph">
<p>However,</p>
</div>
<divclass="ulist">
<ul>
<li>
<p>Such kind of service requires redundancy and the amount of hosts needed is difficult to agree upon since the network constantly changes.</p>
</li>
<li>
<p>Therefore our best bet is to seperate the different cases and try our best to analyze the data and plan our service.</p>
</li>
</ul>
</div>
<divclass="paragraph">
<p>Another problem , currenty not tackled by any major providers are unique attributes of each location, like traditional or human behavioural patterns (for example parking in cetral Rome or a Greek island!).</p>
</div>
<divclass="paragraph">
<p>Gathering data from different requests and places we have to design an algorithm to better utilize the location-specific information.</p>
</div>
<divclass="paragraph">
<p>Our target would be to slowly adapt to all locations and various unique details of each of them.</p>
</div>
<divclass="ulist">
<ul>
<li>
<p>better services for the end users always keeping in mind to best distribute our system</p>
</li>
<li>
<p>creation of a general microservice based chain-application that works as one, large, redundant, distributed system</p>