This is the first article in the series of articles exploring distributed java application development.
In this article we will discuss some basic concepts.
Basic Concepts/Definitions:
Software requirements are divided in to two types, Functional Requirements and
Non-Functional Requirements
Functional Requirements (FRs) defines the specific behavior (or) functionality
of the system. They tell exact usage of the system being designed. We will capture these
requirements in Software Requirement Specification (SRS). We define them as
“System shall do *****” etc.. The plan for implementing FRs is detailed in
the “System Design/Design Document”.
Non-Functional Requirements (NFRs) is a requirement that specifies criteria
that can be used to judge the operation of the system. These are also called
“Qualities” of the system. We define them as “System shall be 99.9% Available”
etc.. The plan for implementing non-functional requirements is detailed in the
system architecture.
The important NFRs are
1. Scalability
2. High-Availability
3. Load-balancing
4. Fault Tolerant/Fail-Over
Scalability : Ability to handle additional load by adding more computational resources (CPU , RAM, Disk, Network etc..). Scalability can be Vertical scalability and Horizontal scalability.
Vertical scalability (Scaling Up): is handling additional load by adding more power to a single machine. i.e By adding a faster CPU, add more RAM or using a faster Solid-State Disk (SSD).
Horizontal scalability (Scaling Out): is handling additional load by adding more servers.
Horizontal scalability is much harder to achieve as adding servers requires
ensuring data consistency and process synchronization.
The distribution of processing load among the group of servers is known as server load balancing.
A server failure can be because of many reasons; system failures, planned outage, hardware or network problems etc.
High availability: is redundancy in the system. If one server fails, the others take
over the failed server’s load transparently. The failure of an individual server is invisible to the client. High availability can ensured by not having any single points of failure. Our traditional single-server solution can be good for scalability (add more memory and CPU), but not for high availability as it has single point of failure.
Fault tolerant service: always guarantees strictly correct behavior despite a certain
number of faults. Failover is another key technology behind clustering to achieve fault
tolerance. By choosing another node in the cluster, the process will continue when the
original node fails.
We traditionally start with single server architecture for our applications.
But sooner or later application will have to process more requests/data than a
single server can handle. Scaling up (Vertical Scalability) (Fig A) can be used.
Scaling up can be a short-term solution. And it’s a limited approach because the cost of
upgrading is disproportionately high relative to the gains in server capability.
For these reasons most successful Internet companies/enterprise applications
follow a scale out (Horizontal Scalability) (Fig C) approach.
We need to horizontally scale our application to multiple servers based on
low-cost hardware and operating systems (cluster of servers).
A cluster is a group of application servers that transparently run your application as if it were a single entity. In order to implement server clustering we need distributed applications/technologies.
There are different types clusterings at different tiers like DB Clustering, Hardware Clustering, Application Server (AS) Clustering and Application-level Clustering.
Next article we will discuss more about Application-level Clustering
References:
https://en.wikipedia.org/wiki/Non-functional_requirement
http://www.outsystems.com/blog/2013/03/the-truth-about-non-functional-requirements-nfrs.html