You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: distributed-counter/README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Typically, you can avoid concurrency issues by implementing optimistic concurren
29
29
30
30
## Solution
31
31
32
-
In a distributed counter solution, a group of distributed counter items are used to keep track of the number. By having the solution distribute the counter across multiple items, update operations can be performed on a random item without causing contention. Even more, the solution can calculate the total of all counters at any time using an aggregation of the values from each individual counter.
32
+
In a distributed counter solution, a group of distributed counters, implemented as documents, are used to keep track of the number. By having the solution distribute the counter across multiple documents, update operations can be performed on a random document without causing contention. Calculating the current counter value can be done at any time by performing an aggregation of the values across all the documents in a query.
33
33
34
34
## Sample implementation
35
35
@@ -89,7 +89,7 @@ You need to configure **two** application configuration files to run this app.
89
89
90
90
While on the Keys blade, make note of the `URI` and `PRIMARY KEY`. You will need these for the sections below.
91
91
92
-
1. Open the Visualizer project and add a new **appsettings.development.json** file with the following contents:
92
+
1. Open the **Visualizer** project and add a new **appsettings.development.json** file with the following contents:
93
93
94
94
```json
95
95
{
@@ -115,7 +115,7 @@ While on the Keys blade, make note of the `URI` and `PRIMARY KEY`. You will need
115
115
116
116
Next move to the other project.
117
117
118
-
1. Open the ConsumerApp project and add a new **appsettings.development.json** file with the following contents:
118
+
1. Open the **ConsumerApp** project and add a new **appsettings.development.json** file with the following contents:
119
119
120
120
```json
121
121
{
@@ -199,10 +199,10 @@ Next move to the other project.
199
199
200
200
## Summary
201
201
202
-
In conclusion, the Distributed Counter design pattern offers a powerful solution for managing count-related data in NoSQL databases. By leveraging distributed systems' capabilities, this pattern enables the seamless tracking of numeric values across various nodes, ensuring accuracy and scalability. Through careful design and implementation, applications can efficiently handle scenarios involving likes, votes, or any form of quantifiable interactions.
202
+
In conclusion, the Distributed Counter design pattern offers a powerful solution for managing count-related data in NoSQL databases. By leveraging multiple documents and randomizing access to reduce concurrency issues, this pattern enables the tracking of numeric values at any scale with accuracy. Through careful design and implementation, applications can efficiently handle scenarios involving likes, votes, product inventory or any form of quantifiable interactions where concurrency is an issue.
203
203
204
-
The beauty of the Distributed Counter lies in its ability to maintain consistencyin a distributed environment, achieving high availability and fault tolerance. By leveraging atomic operations and optimized data structures, it minimizes contention while delivering rapid and accurate count updates.
204
+
The beauty of the Distributed Counter lies in its ability to maintain consistency, achieving high availability and fault tolerance. By leveraging atomic operations and optimized data structures, it minimizes contention while delivering rapid and accurate count updates.
205
205
206
-
From social media interactions to monitoring system metrics, the Distributed Counter pattern empowers applications to handle dynamic, high-velocity scenarios. By incorporating this pattern, developers can harness the full potential of NoSQL databases, ensuring reliable count management that scales alongside user engagement and system growth.
206
+
From social media interactions, ecommerce or monitoring high-volume system metrics, the Distributed Counter pattern empowers applications to handle dynamic, high-velocity scenarios. By incorporating this pattern, developers can harness the full potential of NoSQL databases, ensuring reliable count management that scales alongside user engagement and system growth.
207
207
208
208
As technology continues to evolve, and as user interactions become increasingly diverse and complex, the Distributed Counter design pattern remains an essential tool in a developer's toolkit, providing a solid foundation foreffective count managementin the dynamic world of modern distributed applications.
Copy file name to clipboardExpand all lines: event-sourcing/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ While event sourcing can be implemented with various types of databases, this pa
23
23
24
24
1. Flexible schema: NoSQL databases generally allow for schema flexibility. Easy support for unstructured event data formats that are often in JSON formats align perfectly with the needs of event sourcing architectures.
25
25
26
-
1. Scalability: NoSQL databases are typically designed for high scale. Data volumes in event sourcing patterns can range from the thousands to millions of messages per second. An underlying database needs to scale and do so seemlessly. Azure Cosmos DB's scale-out architecture is well-suited here with highly elastic throughput and storage.
26
+
1. Scalability: NoSQL databases are typically designed for high scale. Data volumes in event sourcing patterns can range from the thousands to millions of messages per second. An underlying database needs to scale and do so seamlessly. Azure Cosmos DB's scale-out architecture is well-suited here with highly elastic throughput and storage.
0 commit comments