Architecture design space Flashcards
What should an architect be aware of?
- Alternatives in proposing design solutions.
2. which alternatives are more suitable and capture Func, and NFRs
What are the perspectives of a software architecture.
- Software code units: source, binary, files, modules, components deployment.
- Runtime structure: threads, processes, sessions, transactions, objects, component instances
- Allocation structure: project management structure.
Each uses different connector types and different performance attributes than the other.
Software Code structure
- A project is implemented in multiple source files.
- Ad dev time, the main software elements are source code modules/
- Each module is assigned; Functional and non functional attribute. Public APIs, separate interfaces and implementations of a module.
Dependencies of a software code structure.
Module A contains B
Module A follows B
Module A delivers data to B
Module A uses B
What is a call graph?
Graph that represents Uses relations.
Proper design calls that information flow between components comes through method calls.
Knowledge between components should be a minimum. The remaining dependencies determine the complexity of relations between components.
What are the attributes of Connectors in Software code structure?
Direction: Module A invokes a method of B, there is a unidirectional connector from A to B.
Synchronization: Method invocation can be synchronous or Asynchronous.
Async: process operates independently to other processes.
Synch: Process runs only as a result of some other process completed or handing off operation.
Sequence: some connectors must be used in a particular sequence.
Software Runtime Structure.
This can run on same computer or across a network.
An element in code structure can implement or support multiple runtime elements. Client server, same client runs on many client computers.
Several code structure elements may implement or support a single runtime element. Many threads run multiple methods from different classes that may be packaged in different code units. (thread is a runtime element.)
Attributes of Connectors in Software runtime structure.
Multiplicity: One element can be connected to multiple other elements if it needs to invoke methods of multiple elements at runtime.
Distance: Two connected elements may communicate; in same thread, in same process, in same computer, across a network.
Universal Invokable: Allows any external system to invoke a method on the connector’s target.
Self descriptive: Allows external systems to invoke target method without preinstallation of hardware/software for the method. Bluetooth devices from different companies can communicate.
Software Management Structure.
Some architectures are best implemented by a particular management structure. Also often used for resource allocation.
Software Elements at runtime.
Each has its well-defined functions.
each are connected into a dependency graph through connectors.
each are usually refined through transformation steps based on the SRS.
each has different synchronization and performance constraints. (some reentrant, some are not and can’t have many threads working on them.)
If element is reentrant.
Can be implemented by any thread or process. (more efficient, avoid synchronization, not always possible.)
If not reentrant but many threads or processes have to communicate with it
It must be run on separate threads or processes to be thread safe.
Must be made thread safe!
If an element has high multiplicity and performance is important.
Use an application server for implementation. uses thread and resource pooling, data caches.
If there are heavy computations in the elements for deployment at a particular location.
Use a cluster of processors.
size of cluster depends on:
balancing computational load.
minimize total communication traffic.
Element is assigned well-defined complex functions + similar off shelf solution exists + performance not critical.
Use off shelf solution. But you are responsible for its performance.