Module 3: Designing

25. Exercise 4: Solution

Resources

Transcript

[00:03] Alright, Here is my solution to this exercise. We start a sequence with the customer placing an order through the web application. Then we send our request to the Core API, which gives us back channel ID, and we use the channel ID from the web up to register, using the register to the website customers using that channel.

[00:23] Then we start the loop. This is sort of the new concept that I thought you you could learn how to use. And I label this loop real time. You can label whatever you want and essentially it as long as we are a meeting, as we are connected to a real time server, the web socket server will emit real time events and the customer will receive those real time updates.

[00:46] Then I have this other concept here that is that if for some reason the connection fails, this one, we break out of the real time loop and we start the long polling process in which the web up is periodically checking the order status to the core API and sending the the customers the updates.

[01:04] And that’s it. I hope you gave this one to try and I really hope that sequence diagrams are useful in your future projects.