Monday, August 27, 2007

Coherence is suspiciously easy to use

Do you need fine grained control over your Cache? Do you need advanced cache management? Do you need cache partitions? Then Tangosol Coherence is for you. The cache objects must be Serializable or Externalizable. Because of the high performance, Oracle recommends to use ExternalizableLite instead. So here you go:

#The SClass to cache
public class SClass implements ExternalizableLite {
private String a;
public SClass () {
public void setA (String a) {
this.a = a;
public String getA () {
return a;
public String toString () {
return a;

public void readExternal (DataInput dataInput) throws IOException {
a = dataInput.readUTF ();

public void writeExternal (DataOutput dataOutput) throws IOException {
dataOutput.writeUTF (a);

# Now how to use it?
public class CacheClient {

private NamedCache nCache;

public CacheClient () {
nCache = CacheFactory.getCache ("Name");

public static void main (String[] args) {
CacheClient cacheClient = new CacheClient ();

// -- Put the Object in Cache
SClass sC = new SClass ();
sC.setA ("Srivastava");
cacheClient.putValue ("a", sC);

// -- Now retrieve it
System.out.println ("Entered: " + cacheClient.getValue ("a"));

private void putValue (String k, Object v) {
nCache.put (k, v);

private String getValue (String k) {
Object obj = nCache.get (k);
// -- Assuming the Object was added in the Cache and not expired
// -- More details on Object expiration later.
return obj.toString ();

Thats it! And you get a high performing Caching infrastructure.

Saturday, August 25, 2007

How about Java Microsystems?

SUNW is changing to JAVA starting this September. According to Jonathan people know Java more than Sun. He is right. I met a few people in the Industry who said Sun? What do they do? I am not an admirer of those folks but they do exist. But the question is, Is Sun left with only Java to identify itself with? Is this an indication of Solaris losing to Linux? How about their hardware business? Why did they buy the Storage? Its confusing as Java is not well integrated with them all yet. Even though I agree with this move, but with no leading Java products, I am afraid if the shop called Antique be selling the scrapes.

Friday, August 24, 2007

Zen Vision not found in Explorer?

I had to reinstall my XP and found my Zen Vision M was not recognized to be connected in the creative source explorer. Even though the USB was working. Here is the solution: Go to the Control Panel and double click on the System. Click the Hardward tab and click on the Device manager. Probably the player is either listed under Unknown or some place mismatched. Right click on it and go to its properties. In the details, select the Hardware Ids. Note the first line and find the number (strip all the characters and symbols). Open the Windows registry (Run regedit). Go to HKEY_LOCAL_MACHINE -> SYSTEM -> CurrentControlSet -> UsbFlags and delete the key(s) matching that number. Connect the device again and look at the device manager. If you see the device under the Portable Devices with an yellow exclamation mark, double click it and select to reinstall the driver. That should fix it.

Monday, August 20, 2007

CPI - The biggest shame in Indian Politics

The communist party of India and its other isotopes are opposing the Indo-US nuclear deal. They are threatening to pull the support from the Congress government. I am no supporter of Congress either but here are my thoughts on CPI-X. They have done nothing constructive for India in last 60 years and before. They are still battling if after the downfall of USSR and Chinese quasi-capitalism, "Communism" remains a viable philosophy . They have destroyed the city of Calcutta, once the lead metro of the country. They have encouraged illegal migration from Bangladesh by not taking any strict actions. Its party workers resort to violence in the name of civil rights. I have to give one thing to them though: When the communists have failed all over, they have spread their wings in India through coalition politics.
So why are they opposing the nuclear deal? Is it them or their philosophical masters who did not like the word "US" in it? Do they seriously oppose the deal or opportunity has given them a chance to play the support card? Whats the clause they did not like? That India has to give back the technology if they do another nuclear test? An estimate say that India already possesses 100+ nuclear bombs in its arsenal. How many more do you need as a deterrent? There is no stopping the laboratory tests or improving it or even making many more, or even physical tests for that matter. There will be a cost India has to pay if they decide to go though. If guys remember, Scientists had said India had enough test data after the 1998 blasts that they could use it to improve the design and delivery systems. The only unwritten adage is a possible arm twisting of the Indian Foreign Policy. The country should be politically matured to deal with it. That twisting goes between US and Russia and US and China all the time. Then why should India show its political immaturity? Do you need bombs to eat or energy and growth for your people? Ah! the growth of People which CPI has never cared about.

Tuesday, August 14, 2007

Found an admirer of this name

I have been having trouble with my Dell laptop for past couple of weeks and had been in touch with the Dell support. Today I called them again and here what I hear:

Support: Hello My name is Rachel, how can I help you?
Me: Yes, this is Ashish.. <interruption>
Support: Oh I know you
Me (Thinking): Huh?
Support: You remember last week I talked to you.
Me: Aa..Oh yeah (I partially lied - I remembered something)
Support: <Elated>Yeah I named my Video game character Ashish.
<Repeats> Ashish.. Shish.. Ashish
Me (Thinking again):Hope the character was not a cartoon
The rest of the conversation continues...

What was the chances of this happening?

Happy Independence Day India

India is celebrating its' 60th Independence day from the British Raj. It has come a long way in relatively a very short time. The world is going ga-ga about its 8-9% growth. It has proved itself to be politically stable and reliable nation. The context of India-Pakistan has now changed to India-China. Without any major experimentation the democracy has so far proved to be an ideal system for its' secular citizens. But where are we really? What does this growth mean to us? Yes, today pretty much all the International names are on Delhi's and Mumbai's streets. Finding latest cell phone models is easier in the corner shops than on Cingular's US website. The Air travel has become more prevalent. The school kids use more American slangs than I even bothered to know. The government knows that using Nuclear technology to produce energy is more important than making bombs. The land prices have doubled. Delhi feels more closer than ever. But what about the poor? The illiteracy rate is still bad. Clean water and sanitation services are still not available to everyone. The rich have become richer but the life of average, sub-average and poor has not improved much. The life of middle and lower middle class has been squeezed between materialistic aspirations and the corrupt realities. Even though the realizations are harder but the dreams are more, and I guess thats one positive thing which came out of it. Still a long way to go but the country is definitely on the right track. Hope its' growth permeates to the general masses. Happy Independence Day India.

Monday, August 13, 2007

Dravid spoils Kumble's century

...Or so I believe. Dravid could have enforced a follow-on on England and hoped to save three quarters of the 5th day to fend-off the English bowling either in a Victory or a valiant draw. But he didn't. I am quoting myself off of a comment I posted on Pri's blogs: "Dravid being a visionary saw an English victory, on defense he saved the Test very methodically. He got on to back foot and drove the result to the long off draw".

Sunday, August 12, 2007

Wednesday, August 08, 2007

Obama - Sincerity in being wrong

With every debate, my respect for Obama has been increasing. Hillary keeps on proving her opportunistic astuteness. This time on what should US do if they sight Bin-Laden in Pakistan and Musharraf refuses to act? Simple question. Yes Musharraf is standing strong and we need to support him, but should he be the only hope? For US, Is Musharraf an ally or is Pakistan? And what did Hillary say? "Don't say it out loud even if you meant it". What kind of openness is that? How does killing a global terrorist a breach of country's sovereignty? If He is sighted in London's waters and Mr. Brown fails to act, wouldn't US go and do this job alone? Didn't US forces kill Natzis in France? Was that a breach of French sovereignty? Aren't we at war together? Then whats wrong in what Obama said even if its politically wrong? Are we sleeping?

Friday, August 03, 2007

Obama - A Nehru In America

I wanted to title this blog "Obama - A Gandhi in America" but as I finished reading his book "Audacity of Hope" I realized he is more close to Nehruvian views than Gandhi's resolve. All the 362 pages of his book I felt as if I was reading about India, its struggles and its problems. And if Americans, you don't think he is fit for being your next President then please allow me to borrow him for five years for India. I wish if the job of Presidents can be reverse-outsourced. I watched the last Democratic debate and how Clinton supporters have been over joyous to prove naivety of Barack. I want to complete the sentence which Obama did not say - "I am not averse to talk to the leaders of Iran, Cuba, Syria and N. Korea in my first year of the Presidency, not because of the weakness but because the citizens of these countries can not and should not wait that long anymore". A tree full of fruits usually lean towards the ground.
Anyhow, why Nehru and not Gandhi?
Gandhi never cared about a position in a political system. His playground was social justice which reverberated into India's political freedom. Obama's social cause is not entirely free from his political ambitions. He has Nehru's political astuteness, clean but dreamy.
My disagreements
I did not agree to everything he has put in his book. First, I got confused of what the Senator calls to being an American? He compared the Asians and East European employees working in Google with the employees of Maytag's manufacturing unit. I don't see why they both can't be called Americans? I do see his pain of this imbalance but I don't see why he can't be proud of those Asian or East European Americans working in Google. Also, Its not the China beating America, but the Chinese Americans getting ahead in the Black and White America. The second he tend to criticize the "Non-Aligned Movement" of 1950's. We lest not forget that it was the crazy ambitions of two super-powers which held the entire world hostage. When the countries were asked to be either with us or them, it took a lot of courage and belief to take the middle path - A non-aligned position. The third, his generalization of poor professional ethics of African Americans. My experience has been far different. Whoever I have worked with so far had tremendous work ethics. I am sure he has seen many more.
So who is Obama?
He is one person who is genuinely serious about solving the problems as they exist. He is not shy of admitting the struggle with some of his ideas but you can't deny he does think about them. His views of the current socio-political situation comes directly as he has seen through his own experiences and his own eyes. He is as passionate about his work as he finds his calm retreat with his family. He is a devout Christian but not blind to not see goodness in other religions including Islam or Judaism. His foreign policy is based on trust and not military influence. He wants to spread America not in the numbers of Marine corps stationed but with the core American values of freedom and equality. He is young and has dreams.
Whats Next?
I don't know if he will be the next President of United States of America. But, he does have a loooong political career ahead of him. He is running for the highest office when his political career has just started. It will take him a long way. I will be happy if he wins but won't be sad if he does not. He has already scored a point and touched so many hearts. He does look like Gandhi but has grass root growth of Nehru's vision. Either way, he is a good man and every American should be proud of the fact.

Wednesday, August 01, 2007

Why I love watching Seagal's movies?

...Because they come closest to a song-less Bollywood Movie. Be it Above the law, Hard to Kill, Out for Justice, Under Seige, On deadly ground, Glimmer man or the Fire down below, all good "throw your brain out" movies. Thanks AMC for throwing one every day.