Monday, 16 March 2015

The Three Little Pigs

Almost everyone knows the story of The Three Little Pigs – but it’s one of those stories that you can hear again and again. 
There was once a family of pigs. The mother pig was very poor, and so she sent her three little pigs out to seek their fortunes. The first that went off met a man with a bundle of straw, and said to him:
“Please, man, give me that straw to build me a house.”
Which the man did, and the little pig built a house with it. Presently came along a wolf, and knocked at the door, and said:
“Little pig, little pig, let me come in.”
To which the pig answered:
“No, no, by the hair of my chiny chin chin.”
The wolf then answered to that:
“Then I’ll huff, and I’ll puff, and I’ll blow your house in.”
So he huffed, and he puffed, and he blew his house in, and ate up the little pig.
The second little pig met a man with a bundle of furze, and said:
“Please, man, give me that furze to build a house.”
Which the man did, and the pig built his house. Then along came the wolf, and said:
“Little pig, little pig, let me come in.”
“No, no, by the hair of my chiny chin chin.”
“Then I’ll puff, and I’ll huff, and I’ll blow your house in.”
So he huffed, and he puffed, and he puffed, and he huffed, and at last he blew the house down, and he ate up the little pig.
The third little pig met a man with a load of bricks, and said:
“Please, man, give me those bricks to build a house with.”
So the man gave him the bricks, and he built his house with them. So the wolf came, as he did to the other little pigs, and said:
“Little pig, little pig, let me come in.”
“No, no, by the hair of my chiny chin chin.”
“Then I’ll huff, and I’ll puff, and I’ll blow your house in.”
Well, he huffed, and he puffed, and he huffed and he puffed, and he puffed and huffed; but he could not get the house down. When he found that he could not, with all his huffing and puffing, blow the house down, he said:
“Little pig, I know where there is a nice field of turnips.”
“Where?” said the little pig.
“Oh, in Mr Smith’s Home-field, and if you will be ready tomorrow morning I will call for you, and we will go together, and get some for dinner.”
“Very well,” said the little pig, “I will be ready. What time do you mean to go?”
“Oh, at six o’clock.”
Well, the little pig got up at five, and got the turnips before the wolf came (which he did about six) and who said:
“Little Pig, are you ready?”
The little pig said: “Ready! I have been and come back again, and got a nice potful for dinner.”
The wolf felt very angry at this, but thought that he would be up to the little pig somehow or other, so he said:
“Little pig, I know where there is a nice apple-tree.”
“Where?” said the pig.
“Down at Merry-garden,” replied the wolf, “and if you will not deceive me I will come for you, at five o’clock tomorrow and get some apples.”
Well, the little pig bustled up the next morning at four o’clock, and went off for the apples, hoping to get back before the wolf came; but he had further to go, and had to climb the tree, so that just as he was coming down from it, he saw the wolf coming, which, as you may suppose, frightened him very much. When the wolf came up he said:
“Little pig, what! Are you here before me? Are they nice apples?”
“Yes, very,” said the little pig. “I will throw you down one.”
And he threw it so far, that, while the wolf was gone to pick it up, the little pig jumped down and ran home. The next day the wolf came again, and said to the little pig:
“Little pig, there is a fair at Shanklin this afternoon, will you go?”
“Oh yes,” said the pig, “I will go; what time shall you be ready?”
“At three,” said the wolf. So the little pig went off before the time as usual, and got to the fair, and bought a butter-churn, which he was going home with, when he saw the wolf coming. Then he could not tell what to do. So he got into the churn to hide, and by so doing turned it round, and it rolled down the hill with the pig in it, which frightened the wolf so much, that he ran home without going to the fair. He went to the little pig’s house, and told him how frightened he had been by a great round thing which came down the hill past him. Then the little pig said:
“Hah, I frightened you, then. I had been to the fair and bought a butter-churn, and when I saw you, I got into it, and rolled down the hill.”
Then the wolf was very angry indeed, and declared he would eat up the little pig, and that he would get down the chimney after him. When the little pig saw what he was about, he hung on the pot full of water, and made up a blazing fire, and, just as the wolf was coming down, took off the cover, and in fell the wolf; so the little pig put on the cover again in an instant, boiled him up, and ate him for supper, and lived happy ever afterwards.
Once upon a time when pigs spoke rhyme
And monkeys chewed tobacco,
And hens took snuff to make them tough,
And ducks went quack, quack, quack, O!


Oracle Vs Cassandra


 


Oracle Coherence is a pure in-memory cache which can be distributed across nodes. Depending on its configuration it can have strong consistency, or eventual consistency for inserts and updates. Coherence is object based - consistent data model. Since you buy Coherence from oracle - you can get commercial support, from oracle.
An Oracle database is a collection of data treated as a unit. The purpose of a database is to store and retrieve related information. A database server is the key to solving the problems of information management. In general, a server reliably manages a large amount of data in a multi- user environment so that many users can concurrently access the same data. All this is accomplished while delivering high performance. A database server also prevents unauthorized access and provides efficient solutions for failure recovery.
Oracle Database is the first database designed for enterprise grid computing, the most flexible and cost effective way to manage information and applications. Enterprise grid computing creates large pools of industry-standard, modular storage and servers. With this architecture, each new system can be rapidly provisioned from the pool of components. There is no need for peak workloads, because capacity can be easily added or reallocated from the resource pools as needed.
The database has logical structures and physical structures. Because the physical and logical structures are separate, the physical storage of data can be managed without affecting the access to logical storage structures.

Cassandra  is one of the hottest of the NoSQL databases.  From a production DBAs perspective it’s not hard to see why:  while some of the other NoSQLs offer more programming bells and whistles for the developer, Cassandra is built from the ground up for total and transparency redundancy and scalability, close to the heart of every DBA.
Image result for cassandra
However,  Cassandra involves some complex data modelling concepts – mainly around the notorious Super Column concept .
Cassandra is a big table data store that is distributed across nodes. No single point of failure. It uses some caching to improve performance before committing the data to disk in its implementation of bigTable. Cassandra requires some structure in its tuple (key/value/timestamp) but otherwise can support flexible data structures. 
Preferences should be determined by your use case. They are both pretty cool in their own right. 
The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Linear scalability and proven fault-tolerance on commodity hardware or cloud infrastructure make it the perfect platform for mission-critical data. Cassandra's support for replicating across multiple datacenters is best-in-class, providing lower latency for your users and the peace of mind of knowing that you can survive regional outages.
Cassandra's data model offers the convenience of column indexes with the performance of log-structured updates, strong support for denormalization and materialized views, and powerful built-in caching.