[Stephen Grider] Microservices with Node JS and React [ENG, 2020]
19. Listening for Events and Handling Concurrency Issues
02. Reminder on Listeners
03. Blueprint for Listeners
05. Simple onMessage Implementation
07. Ticket Updated Listener Implementation
08. Initializing the Listeners
$ cd nats-test
$ npm update @grider-ms-tickets/common
CREATE TICKET
UPDATE TICKET
10. Clear Concurrency Issues
11. Reminder on Versioning Records
12. Optimistic Concurrency Control
13. Mongoose Update-If-Current
$ cd tickets
$ npm install --save mongoose-update-if-current
14. Implementing OCC with Mongoose
$ cd tickets
$ npm run test
18. Including Versions in Events
$ cd common
$ npm run pub
$ cd orders
$ npm update @grider-ms-tickets/common
$ cd tickets
$ npm update @grider-ms-tickets/common
19. Updating Tickets Event Definitions
20. Applying a Version Query
$ cd orders
$ npm install --save mongoose-update-if-current
CREATE TICKET
UPDATE TICKET
Everything works after updates
22. Abstracted Query Method
CREATE TICKET
UPDATE TICKET
23. [Optional] Versioning Without Update-If-Current
25. A Complete Listener Test
27. Testing the Ticket Updated Listener
32. Listeners in the Tickets Service
33. Building the Listener
34. Strategies for Locking a Ticket
36. Setup for Testing Reservation
$ cd tickets
$ npm run test
39. Private vs Protected Properties
40. Publishing While Listening
$ cd tickets
$ npm update @grider-ms-tickets/common
$ cd orders
$ npm update @grider-ms-tickets/common
41. Mock Function Arguments
$ cd tickets
$ npm run test
Sometime tests works sometime not. I did not find the reason. When run only one can works.
42. Order Cancelled Listener
43. A Lightning-Quick Test
43. A Lightning-Quick Test
44. Don't Forget to Listen!
45. Rejecting Edits of Reserved Tickets
Marley
Any questions in english: Telegram Chat
Любые вопросы на русском: Телеграм чат