wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Practical Architecture - DDD

Total questions: 12

Worksheet time: 24mins

Name
Class
Date
1.

When will we consider to create an aggregate microservice?

a)

When our business unit is in a monolith (backend/iot service)

b)

When we are part of a new squad in a new product domain

c)

When we have a new “concept” that is part of an MVP

d)

When we have a well defined business unit which has an identity and state management.

2.

When will we consider to create a bounded context microservice?

a)

When we have a new domain with too many unknowns

b)

When we have a new squad

c)

When we have aggregates which are related to each other

d)

When we have an extra field to add to an aggregate

3.

When will we consider an aggregate as complex aggregate microservice?

a)

When we need to update the aggregate state via domain event as part of a flow

b)

When we need to update the aggregate state via command (UI)

c)

When we have an aggregate with complex logic

d)

When we don’t want to create a new aggregate

4.

When will we consider creating a new View microservice?

a)

When we have a new not finalized business requirement that isn’t mapped well to an aggregate.

b)

When we find ourselves aggregating 2 or more data types in the frontend/apigateway/other service for a specific UI component

c)

When we want to implement a specific complex business logic related to some main entity in our system.

d)

We will create a new view service for every new product functional requirement.

5.

When will we consider aggregating data from 2 services in the apigateway ?

a)

When we find the need to aggregate 2 or more data types for a specific UI component

b)

When we need to manage a process for changing several microservices together.

c)

Implementing data aggregation or enrichment in the apigateway was done in the wild-wild-west and we need to stop doing this and moving to view-services.

d)

When the 2 services are related to the same Bounded-Context.

6.

When will we consider having persistency on View microservice ?

a)

Every view service should have persistency as default implementation.

b)

Only if the user needs to change the data state

c)

When the view-service represents a new data state based on other aggregates domain events (e.g: feeds) and we need the historical data

d)

When we want to boost the performance of our application using cache / building read optimized data

7.

When will we consider creating a new Cross-Cutting microservice?

a)

When we have a new business requirement that isn’t mapped well to an aggregate.

b)

When we find some business logic is repeatedly implemented in many services.

c)

When we have a new repeating functionality that contains no business logic.

d)

When we have a business requirement that must be implemented across many aggregates.

8.

When will we prefer to implement a Cross-Cutting microservice (over implementing a shared library)?

a)

When the functionality is short and simple to implement, we will usually prefer a microservice.

b)

When we require persistence it’s usually a good indication to prefer a microservice.

c)

When we provide a simple wrapper that communicates with a 3rd party service.

d)

When we have some complicated business rules involved in the  business logic.

9.

What are some good candidates for Cross-Cutting microservices?

a)

An SMS notification service

b)

A shopping cart service

c)

An Authentication service

d)

A user management and authorization service

10.

Which type of communications are “allowed”?

a)

aggregate->(command)->cross-cutting

,

aggregate->(domain-event)->aggregate

b)

view-service->(query)->aggregate

,

cross-cutting->(command)->aggregate

c)

aggregate->(domain-event)-aggregate

,

user/client->(command)->view-service

d)

aggregate->(service-request)->cross-cutting

,

aggregate->(domain-event)-aggregate

11.

When sending a domain event..

a)

We should understand which services might consume the event

b)

We should send it only if there is at least one consumer

c)

We shouldn't care about other current/future consumers

d)

We need to add as much as data to the payload to avoid future querying

12.

Which type of data should we send in the domain event payload? 

a)

The more information we add on what happens the better

b)

Only the domain event “identifiers” e.g. timestamp, what happened, id’s for reference etc 

c)

Depends on the consumers of the event

d)

Only immutable data