Sunday, July 5, 2009

The mystery of setNull unleashed!


I was recently developing a data migration module to transfer data from Database A to Database B using an intermediate Java stub. Most of the data in the source database had null values in them. The most logical option was to use
preparedStatement.setObject
(int parameterIndex, Object x)

which should ideally take care of any object reference that comes its way even a 'null'. But this didnt seem to work. The next option was to use
preparedStatement.setNull(int parameterIndex, int sqlType)

This would need an if-else block which is very costly for large number of tupples.
eg :
if(value == null) {
preparedStatement.setNull(index, OracleTypes.VARCHAR);
}else {
preparedStatement.setObject(index, value);
}

After many workarounds , i finally concluded that the version of ojdbc14.jar used on the server was incorrect .It was pointing to 9i version. After replacing the ojdbc14.jar , the application started working smoothly with setObject() function. After decompling some Oracle packages , the implementation of setObject on 9i seemed to be flawed. But thankfully it has been corrected in 10g version. This problem sure took up some bandwidth , but worth a learning!




Sunday, September 21, 2008


Finally the torch has been lit. I have been conceptualizing Project IDx for a long time now , finally after some meditation i decided to flag off the Pilot Initiative :) . Project IDx basically stands for Identity X. Project IDx is aimed at maintaining the user identity across the Web. Initiatives like OpenID and the Identity 2.0 acts as a cornerstone for IDx. The birth and need for IDx arises from the basic problems of maintaining Multiple Identities across the Web and organizations. IDx framework would help provide an extensible framework for maintaining different identities of a user across the web or can also be customized for organizations.

Await more posts in the coming days on Project IDx - The future of Web x.0! :)

P.S :Please bear with the logo , i tend to be dyslexic at creating neat caricatures!:)

Thought - Works!




(This blog is moved from my informal Word press blog , and it re-lives my experience of Barcamp Feb' 08 @ Thoughtworks Pune )

This was my first BarCamp ever. Around a week before BarCamp Prasad sent me an IP regarding the Barcamp to be held @ Pune. I was not clear on what the hell is BarCamp.We just had a mild clue of what it is going to be , like we can share our thoughts , attend seminars on different upcoming technologies(yawwwn!) . I asked myself why would i waste my precious saturday just traveling to Pune for a damn Tech Seminar. There were primarily 2 reasons for this.

1. During my college days i was bugged with the standards of the tech seminars and robotics competitions. The same old robots (tweaked with different colors and arms)would win every year. Tech seminars would be more of a hangout and chillout time for friends from different colleges.

2. For an IT Professional Saturday and Sunday is bliss. Work (Because i like what i do :) ) , and slog for many in the IT sector for 5 days of the week would leave us with hardly 1% energy to dare lift up our hands. This reminds me of the “Finally it is Friday” mails flooding my mailbox when the weekend comes closer :).

Then too there was something i.e Love for Technology which motivated me for getting out of bed @ 5 AM and catch the 1st train to Pune @ 6 30 AM.

Reaching Thoughtworks office in Yerwada made me nostalgic about my own stay in Pune Mastek which is a stone’s throw away from there. With some initial jitters i entered the Thoughtworks office.

I was in for a surprise.What i thought would be dry classroom type sessions , turned out to be an interactive , eye popping and fantabulous session.I had got my newly acquired possession Dell XPS 1530 with me , which turned out to be a boon of sorts with high speed Wi-Fi.

We started with the session on blender , which was great on how to create 3D Animation and conceptualizing the story board.Due to time constraint of half an hour we couldnt get through the nitty gritties , but we managed to understand how Animation companies like Pixar uses such softwares to create real life animation.

The next session was on Zimbra taken by Amit , it was by far themost impressive presentation of the lot. Zimbra is a open source mail recently acquired by Yahoo!.Though Amit started off with the overall features of Zimbra Vs other Mail sites , we geeks finally convinced him to get into the architectural details of Zimbra. Most of the concepts used in Mail servers like Journaling were quite impressive and messaging and security being my forte , i enjoyed it a lot. Being a security guy :) i asked Amit if Zimbra were planning to use OpenID (because Yahoo! had started using the openID concept in Yahoo! Mail just few days back), though he didn’t comment on it , but a few seconds later and a bit of research on Yahoo! initiatives helped me understand that Zimbra was indeed going to use openID!

The next session was on Web Services and its effect on Future Technologies. Finally something on which i can blabber for ever :). The presentation was taken up by a smart genteleman in his late thirties , the vision of this person regarding the future of Web Services and distributed computing was horizon less. No Buzzwords but pure vision. We helped in this discussion by sharing our ideas regarding SOA and distributed processing.Phew! Amazing , wait there was more in store.

We attended a session on Ruby by siddhu , but some minutes down the line we were hungry and down to hog in the Thoughtworks canteen , followed by an introspective chat :) in the beautifully crafted Panchsheel IT Park.

Post lunch was a bit sleepy , but followed by some overview on AJAX Frameworks and Web Security . One of the most impressive ones was left for the last , ZachExely, a correspondent for the Huffington Post, an adviser to the Off the Bus project and a founder and president of the New Organizing Institute. He is the guy who revolutionalized the whole political campaigning and funding for Barack Obama. He gave a statistical picture of the rise in popularity and funding after the introduction of campaigning through internet. His talk basically revolved around the advantages that Internet and Web 2.0 can provide in diverse fields , and some unimaginable fields like politics.

Then we had an informal meet with Ketan Padegaonkar and his work on Eclipse SWTBot. and we also got a chance to meet innumerable talented people having varied interests.

What was the most inspiring thing that i could got @ the Barcamp , was the Vision shared by all the Barcampers and the ability to forsee the future and the advantages we can reap out of them.Not one of them was prophesying any particular technology.

We need to rise up and mature above any Technology or platform. Technology just provides a helping hand for implementing any solution. Technology should not dictate any solution but it should be requirement centric.

Vision is the buzzword that would drive the world!

Computing in the Clouds


Cloud Computing! The initial reactions of the paparazzi would be “wow! what a jazzy jargon” . Let me clear the air here , it is an old wine sold in a funky name. Cloud Computing has been there for years now , fondly called with different names through generation of conceptualizers; Distributed Computing,Parallel Computing,Web Computing all map to Cloud Computing.

What on earth (oops skies! ) were these people thinking while giving such a name to an age old concept? Well the logic that goes behind this is the project aimed at reusing the computing capabilities of n number of machines instead of creating a supercomputer. Such a project was launched in May 1999 by University of California for Search for Extraterrestrial Intelligence(SETI) popularly known as SETI@home. SETI@home initiated the use of unused clock cycles among millions of users across the world. Thus the work that a supercomputer situated in a room in Berkley could do , was distributed across the globe.This gave the desktop users a chance to donate some clock cycles for research purposes.(A charity cause for all those IT Employees who dont shut down, rather lock their desktops after office hours). So the search for ETI in the skies led to naming the project as SETI@home.

Many such projects joined the league like Folding@home,Rosetta@home aimed at finding the cure to life threatening diseases , by just causing users to donate some clock cycles.Einsten@home is an other project aimed at studying the gravitational waves from pulsars using FFT.FFT operation requires TeraFLOPS of processing power , hence the focus shifted again on “Cloud”.

SETI@home used SETI@home classic s/w initially for sharing the clock cycles, this was replaced by BOINC(Berkeley Open Infrastructure for Network Computing ) as the middleware platform providing platform independent services for all the volunteer computing systems like the ones mentioned above.

Many people perceive that Cloud Computing takes us back to the “Thin Client” era, similar to that Mainframes did decades back . Google and Microsoft have joined hands for the Blue Cloud project aimed at providing an enterprise Cloud infrastructure.

Team of Mr. Gates and Steve Balmer is not far away , Microsoft has also embraced the Web 2.0 initiative towards Cloud Computing. If ever “anti-desktop” initiators like Google and “desktop-loving” Microsoft join synergies to create a “Cloud Computing” Infrastructure , this would lead to “Hybrid Software Delivery Model“, which would be a breath of fresh air for the Web world.

But Cloud Computing is not with its share of bottlenecks. Considering Cloud Computing to be a reality and to actually process or fetch file from a remote machine in realtime would require the network and Internet Infrastructure to be fast and robust as ever. Cloud Computing focuses more on distributing the tasks to various machines so the process management should also be efficient. With the current monopoly of the ISP’s on the Internet world providing very low Quality Connectivity and speeds , with constant disruptions in web traffic; Cloud Computing to become a reality atleast in India will take time.

“Cloud Computing” initiatives and projects are majorly thriving on Universities and “research oriented” companies like Google/IBM.Its time that techies and IT giants join the league to create a cloud infrastructure.Cause the future is in the “Clouds”!!

Saturday, September 20, 2008

Is your system secure?

The need to secure the system from the attackers seems to be the need of the hour.The attacker can be an outsider and not surprisingly could also be an insider.The most glaring and unintentional mistake that most designers and analysts perform while designing systems is securing the system from external attacks but leaving the system prone to internal malicious attacks.Such attacks can lead to unclaimed losses adding to the woes of the management.

The internal attacks can be classified into two types

One initiated by the insider of the system , who has wired the system together.This attack may be motivated due to some emotional injury caused due to ego clashes in the organization ,and an attack on the system would be the single most motive of such an employee.

The other type of attack is performed by a person inside the organization who has complete unrestrained access to the system , but such attacks are initiated by outsiders who use the insiders to crash the system or fetch vital information having significant market value.

A different shade of an internal attack may be initiated by the outsider by gaining illegal access to the system by using the vulnerabilities of the system to their boon.A general fallacy is of treating such attacks as external attacks, as it is initiated by an external agent and the agent uses the entry point or the gate of the system to gain access into the system.Though the vulnerability at the external layer helps the agent enter the system , such vulnerabilities are generally the ones which cannot be rectified; which is also known to the architects but unfortunately also to the attackers.So an internal WBC artillery mechanism should be designed for such systems in which external entry points cannot be sealed.

A secure system is not a system which is only secure from external attacks but also from unmitigated internal attacks.Securing the system against such attacks can save the system and the management a fortune.

The future of Web 2.0?





The next generation of Web is here.Most of them like to call it as Web 2.0 , some feel that that Web 2.0 is just an abstraction and enhancement over the previous so called Web 1.0.They would like to vehemently like to voice their opinion of tagging the Web just to milk out some opportunity and generate a hype for the companies delivering the Web 2.0 products.Though i would not like to take a stand and jump into the wagon of either camps , i believe that until there is a radical shift in the technological crux of the Web , it should not be titled as Web 2.0.

The main base ideology of internet was to be able to connect two computers and that of the Web was to be atleast potent to share data across the systems so as to maintain transperancy of data sources.This idea has been scaled gazzalions of times to what we call the World Wide Web now.Then alma mater of the titles remains the same.Many seem to visonize the rise of Web 3.0 , which would bring the computing from the Web to our local desktops.To computing power of the PCs which was for very long underestimated with the advent of high end servers , has now seen the light of the day.

The next generation of Web truly lies in sharing , which by far Web 2.0 has put into good effect.This would be greatly burgeoned with the use of P2P clients which till now lies in a clandestine existence. The P2P sharing is confined to the backdoors of college going kids , who have cherished the P2P to download and share music , movies and software parnaphelia.The next generation of web needs to foray this unventured ground and unleash the hidden potential of the sharing.As knowledge multiplies by sharing , so does the Web.So come on , start sharing !

What an Idea!

"What an Idea Sirjee!".Thats what the yeoman sycophantly seems to utter Junior B in the AD currently being aired across the Cathode Rays and LCD's across the nation.The slogan prognosticates to be germinal.And sometimes such ideas takes shape in grandiose levels.

Building and architechting a dream structure like Airbus A380 requires a shrewd vision and relentless effort.The vision to create the world's biggest passenger airliner that would carry close to 1000 passengers and all the luggage and still extert less pressure on the runway as compared to a loaded 747.The cost per person is reduced 20% less as compared to a commercial flight.

Similarly building and architechting a mammoth IT system would require the same pragmatic vision and effort.Most of the dreams tend to be quixotic in the embryonic stage , but as time moves on the baby thrives and breathes the potion of life.

Realizing the dream is just not enough , to handle the number of requests is even more important. Creating the first prototype is just not enough , catering and delivering the orders of the clients on time is of prime importance.All the major airlines still waiting for the first bunch of beauties to arrive.This delay would cost the clients billions of $s.A similar delay in catering to the SLAs of the system would mean a loss of valuable moolah and most importantly the invaluable patron base.The profit margins can always be regained but a customer lost is very hard to wheedle back.

Testing the A380 required it to pass through a rigorous suite of tests , like testing the tensile strength of the aircraft structure at 0.9 Mach.Similarly large IT systems are passes through a massive set of test suites , reveals the real character of the system.The system which passes through all these tests is declared fit to be inducted to be pressed into the clients service.

The metaphor between the A380 and an IT Infrastructure provides us a with a paradigm which would provide a roadmap for next generation systems or more importantly next-gen ideas!