February 22, 2006
@ 11:17 PM

It took awhile but I finally managed to complete describing all the activities of SAF at least at some level of detail.



What is SAF?


There is very little guidance on how one can go about designing/developing an architecture for a software project. The SPAMMED architecture framework (SAF) aims  to help fill this gap. 

 

SAF  is a set of activities that an architect can follow when she sets out to design an architecture. These activities helps the architect to keep abreast of the project's needs and the drivers that affect the architecture.

 

Overview posts:

Getting SPAMMED for architecture

SPAMMED State chart

 

 

SAF Activities


The Activities of SAF include

  • Stakeholders -identify the stakeholders   - Anyone with vested interest in the project (end users, clients, project manager, developers etc.) These are the people you will have to explain you architecture to. These are the people that have concerns that the architecture will have to satisfy (or most likely balance). Thus, the fist step is to identify and rank them.

 

  • Principles – list Principles, Goals and Constrains. These are the properties you wish your architecture to have (or lack) based on your previous experience. Constrains can also come from your stakeholders (e.g. management decided that all project should be .NET, a deadline etc.)

 

  • Attributes –  discover quality attributes, the non-functional reqeirements, that (once prioritized) serve as the guide for the overall goodness of the system (Performace, Availability, scalability etc.)

 

 

  • Model – model (and document if needed)  the architecture as seen from different viewpoints (list of viewpoints is stakeholder driven). Example for viewpoints include package diagrams, deployment diagrams, DB Schema etc. etc.

 

  • Map – Technology mapping, buy vs. make decisions etc.

 

  • Evaluate – Since architecture is the set of decision that are hardest to change it is worthwhile to spend some time trying to evaluate if they are indeed correct before commencing on

 

  • Deploy – Software architectures are not a fire and forget thing. As an architect you still have to make sure that the guidelines set are indeed followed and even more importantly that the architecture chosen indeed match the project’s needs and doesn’t have to be reworked.

 

Feedback & Future


I would be very interested to hear any feedback on SAF - you can send  feedback to saf@rgoarchitects.com or just leave a comment

 

On the next SAF posts I am going to talk about SAF alignment with development methodologies (RUP, MSF 4, SCRUM etc.) as well as strategies for following or acting upon the activities.

 

 

 

 

 




 

The last activity of SAF is deployment of the architecture.  This step can make the difference between an ivory-tower architect and one whose designs are actually used in real software projects.

Deployment of the architecture actually  means two things

  1. Verification and feedback loop. - making sure the architecture is actually the right one.
  2. Governance - making sure that the architecture is followed by the designers and developers

Verification and Feedback loop

It is common practice to think of software development as an iterative process. Knowing that Software architecture  is early and that it encompass the important decision which are hard to change, it is probably wise to think of the first few iterations as architectural ones. You would try to work with the team and form the major abstractions, hopefully come up with a blueprint for processes etc. However, the fact that you've decided only the (let say) first two iterations are architectural ones, doesn't mean that new non-functional requirements won't emerge during later iterations. Since practice shows us it is (almost always) futile to try to analyze "all" the requirements before we do any design - this is almost bound to happen.

Be ready to monitor the project's progress after the "architectural iterations" to see and deal with any emergent requirements. As the stakeholders (e.g. product owner, project manager and the architect) try to prioritize tasks/requirements from iteration to iteration, hopefully most of the architectural issues would both surface and be taken care of the first few iterations (remember - architectural decisions are the ones that are hard to change…) - but unfortunately this isn't always so. I recently audited the architecture of a project (which has been running for more than a year) where they identifies the need for transactions, but following some stupid 80/20 rule decided that most of the system does not need that (deadly sin #1) and that they'd be able to easily patch it in later down the road (deadly sin #2) - so not enough just to identify a need, you also need to deal with it early.

The first few iterations also serve as a feedback loop on the suitability of the architecture, sure you've tried to evaluate  the architecture both in code  and on paper , but once it is deployed, or used for real - that is its real test. You will probably want to allocate some time to sit with developers and designers and actually see how the architecture is used and the implications of your decisions.

Governance

It isn't enough to design a software architecture, show it off at some architecture review and maybe at product demonstrations. Designers and developers are more than likely to bend your architecture to their convenience - this can happen for a multitude of reasons - for example:

  • They flipped the bozo on you  - they think they know better
  • They don't see the big picture and they try to optimize locally
  • They don't know any better, they just do what they always did
  • They believe they are following your design but they didn't really understand what you've meant (or alternatively - you didn't explain yourself very well)
  • They cut corners e.g. to meet dead-lines (just to appease the project manager breathing over their shoulder)
  • Etc.

When the architecture is compromised, it can definitely  have severe  effects on later iterations and the overall stability/usability of the system. It is important to note that  it may even result in harsh implications for the organization - imagine someone circumvents some auditing mechanisms you've put in place to comply with SOX or Basel II.

What this means for the architect is that she cannot disengage from the project completely even once the architecture is stabilized (i.e. after the first few iterations). Architect involvement is needed for design reviews, maybe key code reviews , on mile stones  etc.

I think it is one of  the architect rolls to act as a "comptroller" and oversee that the project stays on track as far as the architecture goes. Unfortunately there aren't too many automated tools to help with that. DSLs is one direction that may help (look for example at the Guidance and Automation Toolkit here  and here  ). I've also recently saw an application that claims it can enforce and monitor SOA policies on e.g. on contacts (for both Java and .NET). I hope we'll see more of these tools in the future - meanwhile it is up to us, architects, to do that as part of our overall responsibility.

 


 
February 13, 2006
@ 10:48 PM

Scott Bellware writes about Microsoft missing an Agilist Persona (in addition to Mort, Elvis and Einstein. I pretty much agree with Scott's views - MS's lack of understanding of the Agile crowd is evident in "fiascos" like the TDD article  on MSDN or even MSF Agile, which is  relatively a light process but still very far from processes such as  XP, SCRUM and the like.

 

Personas is a very interesting concept, usable as a communication aide, for development teams - as a means to help maintain user focus.

 

The CHAOS Chronicles 3.0 by Standish group* (www.standishgroup.com)  cite "User involvement" as second most important success factor for development project success  (after executive management support). Indeed many agile methodologies also encourage high customer involvement in development process

 

During my professional career, I had the chance to work for both product companies and solution companies.  - Why is that relevant you ask? Well, when you work for a solution company you usually have tangible, real-life, customers to work with. You can walk them through early usability prototypes, you can consult with then on problematic requirements, you can have them on site for instant feedback etc. etc.

 

Things are more problematic  when you work on "shrink wrapped" products - now your customers are much more abstract , and elusive, yes you can still hold focus groups etc. but your you can't have that day-to-day interaction with end-users and customers - enter Personas.

 

I first heard about Personas several years ago, when I read Alan Cooper's "The Inmates are running the Asylum". The book demonstrates some bad  designs for software-based products and then introduces an approach (Personas...) to help avoid these problems (He elaborates more on the approach in "About Face 2.0").

 

Personas are basically a way to define archetypes of users. Unlike Use Case Actors which represent a role in the system, Persons try to high-light the characteristics of real users. The idea is to come-up with representative model of a user and to give it a full-bio and characteristics  so as to help the development team understand motivations and relate to actual users. The model for absent users is the reason this technique is very  important for product companies. If you don't have real users come up with abstract ones representing them. Alan Cooper introduced Personas as a means to help designers in the initial phases of product design. Microsoft extended the use of Personas as a communication aide to the full range of the development team (designers, developers, testers, managers, marketers etc.) - which brings more benefits. I highly recommend reading the very  interesting paper "Personas: Practice and Theory" by John Pruitt and Jonathan Grudin which  relates Microsoft's experience on the subject.

 

While Personas are very important for product companies, it can also be important for solutions development especially on larger projects where only few members of the development team get a chance to interact with customers and user.

When you cannot have the customer on site (or the customer representative doesn't give you the full picture of all user types of the system) you can use Persona-Scenarios as a way to augment user stories (or in other circumstances as an alternative to actor-use cases)


 


  

*The Standish Group has been collecting metrics from thousands of projects since 1994. They analyze success and failure factors and publish them on yearly basis. For example, while our ratios as an industry are getting better over the years - as 2004 only about third of the projects achieved their goals both  on budget and on time...


 
Tags: Everything | General

February 8, 2006
@ 11:26 PM

In the previous post I said "don't bubble exceptions out of your service" -  Ebenezer Ikonne asks  "Well I wonder what the verbiage of the exception should be?  If a null pointer occurred in the service, what message should I return back to the consumer of the service?"


First off, lets consider the meaning of bubbling  the exception - what would a remote consumer, sitting on some other company's server do with a "null pointer" exception?! - the consumer doesn't have any control on the resources or life cycle (or anything else for that matter)  of the service it is trying to consume. Also if it depends on the internal problems of the service it consumes it makes it (the consumer)  much less autonomous.

 

So, what's the other option? Well, as I mentioned in my previous post it is best if the service can "pretend" nothing really happened e.g. log the incoming message before doing anything and then if there's an exception respond (if the contract requires response by a deadline) with a "got your message, working on it, you'd get a confirmation message soon" sort of reaction. If the exception occurs before the incoming message is saved then it is probably needed to respond with "out of service, try again soon" if the edge is not up then you (as a consumer) should (finally) get an exception (the protocol failed - the message you've sent did not arrive)

 

By the way a I think that a somewhat similar principle is true for bubbling exceptions across layers in a layered architecture 


 
February 6, 2006
@ 11:32 PM

Take a look at Jeff Schneider's blog - for some nice Lego illustrations of composite applications concepts 


 
February 6, 2006
@ 11:27 PM

In one of the discussions  on the MSDN Architecture Forum someone  mentioned that when a service invocation results in  an exception his company standard is to:

 

  • Log the error before exiting the service

  • Create a new SOAP error (exception) with minimal info ("The requested service failed") and that error includes (innerException) the original error (This way, if someone receives my error and they are not familiar with my errors - they will get a simple soap error. If they are familiar with my error, they will have the ability to inspect it further)

 

I think this is this is the very distinct  anti-pattern of how to do SOA i

Lets look at few reasons why:

  1. Log the error - that is fine and everything - maybe it'll help during the post mortem, but the operations people should also be notified somehow. Otherwise you have a dead service there and no one knows

  2. "exiting the service"  - Services shouldn't fail - a failed service can mean a lost business opportunity.   When  you can't service the requests, you should at least be able to maintain the "well know end-point" up and running and let everyone know that the service is, well, "out of service - be back in XYZ". The preferable solution is to still  be able to queue incoming  requests and handle them later (this may not be possible if part of the policy (or SLA) for the service is to react within few seconds, but again, in many other circumstances it is very plausible.

  3. SOAP Exception - why through a SOAP exception - the protocol/communication worked fine...

  4. "...(innerException) the original error" - do not expose internal implementation out side of the service - only what's in the contract - in other words don't, just don't bubble exceptions out of your service.

 

It is very easy to make, what seems like, a small concession on the purity of your service, but your SOA concept and loose coupling specifically can deteriorate very rapidly on even the smallest compromises