0% found this document useful (0 votes)
32 views41 pages

Lab 10. Architectural Styles - Innopolis

The document outlines various architectural styles in software architecture, including layered, pipeline, microkernel, service-based, event-driven, space-based, orchestration-driven, and microservices architectures. Each style is described with its properties and advantages, along with exercises and homework assignments for practical application. The homework encourages students to analyze and redesign their project architectures based on the styles learned in the lab.

Uploaded by

Relisqu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views41 pages

Lab 10. Architectural Styles - Innopolis

The document outlines various architectural styles in software architecture, including layered, pipeline, microkernel, service-based, event-driven, space-based, orchestration-driven, and microservices architectures. Each style is described with its properties and advantages, along with exercises and homework assignments for practical application. The homework encourages students to analyze and redesign their project architectures based on the styles learned in the lab.

Uploaded by

Relisqu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Lab 10.

Architectural Styles
Agenda

1. Architecture styles

…spoilers…

2. Exercises
3. Homework
The slides for this lab are based on the Part II of Fundamentals of software architecture: an
engineering approach. You’re highly recommended to read it!
1. Layered architecture style
1. Layered architecture style

Properties:

- Layers are independent


- Layers can be either open or closed:
- Open layers can be bypassed
- Closed layers cannot be bypassed
- Advantages/disadvantages
- Can be partitioned in several ways upon deployment
1. Layered architecture style

- Example deployment diagrams:


-
2. Pipeline architecture style

-
2. Pipeline architecture style

Properties:

- Consists of pipes and filters


- Pipes are simple:
- unidirectional (as opposed to bidirectional)
- point-to-point (as opposed to broadcast or multicast)
- Filters are somewhat functional:
- self contained
- independent
- stateless
- There are 4 types of filters:
1. Producer
2. Transformer
3. Tester
4. Consumer
2. Pipeline architecture style
3. Microkernel architecture style
3. Microkernel architecture style

Properties:

- The core system is minimal


- The core system might itself be layered or modular
- The plugins are independent
- The plugins communicate with the core system only
- Persistent data is typically handled by the core system
- But it might outsource this task to a plugin
- Think of filesystem drivers
4. Service-based architecture style
4. Service-based architecture style

Properties:

- Each service is more-or-less monolithic


- They can be layered or modular
- They can replicated if needed
- Services are accessed remotely
- REST
- RPC
- SOAP
- etc
- Many variants exist
4. Service-based architecture style

-
4. Service-based architecture style

- It’s a good idea to use a proxy


4. Service-based architecture style

- Object access should be handled by special client libraries


- Service logic shouldn’t involve plain SQL
- Each resource should have its own handler (don’t just distribute one library for all)
5. Event-driven architecture style
5. Event-driven architecture style

Properties:

- Has a fundamental unit of processing: event


- Events queue up in channels
- Can be classified into two main categories:
- Broker topology (shown to the right)
- Mediator topology (next)
5. Event-driven architecture style
5. Event-driven architecture style
5. Event-driven architecture style
5. Event-driven architecture style
5. Event-driven architecture style

Note the fundamental distinction between request-based and event-based!

- Choose wisely
- Consider a hybrid approach
6. Space-based architecture style
6. Space-based architecture style

Properties:

- Name comes from the notion of tuple space


- Multiple processing units operating over shared memory
- Shared memory exists on multiple scales:
- On the processing-unit level, as a shared cache
- Distributed cache
- Data pumps, data writers, and data readers handle data consistency (shifting load away
from the processing unit).
- Data collisions are inevitable and can be calculated:
7. Orchestration-driven architecture style
7. Orchestration-driven architecture style

Properties:

- All traffic passes through the orchestration engine


- Aims to provide maximum reusability
8. Microservices architecture style
8. Microservices architecture style

Properties:

- Naturally distributed
- Bounded context
- No interdependency between microservices
- Data isolation
- They don’t depend on some global state/database
- Operational reuse
- Think of the sidecar pattern
- Sidecars can create a service mesh
Final note

Monolithic: Distributed:

- Layered - Service-based
- Pipeline - Event-driven
- Microkernel - Space-based
- Service-oriented
- Microservices
Exercise 1

Sketch (on a piece of paper) an architecture of the Genome project in the light of the
architecture styles you learned today.
Exercise 2

Rate each of the 8 architectural styles you have learned so far on a scale from 1-5 according to:

1. Deployability
2. Elasticity
3. Fault-tolerance
4. Modularity
5. Cost
6. Performance
7. Reliability
8. Scalability
9. Simplicity
10. Testability
Homework

In this homework you will sketch an architecture of your project in reference to the architecture
styles you learned today.

1. (1.5 point) State which architectural styles your project conforms to.
2. (3 points) Draw an architecture of your entire project (not just a small part of it) in a
manner suitable for demonstrating the architectural styles you highlighted in task 1.
a. Please pay a lot of attention to this step, this is the core of the homework. Make sure the diagram is:
i. readable
ii. well-documented and well-labeled
iii. well-colored
iv. etc
b. Use the diagrams from the lab slides for some inspiration.
c. Use your drawing tools proficiently.
3. (1.5 point) Choose an architectural style that your project doesn’t adhere to and describe
why do you think the developers decided not to go with this style.
Homework

4. (3 points) Redesign the architecture in such a way that it fits the architectural style you
chose in task 3 and draw it
a. Don’t worry about the quality of the project in this step
b. However, the diagram must make sense
c. Make sure to follow the same attention to quality and details as you did in task 2
5. (1 point) Provide at least 3 sentences of reflection on the homework

You might also like