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: README.md
+9-57Lines changed: 9 additions & 57 deletions
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,11 @@
5
5
- The project follows [**CloudNative**](https://www.cncf.io/) recommendations and The [**twelve-factor app**](https://12factor.net/) methodology for building *software-as-a-service apps* to show how μServices should be developed and deployed.
6
6
- This project uses cutting edge technologies like Docker, Kubernetes, Elasticsearch Stack for
7
7
logging and monitoring, Java SE 14, MySQL, and MongoDB databases, all components developed with TDD in mind, covering integration & performance testing, and many more.
8
-
9
-
------
10
-
I am developing this project as stages, and all such steps are documented under the project **Springy Store μServices**[wiki page](https://github.com/mohamed-taman/Springy-Store-Microservices/wiki). Each such stage will be a release in its own, so you can go back and forward between versions to see the differences and how adding things solve specific problems we face.
11
-
12
-
<u>For example, </u> in the first stage (1st release), I just created project structure, essential services' skeleton, integration between them, and finally write integration testing as well as semi-automated testing for the complete services' functionality.
13
-
14
-
At the 1st stage, the **Recommendation** and **Review** microservices generate local in-memory data, and **Store Service** calls the other three services (*Product*, *Recommendation*, and *Review*) statically to generate client aggregate response for a specific product. Therefore, in:
15
-
16
-
- The second stage I will introduce **database integration**, then in (***done***)
17
-
- The third stage I will add **Dockerization** of our services and **docker-compose**, and in (***done***)
18
-
- In the fourth stage, I will introduce **service discovery**, and so on.
19
-
20
-
## System components Structure
8
+
- This project is going to be developed as stages, and all such stage steps are documented under
9
+
the project **Springy Store μServices**[wiki page](https://github.com/mohamed-taman/Springy-Store-Microservices/wiki).
10
+
---
11
+
## Getting started
12
+
### System components Structure
21
13
Let's explain first the system structure to understand its components:
22
14
```
23
15
Springy Store μService --> Parent folder.
@@ -50,23 +42,6 @@ Springy Store μService --> Parent folder.
50
42
```
51
43
Now, as we have learned about different system components, then let's start.
52
44
53
-
## Getting started
54
-
55
-
The first stage, aka (**Release v1.0**), is about creating and implementing a set of project Microservices.
56
-
57
-
### Creating a Set of Cooperating Microservices (Release v1.0)
58
-
59
-
The following topics are going to be covered in this 1st stage (other stages topics will be documented in the project wiki pages):
60
-
61
-
- Introducing the microservice landscape.
62
-
- Generating skeleton microservices.
63
-
- Adding RESTful APIs.
64
-
- Adding a **Store**, **Product**, **Recommendation**, and **Review** microservices.
65
-
- Adding error handling.
66
-
- Testing the APIs manually.
67
-
- Adding automated tests of microservices in isolation.
68
-
- Adding semi-automated tests to a microservice landscape.
69
-
70
45
### System Boundary - μServices Landscape (Release 6.0-Latest)
Test OK (HTTP Code: 404, {"httpStatus":"NOT_FOUND","message":"No product found for productId: 13","path":"/store/api/v1/products/13","time":"2020-04-12@12:34:25.144+0000"})
304
-
Test OK (HTTP Code: 200)
305
-
Test OK (actual value: 113)
306
-
Test OK (actual value: 0)
307
-
Test OK (actual value: 3)
308
-
Test OK (HTTP Code: 200)
309
-
Test OK (actual value: 213)
277
+
...
310
278
Test OK (actual value: 3)
311
279
Test OK (actual value: 0)
312
280
Test OK (HTTP Code: 422, {"httpStatus":"UNPROCESSABLE_ENTITY","message":"Invalid productId: -1","path":"/store/api/v1/products/-1","time":"2020-04-12@12:34:26.243+0000"})
@@ -319,24 +287,14 @@ Test OK (HTTP Code: 403, )
319
287
Start Circuit Breaker tests!
320
288
Test OK (actual value: CLOSED)
321
289
Test OK (HTTP Code: 500, {"timestamp":"2020-05-26T00:09:48.784+00:00","path":"/store/api/v1/products/2","status":500,"error":"Internal Server Error","message":"Did not observe any item or terminal signal within 2000ms in 'onErrorResume' (and no fallback has been configured)","requestId":"4aa9f5e8-119"})
322
-
Test OK (actual value: Did not observe any item or terminal signal within 2000ms)
323
-
Test OK (HTTP Code: 500, {"timestamp":"2020-05-26T00:09:51.033+00:00","path":"/store/api/v1/products/2","status":500,"error":"Internal Server Error","message":"Did not observe any item or terminal signal within 2000ms in 'onErrorResume' (and no fallback has been configured)","requestId":"4aa9f5e8-120"})
324
-
Test OK (actual value: Did not observe any item or terminal signal within 2000ms)
325
-
Test OK (HTTP Code: 500, {"timestamp":"2020-05-26T00:09:53.276+00:00","path":"/store/api/v1/products/2","status":500,"error":"Internal Server Error","message":"Did not observe any item or terminal signal within 2000ms in 'onErrorResume' (and no fallback has been configured)","requestId":"4aa9f5e8-121"})
290
+
...
326
291
Test OK (actual value: Did not observe any item or terminal signal within 2000ms)
327
292
Test OK (HTTP Code: 200)
328
293
Test OK (actual value: Fallback product2)
329
294
Test OK (HTTP Code: 200)
330
295
Test OK (actual value: Fallback product2)
331
296
Test OK (HTTP Code: 404, {"httpStatus":"NOT_FOUND","message":"Product Id: 14 not found in fallback cache!","path":"/store/api/v1/products/14","timestamp":"2020-05-26@00:09:53.998+0000"})
332
-
Test OK (actual value: Product Id: 14 not found in fallback cache!)
333
-
Will sleep for 10 sec waiting for the CB to go Half Open...
334
-
Test OK (actual value: HALF_OPEN)
335
-
Test OK (HTTP Code: 200)
336
-
Test OK (actual value: product name C)
337
-
Test OK (HTTP Code: 200)
338
-
Test OK (actual value: product name C)
339
-
Test OK (HTTP Code: 200)
297
+
...
340
298
Test OK (actual value: product name C)
341
299
Test OK (actual value: CLOSED)
342
300
Test OK (actual value: CLOSED_TO_OPEN)
@@ -389,11 +347,5 @@ Removing network ssm_default
389
347
### The End
390
348
Happy coding :)
391
349
392
-
### Credit for Original Code
393
-
The code here at first inspired by the book [Hands-On Microservices With Spring Boot and Spring
394
-
Cloud book by Packt Publishing](https://www.packtpub.com/web-development/hands-on-microservices-with-spring-boot-and-spring-cloud). Here I am adding more business concepts, while
395
-
kepping the project software stack updated to the most recent software versions. Besides
396
-
, adding more use cases and problems, my team and I are facing in a day by day work.
397
-
398
350
# License
399
351
Copyright (C) 2017-2020 Mohamed Taman, Licensed under the MIT License.
0 commit comments