Software Architecture CHRIS BIG HORN HORNE NOLAN NTHUG
Software Architecture CHRIS “BIG HORN” HORNE, NOLAN “N-THUG” KELLY, NAIRN “BAKER” TSANG, DAVE “CHOCOLATE MILK” RYAN, SEAN “WHACKY HAT” BOYD, MARK “THE WHOPPER” D’ADAMO
Table of Contents • Introduction • Message Bus Architecture • Client Server Architecture • Object Oriented Architecture • N-Tier Architecture • Component Based Architecture • Layered Architecture
What is Software Architecture? • High level structures of a software system. • Also denotes the set of practices used to select, define or design a software architecture. WOW
Message Bus Architecture
Message Bus Architecture – The Problem • Maintaining point to point links between an increasing number of nodes • Complex • Expensive • Decentralized
Message Bus Architecture – The Solution • Message Oriented Middleware • Extra component to handle inter-nodal communication • Publish and Subscribe • List Based • Message bus filters subscribers • Broadcast Based • Subscribers filter messages
Message Bus Architecture - Advantages • Reduced Application Complexity • Communication complexity localized in bus • Modules need only follow protocol • Improved Modifiability • Adding messages or components is simple • Improved Performance • Removal of intermediaries • Improved Scalability • New components have no impact on older ones
Message Bus Architecture – Disadvantages • Increased Complexity • All connected parties must follow bus conventions • Lowered Modifiability when breaking bus interface • Changing the bus interface requires changes to every component that uses it • Lowered Security • Broadcast based pub / sub sends messages indiscriminately • Low Tolerance for downtime • The bus becomes a single point of failure
Message Bus Example – D-BUS • Open source IPC system for Unix • Also offers communication channel between user sessions and hardware • Communication through sockets • Implements pub/sub
Client Server Architecture
Overview • Prevailing model in network programming • Two roles • Client • Server • Clients and servers are physically located on different machines • Require remote access to communicate
Server • Manage a set of resources • Ideally active at all times • Service many clients at a time
Client • Single user host system • Initiate contact with the server • Clients never communicate directly with other clients
Types of Client-Server Architecture • 2 -Tier • Presentation logic on client side • Data services on server side • Business logic location varies • 3 -Tier • Middleware introduced that handles business logic • N-Tier • More detailed divisions of logic
Fat/Thin Clients • Fat Client • Client performs majority of data and processing operations • Client can perform many functions without connection to server • Thin Client • Client does as little processing as possible • Relies on accessing server very often
Pros/Cons Pros Centralization of data Security Cons Congestion Cost Not Robust
Example – Microsoft SQL Server • Database application • Servers are large computers stored at a centralized location • Many applications can connect to server and make requests for data
Object Oriented Architecture
Overview • System as a group of interacting objects • Objects are defined by: • Class • Attributes (Data Fields) • Behaviour (Methods) • Objects interact with each other by passing messages
Fundamental Features • Data hiding (Encapsulation) • Inheritance • Abstraction • Polymorphism
Pros/Cons Pros Cons Closer to how we view real world problems Requires planning Reusable code Not appropriate in all situations Extensibility Maintainability
Example – Cocoa • Apple’s native API • Objective C (OOP language) • Model-View-Controller
N-Tier Architecture
3 -Tier, The Most Common http: //docs. oracle. com/cd/A 97335_02/apps. 102/a 86202/chap 02. htm
Benefits • Maintainability • Scalability • Flexibility • Availability
Weaknesses • Bloat • Inflexibility
Examples 3 -Tier Architecture suits e-commerce extremely well
Component Based Architecture BY: PROF. DR. FRANZ J. BILKINGTONROBINOWITZFREDRICKSHAVEN
Overviews • Focuses on decomposing software into logical components • Components are loosely coupled • Higher level of abstraction than OOP for example. • Does not focus on communication protocols and shared state • “Hand Crafting” vs. “Mass Production” • So what are components? FUCK
I’m Glad You Asked! • Any software package/module that encapsulates a related set of functions/data • Want to encapsulate the component to where no knowledge of it’s internal workings is needed. Low Coupling • Provides functionality with a provided interface (specifies what a component can provide to other components in the system) • Example: A Button! Provides event-on-mouse-click, event-on-mousehover, etc. Without knowing how the button works! Because buttons! How do they work?
Hand Crafted vs. Mass Produced Hand Crafted Mass Produced • Time consuming. Each line of code is lovingly typed by the finest code-smiths for the singular purpose of the current project. • Not time consuming. Each line of code may have been coded a long time ago but it still works as it needs to today. • If you make a mistake(ex. wrong requirements, 471 amirite? !)… • Easy to fix… • …your project can be done for good (WWI guns) • …your project is going to be expensive to fix. (Lamborghini expensive) • Because of the low coupling of your modules, and the fact that they communicate via interfaces, a bad module can be substituted for a good one. Saves time and money. • Think Lego…
A Note About the Last Slide • The most important thing to take away from this is quality. • Hand crafting does not always yield a higher quality product • You can hand-craft a mess just as easily as you could mass-produce genius. • Quality will be determined… BY THE IRON TRIANGLE • CBA helps with the Schedule and Resources aspects
Exquisite Qualities And Abhorrent Attributes Pros Cons • Ease of Deployment • Message Handling • Reduced Cost • Reliance on Third Parties • Ease of Development • Testing can be messy • Reusable • Second System Syndrome • Mitigation of technical complexity
Name Dropping: VIDEO GAMES - Then • Games were comparatively simple back in the day • Programmed in an Inheritance based programming style • Good for smaller, more simple games • Adds tons of complexity as game content increases. • (Multiple Inheritance)
More Name Dropping: VIDEO GAMES - Now • Games today are massive and extremely complex. • Bigger focus on open world games where you can do whatever you want • Gamers always want more • This want creates the need for something better than IBP • Observe…
Inheritance Based Programming • Take this generic container for example: • Say we want to make it a chest… • But let’s say gamers demand that said chest become a witty sidekick that follows you around everywhere and makes sarcastic remarks as well… • Boom… • Multiple inheritance! OH NOES
VIDEO GAMES - Now • CBA to the rescue! • Instead of creating a generic game object class with limited functionality and adding to it via class specialization… • Just make a generic game object class with the ability to add features as needed to reduce the complexity of the system. • Yay progress!!
Layered Architecture
What is it?
Advantages • Abstraction • Encapsulation • High cohesion • Reusable • Loose coupling • Design Pattern Support
Disadvantages • Doesn’t work for all systems • Start to lose advantages • Can end up with low cohesion and high coupling
FIN. NOW GO AWAY OR I SHALL TAUNT YOU A SECOND TIME
- Slides: 42