Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Microservices are one of the most important and popular software architecture trends. This architecture forms the base for a lot of companies including: Amazon, Netflix, Spotify, and Uber.
In this course you’ll learn microservices in depth and understand reasons for and against microservices. Beyond that, you’ll learn about Micro and Macro architecture, strategies for migrating old systems, the role of Docker in this architecture, and technologies for implementing microservices.
After taking this course, you’ll be better equipped to implement microservices for your own use.
Q1. A microservice should not be any longer than a few hundred lines of code.
Q2. Microservices are _____.
Q3. A key feature of the microservices architecture is that a new version of the entire application is deployed when a change is made to any one microservice.
Q1. Why is it NOT likely that a developer will introduce a new dependency between two modules in a microservice architecture?
Q1. In what phase of continuous delivery would the performance of an application be checked against the expected load?
Q2. Setting up an environment to integration test a microservices architecture can be complicated
Q1. In a microservice architecture, what will happen if one microservice crashes?
Q2. Free technology choice is a consequence of stronger isolation
Q3. Suppose you are designing a small social network. Which microservices would be the most appropriate to divide it into from the given options?
Q1. Docker containers can help to make microservices independently deployable.
Q2. Suppose you are designing a small social network and you come up with a domain-based microservice to search posts. Which of the following are plausible technical divisions of this?
Q1. Suppose you’re designing an application where one microservice gets data from another. If this data fetching fails, the functionality of the app will be compromised. What would be the best course of action in this situation?
Q2. Automated deployment can save considerable effort with microservices.
Q3. Microservices should only be tested independently. Testing them together should be avoided.
Q1. The e-commerce system discussed in the last chapter, can be divided into microservices like so:
Suppose the product search team decides to optimize search with a new algorithm. Is this a micro or macro architecture decision?
Q2. It does not matter if the microservices can work with each other.
Q3. The macro architecture consists of all decisions which have to be made at an individual level for each microservice.
Q1. Suppose you’re given the following e-commerce system:
What will happen to the rest of the modules if the internal architecture of order process is changed as follows:
Q2. Communication between bounded contexts can be triggered from ___.
Q3. Why are domain models that span multiple bounded contexts difficult to implement?
Q1. Consider the following two teams as a part of a small social media app.
Which team is upstream and which is downstream in terms of strategic design?
Q2. Consider a pizza delivery app. The two bounded contexts, delivery and purchase are done by different teams. However, delivery can give requirements to purchase. Which pattern describes this situation?
Q3. Which pattern should NOT be used in a microservices scenario?
Q4. How to pass configuration patterns to a microservice MUST be a decision of the individual microservice.
Q1. Suppose that it has been decided to use a REST interface between microservices for communication. What sort of technical decision could this have been?
Q2. Suppose you’re part of a team that is building a small social media app. You come across a document that details the dependencies between all the microservices of the app. Was that document written as part of the macro architecture, micro architecture, or both?
Q3. Integration tests are a ___ architectural decision.
Q1. Which of the following best describes why storing logs on a specialized log server is adventageous?
Q2. Which configuration patterns to include MUST be a decision of the individual microservice.
Q1. Which of the following macro architecture rules are better and why?
Q2. A microservices system may graduate from one where all microservices use one language to one where each uses a different language.
Q3. What could happen if a macro architecture rule is violated?
Q1. Even if an operational technology is not standardized at the macro architecture level, certain technologies are naturally conformed to by teams that communicate well.
Q2. Which of the following is a good way to enforce a macro architecture decision as described above?
Q3. A black box conformance test ______.
Q1. The communication method between microservices has to be standardized.
Q2. Does a system where two microservices use different technologies for log analysis violate ISA rules?
Q3. Once a user logs in, they must be able to access all functionalities of all microservices.
Q1. Suppose a whitelist for the databases is defined at the macro level. Which of the following is true concerning the decision to use a specific database?
Q1. Converting a monolithic system to a microservices system is called a _____.
Q2. It is NOT possible to implement a microservices system from scratch.
Q1. A team of two, working on a popular monolithic website with a very small codebase that started 15 years ago want to migrate to a microservices system. What would the primary reason for the migration be?
Q2. Depending on the reason for migrating, the procedure for implementing them may vary.
Q1. In what circumstances can synchronous communication be preferable?
Q2. Changes to the data can be communicated via?
Q3. In a black box migration scenario, which bounded context is a good choice to extract first?
Q1. When should the copy/change strategy be used?
Q2. Suppose as part of a migration, the UI, logic and data are all migrated separately. What migration strategy is likely being followed here?
Q1. Why are changes that affect both the legacy system and the microservices difficult to implement?
You can pick more than one answer.
Q2. It is risky to implement all changes at once
Q1. A Dockerfile
describes the installation of software in a simple way.
Q2. How can developers implement Docker-like systems?
Q1. Which of the following is NOT a reason why microservices must at least be implemented as separate processes?
Q2. Which of the following is NOT a reason why processes are NOT the best solution to deploy microservices separately?
Q3. What is a virtual machine?
Q4. Why are virtual machines NOT the best solution for separate deployment of microservices either?
Q1. Consider an application where all the microservices have to be individually externally accessible from the network. Does Docker solve the issue of keeping track of unused ports that the host machine has?
Q2. Why should only one process run in a Docker container?
Q3. In a Docker container should there be daemon or background processes in addition to the foreground process?
Q1. Which of the following best describes how the COPY
command works?
COPY <src> <dst>
COPY <dst>
COPY <dst> <src>
Q2. Which of the following best describes what the CMD
statement would do in a microservices context?
Q3. What does the following COPY
statement do in a Docker container with a Windows base-image?
COPY code.cpp c:\\
code
folder in the Docker containercode.cpp
file in the host system to C directory of the Docker containerQ4. What sub directory is the Dockerfile
expected to be in in the following build command?
docker build --tag=educative educative-courses
educative
educative-courses
courses
Q5. Suppose you used the following Dockerfile
to build an image. Then, sometime later, some updates have been rolled out and naturally, the base image has changed. You try to build the image using the same file again, but notice no updates. What is happening and how can you fix the issue?
FROM ubuntu:15.04
RUN apt-get update ; apt-get dist-upgrade -y -qq
Dockerfile
. The -y
flag will not allow it to build--no-cache=true
flag with the build command should fix this.Dockerfile
.Q6. Why are multi-stage builds useful?
Q7. With each build of a Docker container, everything is reinstalled from scratch.
Q1. What is the purpose of Docker Compose?
Q2. Consider the following YAML file:
version: '3'
services:
process:
build: ../scs-demo-esi-common/
links:
- finish
- order
order:
build: ../scs-demo-esi-order
finish:
build: finish
ports:
- "3000:8080"
Which service binds a port to a port on the host?
Q3.
version: '3'
services:
process:
build: ../scs-demo-esi-common/
links:
- finish
- order
order:
build: ../scs-demo-esi-order
finish:
build: finish
ports:
- "3000:8080"
Which service has Docker Compose links to other services?
Q1. Why should applications run in a cluster?
Q2. What is Kubernetes?
Q1. Which technology are microservices often implemented with as stated above?
Q2. One of the weaknesses of microservices is that different technologies can be used in each individual microservice.
Q1. What are the factors that influence the technical Micro Architecture?
Q2. It is a _________ decision which communication protocol is used.
Q3. In principle, different libraries can be used for implementing a macro architecture rule which for instance predefines a log format and a log server. In this case, the micro architecture has to choose a library for the microservice.
Q4. When implementing new features Microservices, we usually have two ways to go about it. These are:
Q5. Resilience means that each microservice has to be able to deal with the failure of other microservices.
Q1. Elastic means that:
Q2. Responsive means that the system:
Q3. In Reactive Programming, the event loop is a thread and processes one event at a time. Instead of waiting for I/O, the processing of the event is suspended. Once the results of the I/O operation are available, they are part of a new event which is processed by the event loop.
In this way, a single event loop can process a plethora of network connections.
Q4. A microservice MUST be implemented with reactive programming in order to achieve the goals of the Reactive Manifesto.
Q1. The version of the Maven parent indirectly determines which version of Spring Boot is used.
Q2. The following method responds to requests to which URL?
@RequestMapping("/") public String hello() {
return "hello\n";
}
RequestMapping/
/
hello\n
Q1. Why is Tomcat server NOT considered to be a dependency of our application?
Q2. What is Spring Cloud?
Q3. What does the following command do?
mvn clean package
Q1. What does MVC in the context of Spring Boot stand for?
Q2. How is view-based rendering avoided in Spring MVC?
@ResponseBody
annotation and many HttpMessageConverter
implementations@HttpMessageConverter
annotation and many ResponseBody
implementationsQ1. What is Kafka?
Q2. Java libraries can NOT be used with Spring Boot projects.
Q1. A spring boot application can NOT read configuration from ______.
Q2. A spring boot application can generate logs in which of the following formats?
Q3. Deploying a spring boot application is incredibly complex.
Q4. To deploy a Spring Boot application, it is enough to just copy the JAR file to the server and start it.
Q5. Settings for the configuration of the microservices or for logging can be defined in the metrics file.
Q1. Name a library that can be used for resilience in Java.
Q1. What are the advantages of using multistage builds to compile Go code?
Q2. What is Go?
Q3. Go is based in C.
Q1. What is viper
?
Q2. Go does NOT support logs
Q3. Adding a new microservice to a Go application requires a considerable amount of effort.
I hope this An Introduction to Microservice Principles and Concepts Educative Quiz Answers would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>