Last active
February 26, 2017 06:22
-
-
Save tranvictor/095d60196947060bf4eb59c522faa79e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Design question: | |
How would you design some modules and their responsibilites to model this scenario: | |
The company needs a container which receives blocks (1 at a time continously), it waits to have `PackageNo` number of blocks | |
to wrap them to a package then sends the package to a server via HTTP. After the package is sent, the container gets a | |
transaction ID meaning that the package is delivered to the server. Unfortunately, the cointainer doesn't know if the package | |
is actually accepted by the server immediately because it has to do some verifications on that block. There is an API that can | |
be used periodically to check if the block is actually accepted or not. The container needs to know when a block is accepted | |
to call another API. | |
Hints: | |
1. What entities (modules, classes,...) do you think you need to model the container | |
2. What are their responsibilities and why do you decide to give them those responsibilities |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment