Skip to content

Commit

Permalink
chore: add cross-cutting concerns to the glossary
Browse files Browse the repository at this point in the history
  • Loading branch information
kasir-barati committed Aug 1, 2024
1 parent b1e7ff1 commit 7f3dafb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
18 changes: 17 additions & 1 deletion .github/docs/glossary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,26 @@
A durable storage system will reliably store data without data loss.
</dd>
<dt id="throughput">
<a href="#throughput"></a>
<a href="#throughput">#</a>
Throughput
</dt>
<dd>
Throughput measures the volume of data that passes through a network in a given period.
</dd>
<dt id="crossCuttingConcerns">
<a href="#crossCuttingConcerns">#</a>
Cross-cutting concerns
</dt>
<dd>
Aspects of a program affect multiple parts of the system and can't be cleanly contained within just one module or component. These aspects often get mixed into many different areas of the code, leading to two main problems:
<ul>
<li>
Scattering AKA code duplication.
</li>
<li>
Tangling AKA tight coupling.
</li>
</ul>
E.g. authentication, authorization, rate limiting, and general data format validation.
</dd>
</dl>
15 changes: 8 additions & 7 deletions .github/docs/microservices/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<ul>
<li>Handle complex routing.</li>
<li>
Message <a href="../glossary/README.md#durability">durability</a>
Message <a href="../glossary/README.md#durability">durability</a>.
</li>
<li>Large numbers of consumers.</li>
</ul>
Expand Down Expand Up @@ -231,7 +231,7 @@
8. You can deploy faster since each service is independent of others.
9. You can scale each service horizontally and vertically.
10. Well microservices architecture practice strong information hiding: meaning that each service's database schema is not exposed[^2] to the other services.
11. One of the implementation difficulties in a microservices architecture is that:
11. One of the implementation difficulties in a microservices architecture is referential integrity:
![Referential integrity](./referential-integrity.png)
12. API gateway plays a key role in this architecture.

Expand Down Expand Up @@ -292,10 +292,8 @@ We can have our validations in two different places:
<li>
<b>Consistency</b>:
ensuring consistent enforcement of rules across all
services. Particularly useful for cross-cutting concerns
such as authentication, authorization, rate limiting, and
general data format validation
<small>(Can be mitigated with things like having a monorepo, shared libs.)</small>.
services. Particularly useful for
<a href="../glossary/README.md#crossCuttingConcerns">cross-cutting concerns</a>.
</li>
<li>
<b>Security</b>: blocking potentially harmful requests
Expand Down Expand Up @@ -337,7 +335,10 @@ We can have our validations in two different places:
</td>
<td>
<ul>
<li>Duplicated validation logic across services.</li>
<li>
Duplicated validation logic across services.
<small>(Can be mitigated with things like having a monorepo, shared libs.)</small>.
</li>
<li>
Inconsistent validation logic across multiple services.
</li>
Expand Down

0 comments on commit 7f3dafb

Please sign in to comment.