Sunday, February 28, 2010

Software Architecture

Software Architecture
There are around 100 definitions for SA; most of them are related to Software element (components)properties, attributes and its connection/behavior with others. Every system will have architecture, but it might be smaller/ larger/complex/simple. In early systems software architecture term not in usually used. After Object oriented applications are developing Software Architecture coming to lime light.

But this term may not be present in our software lifecycle models. But we may have referred design phase for software architecture definition/ standard. Usually we can refer high level design can be used for architecture. Most of the time we have ignored software architecture by jumping into the implementation details/design. In real scenario software architecture will start after the requirement elicitation completed. Similar to black box testing, architecture should be defined elements as block boxes(building blocks) and its connections , synchronization should considered. Most of organization will have previously developed /handled projects architecture reused. In case new project with out having any prior experience case, will need to invest more time/money to establish proper architecture model. So that this can be reused for similar projects.
In RUP model elaboration phase software architecture will be stabilized or defined. In this phase we may not required to talk about one technology or implementation details.
Clear abstraction has to defined; identify reusable modules across the enterprise, decisions for choosing best architecture among others based on project need.
How we will compare the two architectures?
We can compare the two architectures based on the attributes, like performance, security, cost factors will be considered.

One the system level decision has chosen this need to be documented and clearly explained to entire stakeholders.
Architecture Styles:
Layer Oriented, Pipes & Filters, White Board, Broker
Components/Connectivity:
Before going to in depth of software architecture lets we start from the basics. With out that we can't learn the software architecture. Infact we will not deal with the any implementation while doing architecting an application. But every architecture should be able to implement . We can't discuss only abstraction .
Now adays OOPs controlling entire shoftware world.
Object oriented programming:
Pillars for the OOP
Inheritance, Encapsulation, Abstraction, Polymorphism
->Principles
Substitution principle
Program to interface not to an implementation
Open for enhancements, close for changes
Abstract the complex implementation
Interface segregation principle
At first programmer will start from the writing the given programming with collection of fucntions and structures. After that s/he going exlore more on OOPs programming, in that he will think only inheritance will solve the all problems. Which direct to think in the composition will start also coming to mind.. :) , now s/he is at second stage of OOPS. Once he start using composition not enough all problems. Then s/he learn abstraction.... Yes this the final stage of OOPs... Now our programmer think abstractions which will give freedom to do any thing.

Architecture attributes:
Performance:
It will be major concern in complex/critical/Real Time projects.
Throughput, Average Response Time/Performed
Reliability:
Performability:


Pattern oriented software development:
Recurrently/commonly occurs problems and its efficient way of handling the problem with concern the context and enhancement/Maintainability concerns.
Things requires to document patterns
Problem, Context, Pros/Cons, Block diagram (class diagram/Sequence diagram), relationship/different/choice with other pattern.
GOF patterns...
Creational Patterns:
Deals with the creation of objects .Main goal to decouple the target object creation from
Usage context, so that extendibility, handling new changes, complex object creation.

Abstract Factory
Builder
Factory
Prototype
Singleton

Structural Patterns

Patterns main targets to group the different objects perform the job collectively. Grouping the objects is called as Structuring.

Adapter
Bridge
Composite
Decorator
Façade
Flyweight
Proxy

Behavior Patterns
These patterns will deals with the runtime of system to handling job. Mainly deals with the communication between the different families of objects.

Chain of Responsibility
Command
Interpreter
Iterator
Mediator
Memento
Strategy
State
Template
Visitor
Observer

These are the pattern identified by commonly occurs in the any architecture. Where as there are lot of well known pattern present in the particular architecture. In Client-Server architecture (Distributed Computing), where performance/response time will be major concern.
Every day there will be new pattern is identified in the industry. Which will solve the typical problem in the given problem domain. Some of these also taken from the other industires aswell.
So if you get a chance to explore other industries...you may get some new pattern.

Layer oriented architecture: Every Layer will communicate with the neighbor layers (L+1, L-1). Some of architecture can have L+/- 2 also can be possible. It will be equal to the OSI network layers where each layer will have its own responsibility and format support to and from the layer stack.
Synchronization related patterns
Communication/Configuration Patterns
Load Balancing
Data Sharing/Data/Task Splitting

Leader-Follower, Multiplexer / De multiplexer, Store-Forward
Single checking locking/Double check locking,

Pattern can be split as per the life cycle of the software development

Architectural related patterns: Deals with the Software Architecture phase, where common architecture related problems with efficient solutions.
Example: Pipes & Filter, White Board,

Design related Patterns: These patterns deals with the design phase of software development. It encompasses the OOAD principles, so above mentioned GOF patterns deals with the design level patterns.

Difference between the Architecture and Design:
First one guide alternative/Approaches before actual design start. Mainly deals with non functional requirements. Where as later one deal with the functional requirements which are taken from the user requirements.



Code level patterns: Can be reused at the coding level, which can be organizational level coding standard. Technology constraints can also be included here.


Attributes for Software Architecture

Technology Attributes: (Technical Architecture)
Performance
Adaptability
Scalability
Reusability
Usability
Availability
Security
Portability
Reliability
Flexibility

Stability
Maintainability
Testability&Tracability
Enhanceability/Extensible
Throughput
Availability
Efficiency
Avg Response Time
Avg Performed Time

Business Attributes: (Functional Architecture)
Time
Cost
Complexity
Integration with other Business/Legacy Systems/Third party Application
Domain Analysis


Patterns for the distributed computing

Active Object: Object will create new thread to perform the client requested job. This will be useful in case async behavior required.

Passive Object: It will be opposite to the active object. Where in which request method will bargain the caller thread to execute its job.

So lets wait for more updates on this ....Until then Happy Architecting...

No comments: