Tuesday, April 27, 2010

Cluster Computing

In computers, clustering is the use of multiple computers, typically PCs or UNIX workstations, multiple storage devices, and redundant interconnections, to form what appears to users as a single highly available system. Cluster computing can be used for load balancing as well as for high availability. Advocates of clustering suggest that the approach can help an enterprise achieve 99.999 availability in some cases. One of the main ideas of cluster computing is that, to the outside world, the cluster appears to be a single system.

A common use of cluster computing is to load balance traffic on high-traffic Web sites. A Web page request is sent to a "manager" server, which then determines which of several identical or very similar Web servers to forward the request to for handling. Having a Web farm (as such a configuration is sometimes called) allows traffic to be handled more quickly.Clustering has been available since the 1980s when it was used in DEC's VMS systems. IBM's sysplex is a cluster approach for a mainframe system. Microsoft, Sun Microsystems, and other leading hardware and software companies offer clustering packages that are said to offer scalability as well as availability. As traffic or availability assurance increases, all or some parts of the cluster can be increased in size or number.

Tuesday, April 13, 2010

Understand what daemon is???

A demon (also see daemon which has a somewhat similar meaning) is a program or process, part of a larger program or process, that is dormant until a certain condition occurs and then is initiated to do its processing. Eric Raymond cites an artificial intelligence ( artificial intelligence ) application as an example. An AI program might include a number of demons, one or more of which might become active when a new piece of knowledge was acquired by the AI program. If the new knowledge affected a particular demon's own sphere of knowledge, it would spring into action and create new pieces of knowledge based on its particular inference rules. Each of these new pieces of knowledge might in turn activate additional demons that would continue to filter through and refine the entire AI knowledge base.

Wednesday, April 7, 2010

Understand what are .ini files

INI is a file name extension used in Microsoft Windows. The letters stand for initialization. As this term implies, INI files are used to initialize, or set parameters for, the operating system and certain programs.

In Windows, two common INI files are SYSTEM.INI and WIN.INI. It is possible to get some idea of what these files do by opening them in a plain-text (ASCII) word processor or in a DOS editor. The files contain statements that set various parameters for the mouse, keyboard, peripherals, screen colors, passwords, and so on. Under ordinary circumstances, no changes should be made to these files in the text editor. (If the text editor presents the option to "Save changes" upon closing, click on "No.")

In Windows 95, 98, NT, and later versions, much of the configuration is done through values in the registry, rather than through INI files. Certain programs contain their own INI files. The contents of these files are normally modified by changing the characteristics of a program through the user interface for that program, not by editing the files themselves.

Monday, April 5, 2010

Difference between Table and View in Oracle

A table is where you store your data. The table actually occupies space on disk. A sample table might be the EMPLOYEE table which has the columns EMPID, EMP_NAME, and SALARY.

A view is a stored query. A sample view might look like the following:

CREATE VIEW emp_view AS SELECT empid,emp_name FROM employee;

Notice that in the view, I have omitted the SALARY column. You can then query the view similar to the following:

SELECT * FROM emp_view;

Oracle will know this is a view and automatically rewrite the query to return only the EMPID and EMP_NAME columns from the EMPLOYEE table.

Views are used primarily to store a common query in the database. Without the view, you might have the same complex query stored in multiple locations in your application code. If you need to make a change, you would have to change the query in all locations. However, if that query were in a view, you would only have to change it in one location.

The other common reason for a view is for security purposes. If I grant a user the ability to query EMP_VIEW and they do not have permissions to query the EMPLOYEE table, then they could never see the SALARY column.

Thursday, April 1, 2010

Understand Deadlock

A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.

The earliest computer operating systems ran only one program at a time. All of the resources of the system were available to this one program. Later, operating systems ran multiple programs at once, interleaving them. Programs were required to specify in advance what resources they needed so that they could avoid conflicts with other programs running at the same time. Eventually some operating systems offered dynamic allocation of resources. Programs could request further allocations of resources after they had begun running. This led to the problem of the deadlock. Here is the simplest example:

Program 1 requests resource A and receives it.
Program 2 requests resource B and receives it.
Program 1 requests resource B and is queued up, pending the release of B.
Program 2 requests resource A and is queued up, pending the release of A.

Now neither program can proceed until the other program releases a resource. The operating system cannot know what action to take. At this point the only alternative is to abort (stop) one of the programs.

Learning to deal with deadlocks had a major impact on the development of operating systems and the structure of databases. Data was structured and the order of requests was constrained in order to avoid creating deadlocks.


Below is a funny example of car deadlock.
:)