Showing posts with label Software Engg. Show all posts
Showing posts with label Software Engg. Show all posts

Friday, August 13, 2010

Orthogonality

Literally orthogonality means at right angles, hence independent or irrelevant to.

In programming languages, orthogonality means design so that changes in one thing don’t effect another. The example they give a user interface and database — you should be able to swap the database without changing the interface or make changes to the interface without affecting the database.

When this term is used in describing computer instruction sets, orgothogonal instruction set can use any register for any purpose while in non-orthogonal set (such as the Intel Pentium), each register has special properties, e. g. only CX can be used for counting string loops.

So non-orthogonality means exceptions to the general language rules, which make it harder to learn. It means that you cannot combine language features in all possible ways. Excessive orthogonality makes it possible to say silly things in the language that complicate the compilers. 

Here are some examples of non-orthogonality in C:

1. C has two kinds of built-in data structures, arrays and records (structs). Records can be returned from functions, but arrays cannot.
2. A member of a struct can have any type except void or a structure of the same type.
3. An array element can be any data type except void or a function.
4. Parameters are passed by value, unless they are arrays, in which case they are passed by reference.
5. a+b usually means that they are added, unless a is a pointer the value of b may be changed before the addition takes place.

Orthogonality is one of the most important properties that can help make even complex designs compact. In a purely orthogonal design, operations do not have side effects; each action (whether it's an API call, a macro invocation, or a language operation) changes just one thing without affecting others. There is one and only one way to change each property of whatever system you are controlling.

Eg. computer monitor has orthogonal controls. Its brightness can be changed independently of the contrast level, and (if the monitor has one) the color balance control will be independent of both. Otherwise it would have been difficult to adjust a monitor on which the brightness knob affected the color balance: you'd have to compensate by tweaking the color balance every time after you changed the brightness.




Orthogonality reduces test and development time, because it's easier to verify code that neither causes side effects nor depends on side effects from other code — there are fewer combinations to test. If it breaks, orthogonal code is more easily replaced without disturbance to the rest of the system. Finally, orthogonal code is easier to document and reuse.

The concept of refactoring, which first emerged as an explicit idea from the ‘Extreme Programming’ school, is closely related to orthogonality. To refactor code is to change its structure and organization without changing its observable behavior.

Java and orthogonality
Java is orthogonal in various cases where c or cpp fails. Here are some cases of Java as orthogonal language.
Egs.
1. C has two kinds of built-in data structures, arrays and records (structs and classes also in cpp). Records can be returned from functions, but arrays cannot. But in case arrays can also be returned.
2. We have to check whether a combination of keywords/constructs that could affect each other when used simultaneously on an identifier. For example when applying public and static to a method, they do not interfere with each other, so these two are orthogonal.

Unix and orthogonality
Unix is praised for its design being orthogonal.

Eg. File is opened for write access without exclusive-locking it for write, for example; This is not the case with every operating system. Old-style (System III) signals were non-orthogonal, because signal receipt had the side-effect of resetting the signal handler to the default die-on-receipt. There are large non-orthogonal patches like the BSD sockets API and very large ones like the X windowing system's drawing libraries.

But on the whole the Unix API is a good example: Otherwise it not only would not but could not be so widely imitated by C libraries on other operating systems. This is also a reason that the Unix API repays study even if you are not a Unix programmer; it has lessons about orthogonality to teach.

Cloud Computing and Virtualization

Cloud Computing is defined as a pool of virtualized computer resources. Based on this Virtualization the Cloud Computing paradigm allows workloads to be deployed and scaled-out quickly through the rapid provisioning of virtual machines or physical machines. A Cloud Computing platform supports redundant, self-recovering, highly scalable programming models that allow workloads to recover from many inevitable hardware/software failures.

A Cloud Computing platform is more than a collection of computer resources because it provides a mechanism to manage those resources. In a Cloud Computing platform software is migrating from the desktop into the "clouds" of the Internet, promising users anytime, anywhere access to their programs and data. The concept of cloud computing and how virtualization enables it offers so many innovative opportunities that it is not surprising that there are new announcements every day. The innovation will continue and there will be massive value created for customers over the coming years.

Use of Virtualization in cloud computing

Virtualization is one of the elements that makes cloud computing. Though cloud computing does not center on virtualization or any one technology.


Cloud computing can happen without virtualization. Certain hardware, operating system and even application clusters can deliver cloud services. But these technologies can be complicated and costly, often requiring a lot of work to provide a limited set of features.

The more likely scenario is that a private cloud computing environment is built on a virtual infrastructure. Many organizations have deployed virtualization by creating virtual servers on top of their existing networking, storage and security stacks. But with private cloud computing, you need to think about and design these technologies in conjunction with one another.

In other words, you built previous virtual infrastructures on these stacks, but you need to build a private cloud with these stacks.


Cloud computing is as much a methodology as it is a technology. You cannot plan any single element without considering the effect on the others. You also have to add in practices and policies that govern chargeback, monitoring, procurement and many other facets of your IT infrastructure.

For example, the ability to rapidly provision virtual machines does no good if it still takes six weeks to order and install a host server. Furthermore, procurement will always be a problem if chargeback is not recovering costs, and that requires resource and utilization monitoring. If your storage and compute resources have different provisioning schedules, they'll have to be documented and reconciled to properly forecast demand. I could go on, but your business requirements ultimately drive everything.

Private cloud computing does not center on virtualization or any one technology. It uses a set of technologies that have been aligned to be highly flexible and provide a wide range of services. This approach does not require virtualization, but virtualization does lend well to the core concepts of cloud computing.

Virtualization and cloud computing are also so closely connected because the major hypervisor vendors -- VMware, Microsoft and Citrix Systems -- are putting a lot of emphasis on the cloud. They have closely aligned their products with tools and complementary technologies that promote the adoption of private cloud computing.

Cloud computing is a rapidly evolving discipline, and one that will reshape org charts as fast as it will change data center layouts. It closely aligns with virtualization, but it takes many technologies to be successful.

Thursday, August 12, 2010

Virtualization

Virtualization is the term which may be used in various cases like hardware, memory management, storage, desktop, data and network. In these cases it has different functions and meanings.
Here are some cases of virtualization:
Hardware virtualization - Execution of software in an environment separated from the underlying hardware resources

Memory virtualization -  Aggregating RAM resources from networked systems into a single memory pool

There are other cases as well - network virtualization, storage virtualization and many more.

Definition
Virtualization is a framework or methodology of dividing the resources of a computer into multiple execution environments, by applying one or more concepts or technologies such as hardware and software partitioning, time-sharing, partial or complete machine simulation, emulation, quality of service, and many others.

Note that this definition is rather loose, and includes concepts such as quality of service, which, even though being a separate field of study, is often used alongside virtualization. Often, such technologies come together in intricate ways to form interesting systems, one of whose properties is virtualization. In other words, the concept of virtualization is related to, or more appropriately synergistic with various paradigms. Consider the multi-programming paradigm: applications on modern systems run within a virtual machine model of some kind.

Generally speaking virtualization abstracts out things.

Benefits of virtualization
  1. Adaptability is becoming an increasing focus for the management of modern business. With new opportunities and threats always lurking on the horizon, businesses must be able to quickly, efficiently, and effectively react to their dynamic environment. With regard to IT infrastructure, virtualization is perhaps the most effective tool for facilitating this adaptability. In virtualized systems, the expansion and reduction of technical resources can be performed seamlessly. Because physical devices and applications are logically represented in a virtual environment, administrators can manipulate them with more flexibility and reduced detrimental effects than in the physical environment. Through the use of virtualization tools (which vary from 1 case to another), server workloads can be dynamically provisioned to servers, storage device usage can be manipulated, and should a problem occur, administrators can easily perform a rollback to working configurations. Generally, the addition (or removal) of hardware can be easily managed with virtualization tools.
    Increased demand for data or database capabilities can be easily met with data and database virtualization through the management of new DBMSs or physical infrastructure with virtualization tools. So this is storage virtualization. All of these examples illustrate the adaptable nature of the virtual enterprise.

  2. In addition to adaptability, there are lower operating costs through implementing virtualization within his or her infrastructure. There is much inherent efficiency that comes with implementing this type of system, because much of its focus is on optimizing the use of resources, thus reducing overhead for maintenance. Any element of current infrastructure can be leveraged more fully with virtualization. Switching costs for new operating systems or applications are lowered with the ability to more flexibly install and implement them. The consolidation of servers and storage space obviously increases the return on investment for this hardware by maximizing efficiency.

  3. Lowering costs will allow organization to reallocate the IT budget towards initiatives that are not related to the maintenance of current systems, such as research and development, partnerships, and the alignment of IT with business strategy.

  4. IT managers will be able to increase the productivity of employees across the entire organization through a properly implemented virtualization system. For businesses that rely on in-house application development, an increase in productivity and increased ease of implementation can be seen. Developers within a platform-virtualized environment can program in languages they are most proficient with. Debugging and testing applications becomes second nature with the ability to create contained virtual environments. In this instance, application and systems testing can be performed on a single workstation that employs a variety of virtual machines without the need to transfer and debug code to external computers. Enterprise-wide testing can be performed in isolated virtual machines, which do not interact with or compromise the resources actually being used on the network. Users in a virtualized environment do not know or care how their use of IT resources is being optimized. They are able to access needed information and perform work effectively and simply, without regard to the complexities that exist behind the scenes.

Risks
With any benefit, there is always associated risk. This is also the case for the practice of virtualization.
Following are the risk involved with virtualization:
  1. The first problem that IT managers must be aware of occurs in the planning and implementation of virtualization. The organization must decide if, in fact, virtualization is right for their organization. The short-term costs of an ambitious virtualization project can be expensive, with the need for new infrastructure and configuration of current hardware. In businesses where cost reduction and flexibility of IT are not currently in alignment with the businesses strategy, other initiatives will be better suited. That is not to say that virtualization is not right for every environment, because most any organization can reap the benefits of a properly planned virtualization initiative. It is the timing and scope of such initiatives that must be scrutinized.
  2. Another risk associated with virtualization can occur in businesses that do not have an efficient element of redundancy in their systems. Because the convergence of resources often takes place in virtualization environments, especially in that of server virtualization, the physical failure of one piece of hardware will impact all virtual elements that it manages. It is therefore necessary to ensure that backup systems are in place to deal with such problems. Fortunately, because of the isolation inherent in virtualized systems, backup processes can be greatly simplified.
  3. A final problem that can occur in virtualized systems is increased overhead. The software layers inserted in between resources can chew up processor cycles, sometimes up to double-digit percentages.
Conclusion
With the positives far outweighing the negatives, virtualization is a technology that will soon be a universal practice. In the coming time, virtualization will become just a standard layer of the infrastructure stack. As costs for virtualization technology begin to decline, and more hardware manufacturers such as Intel and AMD begin to include built-in virtualization functionality in their products, it will become increasingly difficult to justify not using virtualization in an IT system. The unmatched effectiveness of virtualization to provide adaptability and reduce costs for the enterprise will empower IT managers and position their organizations for growth. Because of the inevitable induction of virtualization technology into the standard architecture stack, organizations from all types of businesses should begin sketching the path to their future in virtualization.

Storage virtualization

Storage virtualization is a concept in IT System Administration, referring to the abstraction (separation) of logical storage from physical storage so that it may be accessed without regard to physical storage or heterogeneous structure. This separation allows the Systems Admin increased flexibility in how they manage storage for end users.

Storage virtualization uses address space mapping to achieve location independence by abstracting the physical location of the data. The virtualization system presents to the user a logical space for data storage and itself handles the process of mapping it to the actual physical location.

The virtualization software or device is responsible for maintaining a consistent view of all the mapping information for the virtualized storage. This mapping information is usually called meta-data and is stored as a mapping table. The virtualization software or device uses the meta-data to re-direct I/O requests.

Benefits
Non-disruptive data migration

One of the major benefits of abstracting the host or server from the actual storage is the ability to migrate data while maintaining concurrent I/O access.

The host only knows about the logical disk (vdisk) and so any changes to the meta-data mapping is transparent to the host. This means the actual data can be moved or replicated to another physical location without affecting the operation of any client. When the data has been copied or moved, the meta-data can simply be updated to point to the new location, therefore freeing up the physical storage at the old location.

The process of moving the physical location is known as data migration Most implementations allow for this to be done in a non-disruptive manner, that is concurrently while the host continues to perform I/O to the logical disk (vdisk).

Improved utilization
The physical storage resources are aggregated into storage pools, from which the logical storage is created. More storage systems, which may be heterogeneous in nature, can be added as and when needed, and the virtual storage space will scale up by the same amount. This process is fully transparent to the applications using the storage infrastructure
Utilization can be increased by virtue of the pooling and migration.

When all available storage capacity is pooled, system administrators no longer have to search for disks that have free space to allocate to a particular host or server. A new logical disk can be simply allocated from the available pool, or an existing disk can be expanded.

Pooling also means that all the available storage capacity can potentially be used. In a traditional environment, an entire disk would be mapped to a host. This may be larger than is required, thus wasting space. In a virtual environment, the logical disk (vdisk) is assigned the capacity required by the using host.

Storage can be assigned where it is needed at that point in time, reducing the need to guess how much a given host will need in the future. Using Thin Provisioning, the administrator can create a very large thin provisioned logical disk, thus the using system thinks it has a very large disk from day 1.

Fewer points of management

With storage virtualization, multiple independent storage devices, that may be scattered over a network, appear to be a single monolithic storage device, which can be managed centrally.

However, traditional storage controller management is still required. That is, the creation and maintenance of RAID arrays, including error and fault management.

Risks
Backing out a failed implementation

Once the abstraction layer is in place, only the virtualizer knows where the data actually resides on the physical medium. Backing out of a virtual storage environment therefore requires the reconstruction of the logical disks as contiguous disks that can be used in a traditional manner.

Most implementations will provide some form of back-out procedure and with the data migration services it is at least possible, but time consuming.

Interoperability and vendor support

Interoperability is a key enabler to any virtualization software or device. It applies to the actual physical storage controllers and the hosts, their operating systems, multi-pathing software and connectivity hardware.

Interoperability requirements differ based on the implementation chosen. For example virtualization implemented within a storage controller adds no extra overhead to host based interoperability, but will require additional support of other storage controllers if they are to be virtualized by the same software.

Switch based virtualization may not require specific host interoperability — if it uses packet cracking techniques to redirect the I/O.

Network based appliances have the highest level of interoperability requirements as they have to interoperate with all devices, storage and hosts.

Complexity

Complexity affects areas like :

  • Management of environment : Although a virtual storage infrastructure benefits from a single point of logical disk and replication service management, the physical storage must still be managed. Problem determination and fault isolation can also become complex, due to the abstraction layer.
  • Infrastructure design : Traditional design ethics may no longer apply, virtualization brings a whole range of new ideas and concepts to think about (as detailed here)
  • The software or device itself : Some implementations are more complex to design and code - network based, especially in-band (symmetric) designs in particular — these implementations actually handle the I/O requests and so latency becomes an issue.

Meta-data management

Information is one of the most valuable assets in today's business environments. Once virtualized, the meta-data are the glue in the middle. If the meta-data are lost, so is all the actual data as it would be virtually impossible to reconstruct the logical drives without the mapping information.

Any implementation must ensure its protection with appropriate levels of back-ups and replicas. It is important to be able to reconstruct the meta-data in the event of a catastrophic failure.

The meta-data management also has implications on performance. Any virtualization software or device must be able to keep all the copies of the meta-data atomic and quickly updateable. Some implementations restrict the ability to provide certain fast update functions, such as point-in-time copies and caching where super fast updates are required to ensure minimal latency to the actual I/O being performed.

Performance and scalability

In some implementations the performance of the physical storage can actually be improved, mainly due to caching. Caching however requires the visibility of the data contained within the I/O request and so is limited to in-band and symmetric virtualization software and devices. However these implementations also directly influence the latency of an I/O request (cache miss), due to the I/O having to flow through the software or device. Assuming the software or device is efficiently designed this impact should be minimal when compared with the latency associated with physical disk accesses.

Due to the nature of virtualization, the mapping of logical to physical requires some processing power and lookup tables. Therefore every implementation will add some small amount of latency.

In addition to response time concerns, throughput has to be considered. The bandwidth into and out of the meta-data lookup software directly impacts the available system bandwidth. In asymmetric implementations, where the meta-data lookup occurs before the information is read or written, bandwidth is less of a concern as the meta-data are a tiny fraction of the actual I/O size. In-band, symmetric flow through designs are directly limited by their processing power and connectivity bandwidths.

Most implementations provide some form of scale-out model, where the inclusion of additional software or device instances provides increased scalability and potentially increased bandwidth. The performance and scalability characteristics are directly influenced by the chosen implementation.

Network virtualization

In computing, Network Virtualization is the process of combining hardware and software network resources and network functionality into a single, software-based administrative entity, a virtual network. Network virtualization involves platform virtualization, often combined with resource virtualization.

Network virtualization is categorized as either
1. External, combining many networks, or parts of networks, into a virtual unit,
2. Internal, providing network-like functionality to the software containers on a single system.
Whether virtualization is internal or external depends on the implementation provided by vendors that support the technology.

Components of a virtual network
Various equipment and software vendors offer network virtualization by combining any of the following:
  • Network hardware, such as switches and network adapters, also known as network interface cards (NICs)
  • Networks, such as virtual LANs (VLANs) and containers such as virtual machines (VMs) and Solaris Containers
  • Network storage devices
  • Network media, such as Ethernet and Fibre Channel
Benefits
Virtualization is thought as a means to overcome the weaknesses of the current Internet. Major
router vendors have already started to support virtual routers and programmability to run user defined protocols. Currently, up to 255 virtual routers can be configured on the physical interface of a single router by using Cisco’s Virtual Router Redundancy Protocol.
In a virtualization-enabled networking infrastructure, a number of diverse VNs(Virtual networks) will be sharing resources offered by an IP-network, such as the Internet, commonly referred to as Substrate Network (SN). These VNs can be constructed through the deployment of virtual routers and virtual links. Moreover, an important requirement for such infrastructures may also be a support to pluralism. It will seek to introduce virtualization as an architectural attribute of the Internet, which will enable continuous embedding of innovative technologies in the Internet. Such approaches will act as protection against ossification of the Internet.
One of the most important issues in network virtualization is an efficient utilization of SN resources. It will help to improve the resource utilization as well as avoiding congestion in the SN.

Risks
1. It may lead to high cost, if the load on the server less.
2. It involves higher complexity.
3. There is increased overhead.

Wednesday, December 9, 2009

Various Software model

Software Process is a particular method, generally involving a number of steps along with ordering constraints on execution, to produce software with desired outcome


2 Major processes : Development, Project Management.


Methodologies for Software Development - ETVX 


ETVX model
(l.w. = ex , tv...entry, exit; task validation)



Quality in the process

A quality process has the right inputs and performs the right actions to produce outputs that meet the needs of customer processes.
Definitions of quality thus include:
  • Fitness for purpose
  • Right output, right time, right place
  • Customer satisfaction

ETVX Points

There are four places where the quality can be specified and checked:
  • Entry criteria define what inputs are required and what quality these must be to achieve the exit criteria. Entry criteria should be communicated to supplier processes, to become their exit criteria. If supplier processes are sufficiently well controlled, then there is no need to check inputs.
  • Task definitions specify the actions within the process.
  • Validation definitions identify test points within the process and define the tests and criteria for checking at these points. This enables problems to be caught close to their cause, reducing rework and scrap costs, and enabling problem causes to be addressed.
  • Exit criteria define what outputs are required and what quality these must be to meet the needs of customer processes. Exit criteria may be derived from the entry criteria of customer processes.


Common Process models - , Waterfall model, Prototype, spiral

SDLC - software development life cycle

Waterfall model 
Feasibility report / Requirement Analysis,
System Design, Implementation/Coding, Testing , Deployment, Maintenance
FDC TDM
(Fools Dont cost, Tools Dont make)


nLinear ordering implies each phase should have some output
nThe output must be validated/certified
nOutputs of earlier phases: work products
nCommon outputs of a waterfall: SRS, project plan, design docs, test plan and reports, final code, supporting docs




Prototyping Model
Prototyping - Software prototyping, an activity during certain software development, is the creation of prototypes, i.e., incomplete versions of the software program being developed.
A prototype typically simulates only a few aspects of the features of the eventual program, and may be completely different from the eventual implementation.








Software management process

Capability Maturity Model

(H A R D M O DEL

Level 1 - Ad hoc (Chaotic)
It is characteristic of processes at this level that they are (typically) undocumented and in a state of dynamic change, tending to be driven in an ad hoc, uncontrolled and reactive manner by users or events. This provides a chaotic or unstable environment for the processes.
Level 2 - Repeatable
It is characteristic of processes at this level that some processes are repeatable, possibly with consistent results. Process discipline is unlikely to be rigorous, but where it exists it may help to ensure that existing processes are maintained during times of stress.
Level 3 - Defined
It is characteristic of processes at this level that there are sets of defined and documented standard processes established and subject to some degree of improvement over time. These standard processes are in place (i.e., they are the AS-IS processes) and used to establish consistency of process performance across the organization.
Level 4 - Managed
It is characteristic of processes at this level that, using process metrics, management can effectively control the AS-IS process (e.g., for software development ). In particular, management can identify ways to adjust and adapt the process to particular projects without measurable losses of quality or deviations from specifications. Process Capability is established from this level.
Level 5 - Optimized
It is a characteristic of processes at this level that the focus is on continually improving process performance through both incremental and innovative technological changes/improvements.