Wednesday, May 27, 2015

Is it 'NoSQL' or 'Not Only SQL' ?


It was a compelling realization to answer myself what NoSQL is. While attending a training session on 'Cassandra Performance Tuning', there was a mention that Cassandra was a NoSQL database. Even with a good experience on NoSQL databases like MongoDB (document), Neo4J (graph) and InfluxDB (time series), I never gave a serious thought on NoSQL concept. With CQL (just like SQL), Cassandra is just like any SQL (relational) database. That made me think what really NoSQL is.

On a serious reflection, we can find that it is never No SQL, but Not only SQL. But, with a detailed consideration, it is not at all about SQL. It's about data modeling and more of data principle. The normal SQL (relational) database has a tabular data modeling to accomplish ACID and JOIN with normalization. Moreover, due to the tabular data modeling, the structured query language can filter columns in a table. On the contrary, NoSQL database is distributed implementation, mostly compromising consistency in CAP theorem and sacrificing ACID. The main difference I noticed is that the NoSQL query filters only rows (not columns) in the big data. That's why generally people make the distinction between relational and non-relational databases (not SQL and NoSQL). However, there are some non-relational databases that support ACID and JOIN, called NewSQL databases.

There are many implementations of the NoSQL (non-relational) databases in terms of their data modeling. As each of them has their own use cases and a detailed analysis on them are not in our scope, few examples for the sake of it are Column (Cassandra), Document (MongoDB), Key-Value (CouchDB), Graph (Neo4J) and Multi-model (OrientDB).

In a nutshell, it's not about the query language being used, how databases are categorized, but about the modeling. When you have non-relational database with ACID, it's called NewSQL and otherwise NoSQL. In relational data modeling, the data storage is a black-box to the user, concealing the interns of the structure, giving an interface of a structured query language. On the other hand, non-relational (NoSQL or NewSQL) database exposes the data structure to the user, providing flexibility of interface and scaling. Beware! Freedom always comes with a price. The developers (users) are given power with more responsibility (need of knowing interns) and long learning curve!

Friday, May 1, 2015

AngularJS & SemanticUI: Made for Each Other

It’s just couple of years back that I started working on AngularJS, putting aside my JSF and Primefaces reluctantly. As everyone, I had no other choice, but used Brootstrap as CSS framework and thought that was how HTML theme worked. That was true with the pages in static nature. However, the exploration of client-side frameworks and responsive sites with hand-held devices, I was forced to explore for alternatives. It was an eye-opening way of theming a JavaScript-powered web page with relatively new and vibrant framework called SemanticUI. With my peripheral and horizontal technology stack and experience, I’m not an expert to write this blog. However, it’s an outpouring of my wow experience with AngularJS and SemanticUI.

It is needless to say AngularJS has an edge over competitors. When I switched from ExtJS to AngularJS, I began to marvel at the modularity and flexibility. The simplicity lies in making static HTML tags dynamic. The ‘Model-View-Whatever’ framework model allows to separate presentation logic from business logic. I love the directives and two-way-binding of it. Since the discussion on the pros and cons of AngularJS is not in the scope of this write-up, any kind of analysis on the use cases of AngularJS is left totally up to the reader. However, the simplicity and flexibility of AngularJS (not prescribing a specific application architecture or set of patterns) leads to the confusion of selecting the library of user interface components. This is where I can help you.

Are you in a dilemma of what CSS framework to use with AngularJS? Try SemanticUI, simply because both of them share the same philosophy. SemanticUI is literally semantic. It treats words and classes as exchangeable concepts. Classes use syntax from natural languages like noun/modifier relationships, word order, and plurality to link concepts intuitively. It makes dynamic styling. When it joins hands with AngularJS’ two-way-binding, it’s marvelous. Intuitive Javascript is another aspect that makes it closer to AngularJS. It uses simple phrases called behaviors that trigger functionality. Any arbitrary decision in a component is included as a setting that AngularJS binding can modify dynamically. Another feature that makes it stand out from the competitors is its simplified debugging property. Performance logging lets us track down bottlenecks without digging through stack traces.

The write-up neither compares and analyzes all competitors, nor claims to be a comprehensive answer to the question. Nevertheless, it’s just an attempt to subjectively echo how AngularJS with SemanticUI eases the web developer life. As I don’t want make it drier with code snippets and use cases, let me conclude underlining the point that both AngularJS and SemanticUI share the same philosophy and complement each other. SemanticUI needs not be the best theme framework, but it’s the better half of AngularJS. May be coincidental, but true – they are made for each other!

Tuesday, January 28, 2014

1/28 – A story of pizza turning into banana fry.

It was a usual lazy evening, listening to the Indian political debate in the News Hour, while scanning through the new project documents with a scratching head. The white carpet of Chicago winter had swallowed our horizon, giving a pleasantly itching feeling. It was Siva’s (the body builder and muscleman of our room) brisk steps and screaming that made me conscious of the stinky smell and the eye-watering smoke around me. In fact, it was a shocking realization that not only I was unaware of what happened around me with all my five senses open and apparently working, but also the hard work of a small pizza and micro oven for 12 minutes could make our room a chimney of cashew nut factory. We were literally lost and dumbfounded for sometimes.

By the time I learnt that he had placed a pizza in micro oven for 15 minutes with a watering tongue for the usual late lunch (at 5’o clock in the evening) and at the 12th minute itself the kitchen and hall were totally smoked from the oven, as if the Kochi corporation smokes for mosquitos, the situation was unbearable.  Luckily or unluckily, the smoke detectors neither in the hallway nor in the rooms uttered a word or even cared to acknowledge the presence of such a suffocating smoke. And we call them smoke detectors! Nevertheless, I would not blame them for such an irresponsibility, mainly because it was not something new to them. They are used to it, more precisely fed up with it. And that was when I got reminded of the burned banana which I had seethed for hours in the same morning and found next to the micro oven, as the proof of my cookery expertise.

The dark had fallen early, sending the sun to India where my family and friends must have animated for a new day without knowing the agonizing feeling I was going through. The very reflexive action I could do was opening the hallway casement window to let the smell and smoke flow out, without caring the chilly cold that made me nearly freeze to death. Please note that this was the week of the lowest known temperature in Chicago with a warning of record 60 degrees below zero. Had Sujith (my other roommate) been back from office, he would have given the mathematics of Fahrenheit and Celsius, which I never understood and hopefully never will. And for the first time in my life, I understood the phrase ‘between the devil and the deep blue sea’; I was between the stinky smoke and the freezing wind chill. Not only we were freezing, but the hallway was stuffed with the putrid smoke as well.

We were running here and there, probably to warm ourselves or ponder for a solution. It might be to cover up the anxiety as well. While floating over the smoke and chill, we were exchanging many an idea, but nothing got registered into our minds or was convincing. Finally, my logic and school physics came for rescue. I had the biggest discovery of my life that made the rest of the day horrible. I found the air flow in our hallway at stagnation, in lieu of casement window being open, attributable to which we were freezing.  A logical conclusion was keeping the opposite door open to the corridor and I didn’t even think to do so. Eventually, the smoke decided to hesitantly quit the arena. There must have been a feeling of relief or victory in my face, when I leaned back to my office cushion chair and started concentrating on the debate moderated by Arnab Goswami.

It was an ear-tearing alarm that made me hop from the chair. We flew into the corridor to find the source of the panic sound. Barrington Lakes apartments has a peculiar, stereotyped and enclosed corridor that has all the doors of the two-rowed rooms opening into in a three-storied building. There was a strange sight that no one in the apartment would have ever watched before. The windy chill had stuffed all the smoke into the enclosed corridor, giving a heavenly experience where we look at many a thing but see nothing; we smell a lot but feel nothing. Finally, I managed to fix my eyes and ears into a big red bell that reminded me of my old golden college days when I used to await for similar ring either sitting on the bench inside the classroom or standing outside of it. I had been here in this apartment for more than three years and that was the moment when I noticed the existence of that big red bell.

Through the heavenly fog in the corridor, I saw many human forms floating around. No sooner I heard the human beings in the fog screaming as well. I grubbed my eyes to find the fact of the vision and was astonished to know that the residents of the building were screaming and evacuating; some with jackets and others didn’t even care for the killing cold outside. The big red bell in the corridor was ringing louder and louder.
We smelt a rat. Something was going terribly wrong. We ran into kitchen. Siva put the burned plate and pizza (in fact a charcoal of pizza) into the garbage box. I wondered his presence of mind for a moment. Somehow I knew somebody would come from leasing office and they would arrange for not only smoke remover but for a garbage collector to clean our kitchen. Spontaneously I started cleaning the kitchen and for my wonder I did it with seconds. I scanned the kitchen and the hall. Nothing was in place. Chappals were scattered. Amazon boxes were spread across. The floor was littered. Tables were topped with untidy objects. The people in the TV were still debating about international cases. I remembered that the debate was all about Devayani’s strip-off search case. I could concentrate on nothing, as the bell went on ringing louder and louder.

Manu and Hari (colleagues staying next door) came running. I realized another naked truth that everybody could recognize the source of the smoke. We were gone, I thought. I couldn’t but laugh when Hari explained how the dancing old lady was running out and commenting that they never knew…, when asked of the reason. Again I went to the corridor to see if people were still evacuating. All of the sudden, an idea ringed a bell. I ran to the door of the corridor and kept it open. Then I realized that people from top floors had also started stepping down. I tried to explain to most of them, telling it was just a kitchen smoke, though few were not convinced. The bell was ringing and ringing. I peeped in and through it. There was nothing to cease it. I just flashed about the smoke detector in our hallway and the famous dialogue by Soman (Malayalam actor in the movie Hitler), “Had she just cried loudly…”. Then came Akhil (another colleague staying next door) and narrated the story of how people were evacuating and I shouldn’t have discouraged people from their right of being safe.

I stood in the corridor with blank mind but heavy heart. The fog started fading. Standing on the rear end of the corridor, I saw somebody approaching from the front door through the fading smoke. The closer the figure came, the more trembled I became. Bluish black shirt and pants. A yellow emblem in the shoulder and white symbol on the chest. A black cap with white badge. Blacker belt with visible holster and gun. It was the same figure that always came to my mind whenever I drove over-speeded or didn’t pause in the stop signals. Yes, it was a policeman. He was stern in his target. He just entered our room. With trembling legs, I followed. I still wonder how I did manage to make him understand that nothing is serious, with my broken English. No fire… Just a smoke from oven… He was not to simply buy my words. He searched in and out of kitchen with right hand on the gun holster. He was verifying again and again whether it was from the small oven. I was not at all dare to reveal the truth of pizza. The final number I could put forth was that the smoke was created by the burned banana that laid next to the micro oven. It looked far better to show the burned banana than the charcoal of pizza. And for the first time, I felt proud of my cookery fault. Even though I was not sure, I did convince him. Eventually, he was calm and whispering over the walkie-talkie, convincing somebody on the other end. Ultimately, when the gentleman asked us to be safe and stopped the ear-tearing alarm in the corridor, I sank into the chair and sighed with relief.

All of the sudden, two people emerged from the dark on the left side casement window, pushing it wide open, with axes and gas cylinders in hands. For a moment, it was breath stopping. They were two fire engine equipped personnel with greenish costume. They also jumped into kitchen with some fire detector and scanned completely. I was still in the shock of seeing two aliens. They also made an exit after a thorough checkup and conviction. And it was when Randheer, Sujith and Jibin (colleagues and roommate) returned from the office, I and Siva realized the whole building had been surrounded by policemen and fire engine personnel. While all of us were cracking the jokes on the mannerism of people evacuating and the fine that would be levied for this, in mind I was saluting the gentlemen who flew into the spot within five minutes. When I started hearing the debate again, I again sunk into a deep indignity about the proud India we speak of. What would have happened in the same situation there? It may be because of the over population and lack of respect for lives. Or due to the inefficiency of the equipment and personnel. Or even owing to people like me…

At some point of our discussion, we started talking about the fine to be levied for this whole trauma we (probably I) created. We made all the people evacuate. We made policemen and fire engine personnel fly all the way. Though I had also joined the party, guessing a fine of $500, in fact I was expecting nil charge in mind. Finally, Randheer came with an idea that we could call and confirm with Suresh (Randheer’s manager) of the charge. We did. It was a fuel to the flame. He confirmed that we would be charged from $350 onwards, based on the distance the policemen and fire engine personnel traveled. For a moment, I realized the need of police and fire stations next to our house. At night, the whole incident was reeling in the realm of my mind like an eventful dream. The entire night, something was pecking my heart with its heavy beak. It was not the lost feeling of the hefty fine or the dreadful memory of the unexpected evening. I think it was the harmless lie I made to a gentleman where the charcoal of pizza turned into the burned banana fry!

Wednesday, December 5, 2012

View point matters!

It's better to remember that our philosophies are different, than to argue who's right!

Thursday, January 17, 2008

A she…

A rain was she,
Chill and pouring into.

A rose was she,
Red and smiling upon.

A dream was she,
Soft and cherishing for.

A drop was she,
Elixir and cooling in.

Now, a storm is she,
Married and carrying by.

Sunday, June 17, 2007

Is Begging A Crime?

The history of the cold war between the haves and have-nots is as old as that of humankind. Even God is apparently helpless in this regard. Money has become anything and everything. In her famous novel Atlas Shrugged, the Russian born American novelist Ayn Rand articulates, “…Money is not the tool of the moochers, who claim your product by tears, or of the looters, who take it from you by force…” And she goes on accentuating that money is the reward of one’s effort and is good in itself. Even though she, being deeply influenced by the objectivism of her time, was not very much aware of the magnetic power of money to generate ‘passive money’ (money that needs no efforts) in the second level of abstraction resulting exploitation of the weaker, she rightly comments on the moochers or beggars. As you know, begging has become an exceedingly common seen in this silicon city. What is the feeling that haunts you at such a sight…?

Begging is an act of pleading for livelihood. In the superficial sphere of thought, it is merely beseeching for economical assistance. To put it radically, it is a cry of have-nots to haves. Nevertheless, on the other hand, it implies a physiological and psychological surrender as well. Begging entails the inability of both physique and psyche. If I beg somebody for my living, it means that I am physically unable to feed myself and at the same time I am weedier than the person being begged. Thus it becomes, in its good sense, humiliating myself. In the final analysis, the act of begging is accepting one’s weakness, understanding his effortlessness and seeking others’ help.

Let’s have a glance around us. We could find two types of people almost everywhere. Some try to hide their disabilities and to toil for life, whereas others try to express their disabilities and to get sympathy and help. Of course, we cannot but consider few genuine cases. Yet, in the busy roads of the cities, you can come across a lot of frauds, if you pay due time for it. Unfortunately, Bangalore is cursed with a great number of them. You can find beggars who beat themselves and kids with them, up to extend of bleeding to get sympathized and get alms. This is not only an act of cruelty, but of cheating others as well. It is cheating mainly because such people are potentially able to work for themselves, but actually they don’t do so and pretend to be unable. Recently, an email was being circulated stating few eye-opening facts and photos of the so-called beggars. It was explaining the stories of five people whose jobs were begging. The daily earnings of one guy named Bharat Jain (45) were around 2000 to 2500 with an asset of 70 lakhs (property alone). One Haji (26) has an interesting reply when asked for leaving the ‘profession’ of begging and taking up his family sari business. It goes like, “Managing the zari workshop is too much of hard work. I can't be bothered with all that. I like to be left alone. Also, I make a decent amount every day”.

If money is the reward of my effort and I am devoid of money, it simply means that I put up no efforts. And if I ask for others’ effort without doing of myself, it is a sin of both commission and omission. As we go analyzing the root cause of this phenomenon, we may realize that it is an aftermath of a ‘begging’ philosophy and culture we accumulated through ages. Motionlessness has become our vital principle and action is sin. Our morality is developed in such a way that begging alms is as divine as giving alms. We are good at stretching our arms out and sympathizing at them. When are we going to stop begging and sympathizing?

It would, of course, be a great lapse from my part, if I don’t bring your attention towards the genuine beggars. There are people who really need help. The disabled are to be given due consideration, while the frauds are to be brought to the light. The ways to root out this phenomenon are the subject of research and retreat. Here comes the role of government only who can do something in this matter. Whether rehabilitating the disabled to a safe place by raising funds or anything of that sort would be the concern and action plan of the government. It could possibly conduct awareness programmes to cultivate a sense of self-respect and self-dependency.

All the constitutions of the world, whether written or conventional, promulgate that looting is crime. It is a sin of commission, as it causes loss to the victim. Nonetheless, no law instructs that mooching is a crime, though it is a sin of commission and omission, causing humiliation to the beggar and loss of effort to the giver. Reasoning that begging is a crime, it is not a negligence of the disabled, but an acknowledgement of the careful carelessness of the government. Encouraging and helping the same is equally sinful, as it disgraces the other. Blindly but truly speaking, the act of begging and the act of helping it are crimes. Punishable!

Friday, August 19, 2005

പ്രേമം

പ്രേമമേ,
നിന്നെ എന്തെന്ന് വിളിക്കാന്‍?
പ്രസവ വേദന
ഒരു വേദനയാണെങ്കില്‍
വേദനയെന്നു വിളിക്കാം.
നെല്ലിക്കയ്ക്ക്
വെറും കയ്പ്പാനുള്ളതെങ്കില്‍
കയ്പ്പെന്നു വിളിക്കാം.
പക്ഷെ...
അതെനിക്കെന്നും ഉപ്പാണ്,
കണ്ണുനീരിലെ ഉപ്പ്.
വര്‍ണ്ണക്കൂട്ടാണ്,
സ്വപ്നങ്ങളില്‍ കണ്ട മാരിവില്ലാണ്.
മിന്നിത്തിളങ്ങുന്ന
പളുങ്കാണ്,
പൊട്ടിച്ചിതറിയ പളുങ്ക്.
മൈലുകള്‍ കടന്ന
കൈക്കുമ്പിളിലെ
ദാഹ ജലമാണ്...
ആരോ കണ്ടുമറന്ന കിനാവാണ്.
അന്ധന്‍റെ കൈയിലെ
റോസാപ്പൂവാണ്.
അതെ,
നീ
സുഖമുള്ള ഒരു വേദനയാണ്...

ഇന്ന്

ഇന്നലെ യെ കുറിച്ച് വ്യാകുലപ്പെടുന്ന നാളെ യാണ് നമ്മുടെ ഇന്ന്!