29 Oct 2009

Rise and fall of Microsoft


During 1990 to 2000 - following paragraph was relevant. In fact, this is what I wrote in my blog in 2000.
Most people nowadays when buying new computers use Windows as OS. Some of them are even unaware that there are dozens of other operating systems. For example, Apple's Macintosh, IBM OS/2, Linux etc. These are for PCs. For main frames there are AS/400, Windows NT, Unix etc. It's not that Windows is the best of all, but it is really the most popular. Windows graphical user interface is not at all intimidating. In fact, it is the Microsoft's business strategy, which has made Windows #1 OS. Back in the seventies, Microsoft & IBM jointly developed DOS. At that time Microsoft envisages that computer industry will revolve around PCs rather than main frames as thought by IBM. So, in an attempt to dominate PC market Microsoft launched Windows. And it was a quick success. However, Microsoft is not the pioneer in developing GUI. Apple Macintosh developed a GUI OS longer ago when people were using DOS 3.0! Experts believe that MacOS is still superior to Windows. But, Apple made a blunder by trying to say customers what they offer than to listening what they want. Very recently, Apple is selling their most advanced PC without a floppy drive! They have included a CD writer instead. They argue that floppy disk backdated. I think that most potential buyer will stay aside form the product. Another wrong step of Apple's was that they patented their programs as well as their design. But IBM did not. When you buy an IBM compatible computer from market, IBM does not get any royalty. This is perhaps one major reason behind such widespread success of selling PCs. Among all OS Windows is perhaps the most forgiving. The IBM OS/2 may be more powerful than Windows, but it won't run if there is a slightest discrepancy in you computer's hardware.
In 2009, the above scenario has changed a lot!
Today Microsoft is quickly being replaced from #1 software giant on earth. It's now head to head between Microsoft and Google. So far, Microsoft got most its revenue from its ubiquitous operating system, Windows (various flavours) and Office products. At this very moment, both have serious alternatives. Open Office is nearly 90% as good as Microsoft Office. It is free! Linux has become more matured and one can even run it from USB disks directly. This is free too and you are encouraged to copy and distribute. All products, where Microsoft were a pioneer a decade back, has now either free or very cheap similar alternatives. Be it Microsoft Encarta encyclopaedia ( = Wikipedia), Microsoft Encarta Atlas ( = Google Earth), Microsoft Train/Flight Simulator (actually developed by Kuju which Microsoft bought later), Visio (= free flow chart editor) or whatever - you name it and we have a free alternative!
I know you're going to shout that I missed two important candidates, Visual Studio and SQL Server. Yes, Visual Studio does not have any equivalent because it runs only on Microsoft platform! On other hand, Express version of Visual Studios is freely downloadable and perfectly serves amateur developers. SQL Server still has a good market as low cost database with good features but MySQL, PostgreSQL and Oracle lite editions are not far away.
Very recently Microsoft announced that they will launch web editions of Office software. Alas, too little too late. We already have competing products like Google Docs, Zoho office, Editgrid etc. Still, most computers are sold as Windows pre-installed. But as time goes by, we shall see several others of being offered with Linux.
Windows Mobile was launched with much fanfare. Yet, it is now dying smart phone OS - facing stiff competition from open source systems like Symbian, Android, Linux Maemo etc.
Microsoft's search engine, Bing, failed to make a dent in Google or Yahoo's dominance.
Windows Live is a flop! Hotmail users are migrating to Gmail, Yahoo or other places.
Interestingly, Microsoft's arch rival Apple is rather going stronger!
I personally disliked Apple for their closed architectural approach to everything (including iPhone). To use an iPhone to its full potential, one needs to jail break it - which is not supported by Apple. Also, you can't use it without involving iTunes! What a rubbish concept.
Yet, Apple was successful making iPhone make a desirable item to millions around the globe.
Microsoft's Zune never managed to compete with iPod. Windows mobile is struggling where iPhone is flourishing!
I always admired Microsoft. Unlike Apple, they never crippled their software and they encouraged piracy of their product. That's why it their products got such a big market share today. I myself learned computer on DOS (and then Windows) and Visual Basic was first programming language I mastered.
So what did Microsoft do wrong?
They failed to see the power of crowd sourcing. Wiki is today's power. Voluntary collaborative approach gave birth to Linux, Firefox, Wikipedia and much more.
Bill Gates also could not comprehend power of cloud computing. He tried to stick with 1 computer 1 license revenue concept - which is now becoming obsolete.
Microsoft never invested properly to their database business, that's why SQL Server could never become true competitor to Oracle. Microsoft always targeted mass market via Windows and Office. But after World Wide Web, people every where has so much choice.
Windows 7 is a desperate attempt to get some people back to Windows. But again it is going to fail. I now like to see Linux in my computer rather than Windows.

20 Oct 2009

Oracle RAC - tiny intro

Introduction

An RAC database is a clustered database.

There are multiple Oracle instances which are connected via "interconnect" - which is a type of LAN.

The datafiles are stored in several disk drives which are connected by "cluster aware storage".

By adding multiple instances, we can add and remove and single Oracle instance without bringing the database down. So, database always remains available. That is the essence of RAC - high availability.

An RAC database is managed by "Oracle Clusterware". RAC operates in "shared everything" architecture mode.

Any storage (eg. SAN, SCSI etc.) can be used with RAC. However, good I/O speed is required for scalability of storage.

RAC supports up to 100 clusters which may be different at hardware level but must run same operating system!

Oracle recommends using ASM (Automatic Storage Management) for ease of dealing with clustered storage.

As a reminder, the RAC is used for high availability and scalability. When work load grows, you can simply add another server to the grid (RAC is a type of grid computing after all).

RAC can be managed via Oracle Enterprise Manager.

An Oracle RAC database requires three components - cluster nodes (the servers or computers running Oracle instances), shared storage (disk drives) and Oracle Clusterware (software application).

Installing RAC

The first step of working with RAC is to install "Oracle Clusterware" which is installed via Universal Installer.

Then you have to configure the clusterware.

Then install ASM (Automatic Storage Management)

Now install Oracle 11g database

Then perform post installation tasks. This ensures that clusterware and database are installed properly and they are aware of each other.

It is possible to convert your normal single instance Oracle database to an RAC database. You can achieve this via Enterprise Manager or "rconfig" utility.

Administering Clusterware

Oracle Clusterware includes two important components: the voting disk and the OCR.

The voting disk is a file that manages information about node membership, and the OCR is a file that manages cluster and Oracle RAC database configuration information.

RAC can be administered via Oracle Enterprise manager. On EM's web console mode, click on Availability tab to see details of Clusterware. You can click on Topology tab to see a visual represntation of your nodes. The Interconnect tab shows you info on interfaces. You can also add new instance to clusterware via EM (under Server tab).

Oracle Clusterware posts alert messages in alert log - which is under $CRS_home.

RAC data dictionary views are created by catclust.sql.

Cache Fusion

Oracle RAC uses "Cache Fusion" to synchronize the data stored in the buffer cache of each database instance.

Since all computers/instances in an RAC access the same database, the overall system must guarantee the coordination of data changes on different computers such that whenever a computer queries data it receives the current version - even if another computer recently modified that data. Oracle RAC refers to this functionality as Cache Fusion. It involves the ability of AC to "fuse" in-memory data cached physically separately on each computer into a single global cache.

Recommended Reference for further reading:

Oracle Database 2 day + RAC
http://download.oracle.com/docs/cd/B28359_01/rac.111/b28252.pdf

Converting single instance database to RAC

http://www.oracle.com/technology/pub/articles/chan_sing2rac_install.html

Other
http://www.orafaq.com/wiki/RAC_FAQ

3 Oct 2009

iPhone is not a geek phone (yet)

In spite of so much hype about iPhone, I still think it is not for geeks (as yet).


It may be flashy and have a good touch screen interface, but it is limited any too manys ways.

First, is the lack of open architecture. Apple has always been a pet hate of mine for their unwillingness to offer an open platform.


Though Apple is so vocal about their millions of applications available for iPhone hype, most free applications are just crap. Yes, I repeat just crap. Even some paid apps are craps too. Agreed, most iPhone apps don’t cost more (may be £1) however, most of them don’t do any real task either.


Problem is, most iPhone apps are still not matured. Numerious applications are just a front end interface for web based applications (like iPhone Facebook, news readers etc.). Any website, which is designed for mobile browsing, is already offering same feature and functionality. All those apps which can’t be used unless you’re online are pretty much useless IMHO.


My next gripe is the iTune. You can just install an application directly (without using iTune) to iPhone. You can bypass iTune but you must then install it directly from App Store. Give me the option of copying application directly to its memory from computer.


There are not many applications which you can use in iPhone while being off-line. If you are willing to develop iPhone applications and NOT on Mac platform, then you are screwed. Apple arch rival Microsoft is still way ahead with the formers intuitive Visual Studio IDEs. You may argue why Apple should offer good IDEs in Microsoft platform? Well, forget MS platform, why not offer something on free Linux platform?


Yes, you can achieve a lot more things by jail breaking the iPhone. But why do I need to do it in the first place. The product should be sold in unlocked form in a reasonable price.

In some European countries, Apple does sell iPhone in unlocked format!!

8 Sept 2009

What is g in Oracle's grid computing?


Oracle defines Grid Computing like this -
With grid computing, groups of independent, modular hardware and software components can be connected and rejoined on demand to meet the changing needs of businesses.
What does it exactly mean?
We already know what is parallel computing. A complex task is dividided into smaller parts and each part is processed independently by a computer. Then the outputs are combined to get final result.
How does grid computing differ from this parallel computing?
Grid computing is an abstract (or virtualization, as Oracle says) concept. A grid can be an infrastructure grid, an appllication grid, an information grid and so on.
What - getting more confused? Ok, please read on.
In early days (~ 1980s) of database, the relational database management was starting to gain populartity. In RDBMS terms, a customer buys products and a transaction is generated. All these info like customer, product, transaction etc. are stored in RDBMS. They are linked together (by foreign keys, in 3rd normal form). So from a high level view, customer, product, transaction are all part of RDBMS.
Now come to the present days. We are gathering data like never before! Besides RDBMS, we now have lots of different stuffs like OLAP (Business Intelligence/Data Warehouse etc.), OLTP (transactional data), BPEL (Business Process Execution Language), Web services (using XML), OWB (Oracle Warehouse Builder) etc.
The grid is collection of all these - i.e. different applications and data which speak with one another.
Oracle has product of almost everything nowadays - which is wrapped around a buzzy name called Fusion Middleware. These components are designed so that one component (say OWB ) can interact with another (say core Oracle database). This constitute an architectural grid.
The relational data on your RDBMS can be termed as information grid.
There's another aspect of grid. Take Oracle Real Application Cluster or RAC. Here multiple instances of database are inter-connected to safeguard single point of failure. This is an example of infrastructure grid. Everything is part of grid. It is a concept. It could have been told as Matrix computing too. (Did you enjoy Matrix series of movies?)
Now you know what the buzzword Grid computing mean!

What is Oracle Fusion Middleware (OFM) and Service Oriented Architecture (SOA)?


If you are not sure about what are these things and try to have a look at Oracle's website, there is a good chance that you might find yourself confused.
That's quite expected. Oracle's website is for marketing their product. It's not their interest to describe their products in a way that people think it is there is no magic about it!
So, here I try to explain the things in non-geeky terms.
The Fusion Middleware conisists of Oracle's non core-database products - some of which are not actually middleware!
This includes Oracle's Developer suite (Forms & Reports), Java related tools, web logic server, content management etc. OFM depends on open standards such as BPEL, SOAP, XML and JMS.
Oracle SOA is a part of OFM.

What is SOA?

The main essence of SOA is that applications will talk with each other in a language (i.e. data format, process steps) which is understood by all others applications communicating with.
SOA is about reuse.
SOA helps business to move, change, partner and re-invent itself with ease and grace.
SOA extends idea of reuse not only to web services but also with business services.
SOA components are loosely coupled.
SOA can contain web service, BPEL etc.
Web service
Example, you throw a postcode to Yahoo Geocoder and it gives you back latitude, longitude of that post code.
You ask for price of particular item to a website, it suplies you the price.
Usually, web service results are returned in XML format to ensure universal compatibility.
In SOA segment, you will often hear the term "Orchestration". What does it mean?
If you seen an orchestra, you know that conductor just draws some invisible drawings in mid air by moving his magic wand from one side to another. However, musicians can decipher his rhythm and plays their instruments so that every one plays same tune at same pace.
Orchestration in SOA has similar meaning. It ensures that all applications under SOA, know how to be in sync with other applications in the group.
But how orchestration is implemented?
It is done via BPEL or Business Process Execution Language.
BPEL is a tool, using which you can draw how data moves from one application to another. For those who have not used it, it is like a Visio flow chart diagram editor. But, when you draw objects in BPEL, you tell them what to do. You instruct them where to read data from, how to process it and where to send output after processing finished. So, basically it is a graphical tool to define business process. Without BPEL, the whole process will look like thousands of lines of PL/SQL (or Java or C++ or whatever) codes!
Behind the scene BPEL still writes codes - but it just make simpler (!) for any business user to understand and define the process. Now whether that is good or bad is debatable - I am just outlining the concept here.
So, BPEL works to integrate several applications. BPEL usually follows XML standard as interface to several components.
Let us take a bigger example. Your supplies sends you a file which contains all the products, quantities and unit price you ordered for. You need to update your inventory accordingly. Now assume that your supplier quoted the price in € but you need to put that in £ in your database. Using absolute minium technology, you need to write a small program to convert € to £ while loading that data to your system. But if you are using BPEL, you can visually draw the program!

6 Sept 2009

What is best Smart Phone?

I was looking in market for a comprehensive feature rich smart phone. But more I looked, more I got confused!
Although iPhone is probably current market leader, but it has two serious drawbacks - too pricey and comes locked to network! Though it is possible to jailbreak iPhone, it invalidates warranty. Too bad :(
Nokia's N97 is again too pricey. Its user interface is no match to that of iPhone's. Although a separate key board does help a lot.
I am currently an old generation Palm PDA user. So, naturally I keep an eye on its next release Palm Pre model. But I don't think it would be any cheaper.
Nokia E71 looks like Blackberry but I'm not sure if I'd be interested in carry a full size keyboard [which does not hide itself as in N97]. But it is cheaper though screen size is smaller.
This leaves two other candidate - HTC Hero and Blackberry. The former uses Google's Android OS and still have a hefty price tag.
Somehow, I've never been a fan of Blackberry.


22 Aug 2009

Theory of Everything


Fundamental particles and forces

The most common force of nature is gravitational force! Newton's famous 3 equations of motions are based on gravitational force.
This law basically states that two objects in universe attract each other at a force defined by this universal law of gravitation equation:
F = G*m1*m2/ d^2
Where, G = 6.673 x 10-11 Nm2 kg-2
m1 = mass of first object (kg)
m2 = mass of second object (kg)
d = distance between two objects (m)
F = gravitational attraction force (N)
This equation is applicable to objects which are small (few mm) to infinite distance apart.
It pulls matter together, causes you to have a weight, apples to fall from trees, keeps the Moon in its orbit around the Earth, the planets confined in their orbits around the Sun, and binds together galaxies in clusters.
Classical mechanics (or Newtonian physics) laws are applicable to cases where size of particles are larger than atomic level and speed of travel is much lower than that of light.
If you are looking at physics of particles at atomic level, then you need quantum theory. If you are approaching near speed of light, you need Einstein’s theory of relativity.
Example, two cars are coming towards each other at a speed of 30 km/h each their relative speed is 30 + 30 = 60 km/h.
However, if two spaceships are travelling at 270,000 km/s each their relative speed will be found using following formula

u = (v + w)/(1 + v*w/c^2)
Where c is velocity of light, v and w are speeds of two spaceships measured by a 3rd observer. Note that for low values of v & w, the above equation becomes u = v + w.
Atom = nucleus ( = protons + neutrons) + electrons
Electrons have -ve charge while protons have +ve charge.
Since particles with same charge must repulse from each other, there must be a force which holds same +ve charged protons together at nucleus. This force is known as strong nuclear force. This force acts only in a atomic range (10-15 m).
Because the strong force binds nuclear particles so tightly together, huge amounts of energy are released when lightweight nuclei are fused together (fusion reaction) or heavy nuclei are broken apart (fission reaction).. The strong nuclear force interaction is the underlying source of the vast quantities of energy that are liberated by the nuclear reactions that power the stars.
The force for which opposite charged particles (eg. protons & electrons) repels from each other, is known as electro magnetic force.
Which is defined by Coulomb’s equation

F = k1 * k2 / d^2

Electrons are attached to nucleus by this force – thus it holds atoms and molecules together! Like gravitational force, electromagnetic force is applicable to an infinite range.
The electromagnetic force binds [negatively charged] electrons into their orbital shells, around the positively charged nucleus of an atom. This force holds the atoms together.

The electromagnetic force controls the behavior of charged particles and plasmas (a plasma is a mixture of equal numbers of positive ions and negative electrons) as, for example, in solar prominences, coronal loops, flares, and other kinds of solar activity.

The electromagnetic force also governs the emission and absorption of light and other forms of electromagnetic radiation. Light is emitted when a charged particle is accelerated (for example, when an electron passes close to an ion, or interacts with a magnetic field) or when an electron drops down from a higher to a lower energy level of an atom (from an outer to an inner 'orbit' around the atomic nucleus).
The weak nuclear force causes the radioactive decay of certain particular atomic nuclei. In particular, this force governs the process called beta decay whereby a neutron breaks up spontaneously into a proton, and electron and an antineutrino. If a neutron within an atomic nucleus decays in this way, the nucleus emits an electron (otherwise known as a beta particle) and the neutron transforms into a proton. This increases (by one) the number of protons in that nucleus, thereby changing its atomic number and transforming it into the nucleus of a different chemical element. This force is applicable to atomic (10-17 m) range only.

The weak force is responsible for synthesizing different chemical elements in stars and in supernova explosions, through processes involving the capture and decay of neutrons.

When confined within a stable (non-radioactive) atomic nucleus, a neutron is a stable, long-lived particle. Once removed from an atomic nucleus, a free neutron will undergo beta decay, typically in about twenty minutes. The reverse process of beta decay occurs in the collapsing cores of supernovae, where protons and neutrons are fused together to create the vast numbers of neutrons that populate the end product of the collapse - a neutron star.
It has been proved recently that electromagnetic force and weak nuclear force are basically same force – called electro weak force.
Before we move on, there are some other theories we need to learn. One among that is
quantum mechanics. The key idea here is that the smaller the scale at which you look at the world, the more random things become. Heisenberg's uncertainty principle is a famous example of this. The principle states that when you consider a moving particle, for example an electron orbiting the nucleus of an atom, you can never ever measure both its position and its momentum as accurately as you like. Looking at space at a minuscule scale may allow you to measure position with a lot of accuracy, but there won't be much you can say about momentum. This isn't because your measuring instruments are imprecise. There simply isn't a "true" value of momentum, but a whole range of values that the momentum can take, each with a certain probability. In short, there is randomness. This randomness appears when we look at particles at a small enough scale. The smaller one looks, the more random things become!
A major difference between quantum mechanics and classical mechanics is that law of physics depends on sizes of particles in very small scale dimensions. At very small scale (atomic level) the classical laws of physics no longer work. That is the place where quantum mechanics laws will apply.

The theory of everything

We now aim to define earlier fundamental forces by a single theory! That’s where string theory comes.
Theory of everything = to combine, quantum mechanics + relativity + classical mechanics
Classical physics assumes that a particle is the smallest existence. String theory asserts that the fundamental building blocks of nature are not like points, but like strings: they have extension, in other words they have length. And that length dictates the smallest scale at which we can see the world. The estimated size of these strings is 10-34 m.
The mathematics behind string theory is very complex! Our conventional physics so far assumed only 4 dimensions – namely length, width, height and time. But string theory, in its various forms, assume dimension of 10, 11 or even 26. However, it is stated that most dimensions actually exists only in atomic range distance.
Strings can vibrate. In fact they can vibrate in an infinite number of different ways. This suggests that the different particles and forces are just the fundamental strings vibrating in a multitude of different ways.
In a nutshell, the string theory gives us an exciting vision of nature as miniscule bits of vibrating strings in a space with hidden curled-up dimensions.