Showing posts with label Architecture. Show all posts
Showing posts with label Architecture. Show all posts

Wednesday, 28 November 2018

C++/CLI


In relation to a couple of my previous blogs on C++/CLI
(https://sultanate.blogspot.com/2009/08/ccli-alternate-way.html
&

I am tempted to put this whitepaper I wrote long ago which details the need and benefits of C++/CLI.

C++/CLI

Better late than never :-)

Hope this is useful to the programming community.


Wednesday, 29 September 2010

Non-Functional Requirements for SaaS

All software products are built with a set of Functional as well as Non-functional requirements. The key role of the Business Analysts and the Business owners is to define / articulate the need for each and every requirement whether functional or non-functional. Functional requirements are surely the must haves and it is a prime responsibility of the Business owners and the analysts to define it or at least justify the need for it.

It is very important, one must also define Non-functional requirements and give equal importance to it along with functional requirements.It may not be appropriate but surely certain lenience in defining Non functional requirements can be incorporated in case of a on-premise software.

If you are an Independent Software vendor who would like to provide your Software as a Service, or if you would like to extend your current offering to a different market on the cloud by providing a SaaS version of the product, then the game changes completely.

In most cases, a SAAS solution is a SINGLE CODE BASE, with a SINGLE LOGICAL DATABASE serving 100s of customers and potentially 1000s of users with completely different usage patterns, different individual tweaking requirements, different requirements for interfacing with their in-house systems and so on.

Hence it is one of the top priorities to not only define the functional requirements, but also define and design the system to cater to a very clearly and strongly defined non-functional requirements. A non functional requirement as the name suggests does not provide any “business functionality”, but instead they glue the functionalities together better. Although there are too many things that can be defined as a “non-functional requirement”, I would like to highlight the most important ones that any SaaS Architects or Analysts should keep in mind, define them and most important “architect & design” the software to ensure it addresses these requirements.

Please note that there isn’t any specific priority order for each one of them and the importance of one over the other is completely dependent upon the business need and the type of the software to be delivered as a SaaS.

Also please note that not all of them may be a key requirement for every software and hence it is up to the Analysts and the Architect to define the same. The below list may also be used as a check list for the designers of the system to ensure they have it covered in their definition.

--

Security

No software can escape from the need for security whether SaaS or on-premise. But when it comes to SaaS the requirement turns out to be more stringent. As an ISV, the responsibility of the security (whether data security, network security or intrusion prevention) all of it lies with us. Any subscriber to a SaaS would expect assurance that his information and data is secure enough more since they are not under their own radar but we are the custodian for the same. In a multi-tenanted environment, no one would want their data to be visible to other companies using the same system. This is upmost important and should be one of the key points to be considered while defining the data structure for the software.

The network security and intrusion prevention is not the point of concern for the provider of a traditional on-premise software since the responsibility of deployment and network security then is the responsibility of the client rather than the software provider. When it comes to SaaS, these things are equally important for it to be considered.

I had attempted to provide a simple security checklist in one of my previous blogs which may be used by all parties involved in SaaS whether it be an ISV providing the software or it be a company subscribing to it or a user using the system.

Scalability

Scalability of the software takes a completely different turn when it is a software delivered as SaaS. Any software (whether SaaS or on-premise) would have to consider scalability when it comes to handling “volumes”. And since SaaS is eventually all about multi-clients with multi-users using a single code base, volumes are inherent characteristics of the software. There are no second thoughts to not to consider a Scale-out architecture along with a Scale-Up architecture for any SaaS system. The better the software more number of clients and more number of users are bound to signup for your service.

The software at the architecture level has to natively support a Scale-out architecture whereby you should be able to expand your system to virtually any level up to the theoretical maximum. We never know if our software / service is successful, we could be the next billion dollar salesforce.com :-)

Availability / Reliability

As the case applies to security, the same applies to availability or reliability of the software. It is one of most important factors / characteristics that must be inherently be part of the skull of any SaaS product – Reliability.

A very clearly defined SLAs (Service Level Agreement) has become a norm these days for any SaaS offering and not adhering to it may even have legal implications. With more and more improvements in the technology and also increase in competition, customers expect a 99.99% uptime of the service and no longer just 99.9%. So that mathematically equates to 1 hour of downtime per year. Everyone is aware of the fact that no software can be 100% bug free but at the same time, the software needs to be architected and designed to ensure that the downtime scenarios are well handled and there would be no / minimum data or business loss to the clients. And most importantly ensure your SLAs are aligned to the SLAs of your hosting provider / partner. Always use a hosting provider. Never DIY.

Performance

One of the prime reason Google Search engine and Google’s web browser Chrome is a hit is because of its speed to respond. Although no one would expect your software to be as quick as Google (although if you could get there then nothing like it :-) ) but in terms of response times to any business operations, they have to be quick enough to an extent the users do not get a chance to think about the speed. Defining a clear SLAs for response times is also key for any SaaS offering. Although defining a higher response times in your SLAs to avoid legal implications and to play safe may be a good idea to an extent, but not at the cost of users realising the system is slow and start disliking it.

Perform frequent checks for ensuring the performance is at the top of the agenda. Cache the most frequently accessed metadata, service your database by optimising your queries and ensure all the queries in your database uses the most appropriate indexes. Minimize the network operations, use compression where appropriate. Load balance your web servers and if other factors permit, localise your server location.

And most importantly do not over engineer your software. The above points like caching, database indexing etc., may not always be the solution for performance and hence should be done as a calculated exercise,

Configurability

One of the critical success factor of any SaaS application is configurability. It is even more important to ensure configurability to a great extent is taken on board for a SaaS product since its native characteristics of having a single code base. Configurability in SaaS aims to provide customers with a multitude of options and variations to provide a unique experience. Not just that but having the system configurable allows you to sell different services based on various different licensing modes / editions, e.g. Software – Lite, Software – Professional, Software – Ultimate and so on. Ability to switch on and off a particular feature or an option to change the way a user uses the functionality or even ability to change background colour of a screen, may not be the most important thing to have within a software, but surely it is one of the key differentiators / selling factor for your offering. As mentioned above, providing different editions to different target provides an option to expand market share more easily.

Also since every customer would want to use the system in a different way to suit more to their internal culture, more the configurable your offering the better.

Flexibility / Extensibility

Software offering never ever ends at Version 1. It is relatively easier to incorporate or add functionality / remove / modify functionality from an on-premise software since the consequence of doing so would not affect your other customers. They have separate copies of your system and providing more “bespoke” tweaking is possible in such cases. A SaaS offering is a single piece of software catering to all your customers. Hence the architecture should take in to account an ability / room to extend the software with more features and functionalities to provide more value to your offerings in the future.

The most important point one must avoid for a SaaS offering is to provide bespoke implementations for different customers (with switches). Ensure the software is extensible enough to avoid such scenarios.

Usability

Usability Engineering is a vast area in itself and over the years companies have started taking User experience more seriously rather than just providing “a” User interface they think is appropriate. It becomes even difficult to implement a good user interface and interaction for a SaaS offering since the spectrum of users increases more than ten-fold. A single software instance needs to provide a unique experience and functionalities to different customers and in turn various different users of each customer. It is advised for every SaaS offering to undergo a Usability engineering exercise before getting the Graphics team to define the user interface for the software.

Interoperability

And last but not the least, no software can work stand alone. There is always a need for integration of our systems with other systems providing specialised services. E.g A Purchase Management system may need to provide a facility to interoperate with a financial accounting system. If you are providing a Financial accounting system as a SaaS offering, the need for interoperability would be even higher than the other kinds of business software for obvious reasons.

The key solution to address this non functional requirement is to implement a Service Oriented Architecture. It is important to expose most of your key interoperable business functions in the form of well documented Web services to allow other systems to interact and interoperate with your system. Since we are talking about a SaaS offering, and as mentioned earlier, the requirement of individual customers may differ and hence the SOA layer to the software needs to be well thought of and well documented to avoid any need for bespoke implementations. Also it may be required to consider a facility natively part of the system’s architecture to provide a facility to import and export of raw data to allow other related systems to make the best bonding with your offering. Needless to say, interoperability should not be provided at the cost of security and hence due care needs to be taken to ensure both marry well within the system.

--

There may be many more points which may be considered important as non-functional requirements, but the above ones are the most important and common ones which almost all the software delivered as SaaS needs to consider and take in to account in their design and implementation.

The success of a software (especially delivered as SaaS) depends not only on its functional requirements but also to a very great extent the….NON-FUNCTIONAL REQUIREMENTS.

Thursday, 29 October 2009

Agile, SAAS, NFRs & Architecture

For quite sometime I have been trying to get a grip of the agile methodology to develop applications. Somehow I am not 100% convinced (although I am 90% convinced) that Agile is the way forward.
I am still in a state of mind that Agile does not solve 100% of all the software development problems. This article is my effort to highlight few of my view points on this subject.

Agile : I would not go any deep in to this topic as it is a known and a well established topic.
If would like to know more about Agile, there are tons of articles on this subject. All you would need to do is google or (in Microsoft terms) bing it :-)

The Agile Mantra says...
  • Individuals and Interactions - over process and tolls
  • Working software - over comprehensive documentation
  • Customer collaboration - over contract negotiation
  • Responding to change over following a plan

In short Agile means - "Iterative Design & development".

So far so good.

But the key point to note here is - its "Design & Development". The process starts at "Design".

For large scale systems such as high availability, high concurrency, highly scalable systems, the key way forward starts at "Architecture". May be there are cases where a good Design does not require a strong architecture pre-thought but not always the case.

Architecture is NOT Design. Architecture is a process of looking at the entire system from a high level and providing a blueprint of how large scale systems are built.

Architecting a complex product such as a SAAS offering goes beyond just designing. SAAS systems invariably has stringent Non Functional requirements such as Availability (99.99% uptime), Scalability (x Thousand Concurrent users), High Performance response times (X transactions per second), Configurability (Meta data driven configuration), Extensibility (NOT CODE extensibility but product extensibility).

All the above elements have to be well thought of for a successful implementation of a high performance solution such as a SAAS offering.

As the name suggests, these are "NON-FUNCTIONAL REQUIREMENTS". They cannot be "automatically" captured as "User stories". Even if we capture these things as a part of User stories, which sprint do these stories belong to? How do we cater to this in a particular sprint? Should this be pushed to the last sprint? How do you split these requirements within each sprint? Most applications (even enterprise scale) may not worry much about these non-functional requirements. An enterprise application can wait for a half hour down time but a SAAS system, these things are fundamental. A SAAS system is a different game all-together.

There is no doubt that Design and development is key to any software development. But equally important is Architecture. This makes me wonder if there is something called as a 100% pure Agile project? If there is a 100% pure agile project, can this be used to build a SAAS solution with stringent NFRs?

To my mind the answer is NO. The first 10-20% of the time goes in conceptualising and "architecting" the system and then the system can be developed in Sprints (which is rest of the 80%). Architectural Patterns such as Zachman, RM-ODP, Rational Unified Process etc. (or fr that matter any Architectural patterns) wouldn't have existed if it had no use and the same can be done using a Agile methodology by directly jumping into design and development.

I am not sure how this article will be received, but this is just an attempt I thought I should make share my mind to fellow architects in the software world. I do love Agile. Agile is the way to go. There is no doubt about that.

The attempt here is to highlight the fact that - "There is nothing called as 100% agile software development"

Especially if you are thinking of developing a SAAS solution with extremely stringent NFRs, ensure you cover these NFRs within your Architecture and then start development using any Agile methodology.

For an Agile evangelist, a product development life cycle is - Sprint + Spint + Sprint + Sprint.

To my mind it is - Conceptualising & Detailed Architecture + Sprint + Sprint + Sprint + Sprint.

As I have been emphasizing, I am not sure if this arcticle would be well received by Agile Evangelist, but I thought this could be a good food for thought.

I have been involved in building SAAS applications with Stringent NFRs and hence I am able to relate this to agile development.

Await for my next blog on NFRs and its importance in designing a software solution.

Monday, 8 January 2007

Software - The Civil Construction way

It was a usual Saturday morning. I got up only to find I had nothing to do today and had no social visits too, planned for the day. Was actually breaking my head to find out how should I spend the weekend as nothing was getting worked out.

Gazing out of my balcony, looking at some passing chicks ;-) my attention went towards the building construction happening at the adjacent plot of my apartment. Unintentionally, I started observing the set of activities that was taking place at the construction site and I started following the what the workers were involved in. While giving a little thought on each of their activities, I could actually relate them to the all the activities involved in a Software development life cycle. And I thought, there is absolutely no difference between a civil building construction and a software construction. Then why do we see, loose software, delays, bugs, errors, bad design, and all sorts of ill effects of a bad software and don't find any such thing in a building construction. We end up getting a building which becomes an apartment for many, has a life of at least 100 years as per the Civil Engineering principles.

Here's what I saw... (In no specific sequence)

- A Person measuring the Iron rod required to be used for the RCC (Concrete column) and cutting it in appropriate size. Each floor had more than 50 pillars, each pillar needed 6 rods. So all he was to do was measure the length from the bulk rod, and cut it to a "instructed" size. In short, he had to do 300 of them. Let me also tell you, this set of output was for the next floor and not for the current floor that was getting constructed.

- Another person bending another set of already cut rods to "instructed" rectangle size to actually hold the rods for a pillar. That's all he needed to do.

- A team of 10 involved in making the concrete mixture. 6 of them were to just move get the measured quantity of sand, rock pebbles, cement and water. 2 of them for each item and they knew what they had to do.

- A supervisor with a small chart in hand to check if the quantity of the items he estimated for a floor was actually enough for actually building that floor.

- A separate team of 4-5 involved in plastering the floors that are completed, not knowing what the others are doing.

All these and lots more were happening absolutely flawless and without anyone talking even a word. Of course, there were jokes being cracked by each one of them to keep themselves active and happy while they were working, making their day at work enjoying!

I might sound too silly, but the whole scene was just awesome looking at the fantastic team co-ordination.
That's exactly I would (for that matter everyone would) expect in case of a software development project.

How? (briefly)

- First and foremost: Requirement is clear and is almost frozen (Although External changes and room for expansion and high level modification permitted and provided room for) - In a civil construction, this is the Artistic view and the architect's blueprint.

- Have sub module blueprints of the architecture with reference to the main one. - In civil, this is the floor diagram.

- Have the Technical Architecture, Object Model, Data Model and the Design specifications as accurate as possible. Have frequent check lists at various points.

- Have a very detailed project plan. This is very important. The entire development phase should be on paper with accuracy to the greatest extent. Even the smallest module should have its low level design on paper. (Please note, this doesn't have to be a proper documentation. It can be a scribble in a piece of paper, as long as it is available handy during development of that module :-) )

- It is said that the ideal Software development life cycle has - 30% design, 40% development, 30% testing and validation. Although I would prefer 40% in design and blueprinting each and everything before the development starts, but at least not 40%, see to it that you utilise the 30% earmarked for design effectively and truthfully. I am sure everyone would agree to it, that spending more time in design (even if there is a slippage for the development to start) is worth it since the development would be faster and more or less monotonous.

- Allocate the modules to people who are specialised to do that specific piece of work. E.g. A person might be very good at usability and UI development. Make sure he or she is entrusted the task they are best at and so on. Everyone should know what they are constructing and how is it going to be used in the next upper layer. Involve the team as much as possible. The integration can be managed by module leaders and team leaders, and hence they need to know precisely what their deliverable are, what is their end product and most important, how is it going to fit in the overall system.

- Design documents should be used by the developers as a task guide, and hence see to it that the design documents for each sub module is as accurate as possible.

- Most importantly, plan the activities in such a way that the modules which need to be integrated with other modules are ready before the integrating module is just about to complete or completed. The next set of modules which can be independently developed can start in parallel by a different team. In short as I said earlier, the Project plan should be as accurate as possible.

There are many such points which can be blindly picked up from the way a civil engineering works and incorporated for software development. I have just tried to highlight the importance of having the design and blueprint accurate and complete before the development starts.

I am sure many may disagree with me to this, with a reasoning that we get very less time for software development and this does not arise is not the case with civil engineering.
The civil engineering is more than 500 year old industry and hence the ultimate aim for the software industry is to reach such accuracy that civil engineering follows.

But, with all my previous experience, I have uniformly noticed one thing that, totalled time taken for bug fixing and maintenance plus the initial development, in case of a quickly designed projects, is much more than projects which are accurately and designed in detail. There may not be any visible output early but the end product is not only sturdy but also long lived.

So that was my day on a boring Saturday which turned out to be a very fruitful one. So next time when you come across a building getting constructed, just try spending an hour or so just to notice the set of activities they do and just try to relate it to the software development life cycle and I am very sure, you would end up getting a better understanding than what I have written :-) If I knew to write great articles, I would have been an author of few books by now :-D I am very poor in expressing stuff and explaining, and hence I sincerely hope the message has been passed through successfully.