Skip to content

Commit 343083c

Browse files
committed
more docs
1 parent be7254b commit 343083c

File tree

25 files changed

+2519
-35
lines changed

25 files changed

+2519
-35
lines changed
151 KB
Loading
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
168 KB
Loading
File renamed without changes.

modules/ROOT/nav.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
** xref:01-system-design/architecture/index.adoc[Architecture]
66
*** xref:01-system-design/architecture/monolithic.adoc[Monolithic]
77
*** xref:01-system-design/architecture/hexagonal-architecture/index.adoc[Hexagonal architecture]
8-
*** xref:01-system-design/architecture/n-tier-architecture.adoc[N-Tier architecture]
8+
*** xref:01-system-design/architecture/layered/n-tier-architecture.adoc[N-Tier architecture]
99
*** xref:01-system-design/architecture/microservice/microservice.adoc[Microservices]
1010
**** xref:01-system-design/architecture/microservice/cloud-native-microservices.adoc[Cloud Native Microservices]
1111
**** xref:01-system-design/architecture/microservice/articles/articles.adoc[Articles]
@@ -217,7 +217,9 @@
217217

218218
* xref:13-logging/index.adoc[Logging]
219219
** xref:13-logging/servers/index.adoc[Logging Servers]
220-
*** xref:13-logging/servers/loki/index.adoc[Grafana Loki]
220+
** xref:13-logging/servers/01-log-collection-and-aggregation/fluentbit.adoc[fluentbit]
221+
*** xref:13-logging/servers/02-log-storage-and-search/loki/index.adoc[Grafana Loki]
222+
*** xref:13-logging/servers/03-log-data-visualization-and-querying/grafana.adoc[Grafana]
221223
*** xref:13-logging/servers/ELK/elk.adoc[ELK stack]
222224
** xref:13-logging/libraries/index.adoc[Logging Libraries]
223225
** xref:13-logging/articles/articles.adoc[Logging Articles]

modules/ROOT/pages/01-system-design/architecture/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ will include name, address, and billing information.
128128
The result of this analysis, the high-level overview of the domain model, is shown
129129
in next figure. Let’s briefly discuss some interesting features of this model:
130130
131-
image::{figures}/caveatemptor-domain-model-and-their-relationships.png[Persistent classes of the CaveatEmptor domain model and their relationships]
131+
//image::{figures}/caveatemptor-domain-model-and-their-relationships.png[Persistent classes of the CaveatEmptor domain model and their relationships]
132132
133133
- Each item can be auctioned only once, so you don’t need to make Item distinct
134134
from any auction entities. Instead, you have a single auction item entity named

modules/ROOT/pages/01-system-design/communication-patterns/index.adoc

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
= Communication Patterns
2-
:figures: 01-system-design
2+
:figures: 01-system-design/communication-patterns
33

44
A summary of how you can combine patterns and tools. Keep in mind
55
that this is just a recommendation. you might have your own
@@ -145,3 +145,63 @@ consider both the benefits and drawbacks.
145145
When you expect high traffic and concurrency with fewer computational
146146
resources, the reactive paradigm can improve the application’s scalability, resil-
147147
ience, and cost-effectiveness at the expense of a steeper initial learning curve.
148+
149+
When developing reactive microservices, it is not always obvious when to use non-blocking synchro-
150+
nous APIs and when to use event-driven asynchronous services. In general, to make a microservice
151+
robust and scalable, it is important to make it as autonomous as possible, for example, by minimizing
152+
its runtime dependencies. This is also known as loose coupling. Therefore, the asynchronous mes-
153+
sage passing of events is preferable over synchronous APIs. This is because the microservice will only
154+
depend on access to the messaging system at runtime, instead of being dependent on synchronous
155+
access to a number of other microservices.
156+
There are, however, a number of cases where synchronous APIs could be favorable. For example:
157+
158+
• For read operations where an end user is waiting for a response
159+
• Where the client platforms are more suitable for consuming synchronous APIs, for example,
160+
mobile apps or SPA web applications
161+
• Where the clients will connect to the service from other organizations – where it might be
162+
hard to agree on a common messaging system to use across organizations
163+
164+
[tabs]
165+
======
166+
CaveatEmptor::
167+
+
168+
169+
Cities API::
170+
+
171+
172+
Multiplication microservices::
173+
+
174+
175+
Microservices with Spring Boot 3 and Spring Cloud::
176+
+
177+
However, one major concern was identified . Updating (creating or deleting) a composite
178+
entity—an entity whose parts are stored in a number of microservices—using synchronous APIs can
179+
lead to inconsistencies, if not all involved microservices are updated successfully. This is, in general,
180+
not acceptable. This leads us into reactive microservices, where we will look into why and how to build
181+
reactive microservices, that is, microservices that are scalable and robust.
182+
+
183+
For the system landscape in this book, we will use the following:
184+
+
185+
• The create, read, and delete services exposed by the product composite microservice will be
186+
based on non-blocking synchronous APIs. The composite microservice is assumed to have
187+
clients on both web and mobile platforms, as well as clients coming from other organizations
188+
rather than the ones that operate the system landscape. Therefore, synchronous APIs seem
189+
like a natural match.
190+
• The read services provided by the core microservices will also be developed as non-blocking
191+
synchronous APIs since there is an end user waiting for their responses.
192+
• The create and delete services provided by the core microservices will be developed as
193+
event-driven asynchronous services, meaning that they will listen for create and delete events
194+
on topics dedicated to each microservice.
195+
• The synchronous APIs provided by the composite microservices to create and delete aggregated
196+
product information will publish create and delete events on these topics. If the publish opera-
197+
tion succeeds, it will return with a 202 (Accepted) response; otherwise, an error response will
198+
be returned. The 202 response differs from a normal 200 (OK) response – it indicates that the
199+
request has been accepted, but not fully processed. Instead, the processing will be completed
200+
asynchronously and independently of the 202 response.
201+
+
202+
images::{figures}/Microservices-with-Spring-Boot-and-Spring-Cloud-communication-pattern.png
203+
204+
Polar Book Shop::
205+
+
206+
207+
======

0 commit comments

Comments
 (0)