From ca590050e9b5647727bb3e3751310c3c536252d5 Mon Sep 17 00:00:00 2001 From: Duy Phung Date: Sat, 15 Apr 2023 05:29:02 +0800 Subject: [PATCH] Update README.md --- README.md | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index d7ebee6..003b61d 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,11 @@ Fundamental elements of DDD implementation in Golang microservice # Components +## Application Layer +- DTOs, Mapper & Presenter +- Request handlers +- Event handlers +- Message Publisher ## Domain Layer ### Entity - Mutable, has identity @@ -16,18 +21,3 @@ Fundamental elements of DDD implementation in Golang microservice ## Persistence Layer - Data Model - Repository - - -# Q&A -## Why UUIDv1 for entity's identity? -### Reasons (short) -- Need to have random, unique identity values for entities -- To decouple domain layer from persistence layer, we should not use table row's id for entity's identity -- MySQL support storing UUIDv1 as BINARY(16) in database which saves storage space -- Comparing UUIDv1 values is faster than comparing values of the other versions (they have common dash-separated groups if they are generated on a same machine) - -### References -- [Making UUIDs More Performant in MySQL](https://emmer.dev/blog/making-uuids-more-performant-in-mysql/) -- [Storing UUID Values in MySQL Tables](https://dev.mysql.com/blog-archive/storing-uuid-values-in-mysql-tables/) -- [GUID/UUID Performance Breakthrough](http://mysql.rjweb.org/doc.php/uuid) -- [Storing UUID Values in MySQL](https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/) \ No newline at end of file