aws

Wednesday, October 1, 2008

Civilian qualities - hard to swallow but truth

Mobile phones
It was a bright Saturday morning around 8 am, Shinkansen - bullet train started from Shinagawa station to Mishima, 4 stations before Mount Fuji, the symbol of Japan. Shinkansen is full, as usual we are travelling on Unreserved compartment, no place to sit, most of us are standing, no mobile phone rings with latest hit song tunes, no louder laughs, no fellow passenger is talking in a louder voice, yet most of the passengers are having mobile on their hands sending SMS or playing games on it, all the mobiles are in silent mode, its a wonder. Some of the passengers are working on their Vaio (Laptop), some of the passengers are chatting, smiling to each other but there is no disturbance to the fellow passengers.
On each compartment there are four priority seats meant for physically challenged passengers, carrying mothers, mothers accompanying small children and for elderly passengers, near the priority seats the mobile phones must be in silent mode, passengers by themselves refrain from talking on their mobiles inside the train. Not a single passenger is talking on his mobile inside the train. Its unbelievable.

How to drive a Car on the road?
Usually human beings has to wait on the side of the road to allow the speeding car to pass by.
But here the opposite is happening, the car is waiting on the side of the Zebra crossing until the human beings cross the road. Then i realized the driver of the car is a human being, values human more than his car or his own ego.


Filth of pets.
Pets are most common among Japanese, especially Dog, may be because the reverse of DOG is GOD, the God we worship ;) Usually the owners of the Dog take it for a morning walk, the owner will have a carry back with him with some old papers, tissue papers, i wondered why every person walking with the Dog has a carry bag with some papers. It is for collecting the excreta of the Dog. We usually take out our Pets for leaving its excreta on the Streets, but here it is different. Nowhere we can find the excreta of the Pets or Humans on the streets.


Notice board on a Government Apartment.
Neighbourhood of mine use to talk in a louder voice, not only during daytime but on late nights to his parents on India. He was talking inside his room with all the doors closed, on that day there was a inspection from the Apartment management, they noticed the noise coming out of his room, the very next day they put noise attention on the notice board. Please have a look at it on the below picture.




On the Lift
I am working on the 19Th floor of our office, whenever i want to go down to 1st floor or basement through the lift, i will press the lift button and wait for the lift to stop on 19Th floor once it is stopped, manage to get in with a grim face, avoiding the people inside the lift, but the people inside look at my face and smile, expecting a smile in return, but i do not have the courtesy to smile back, i will stand tight lipped. Once the lift stops at 1st floor, i will try to get out of the lift first as if i am the VIP, somebody got into the lift on 20Th or 21st floor will still stand on the corner of the lift pressing the open (lift) door button on the lift, until everybody get out of the lift carefully without hurting themselves on the closing doors. Time and again i was doing like that very recently i also started looking at the face of the people inside the lift and started smiling at them, and now i am pressing the open button on the lift so that everybody get out of the lift first and i come out of the lift at last. Like an old English adage goes I comes last...

Monday, September 22, 2008

Metaframe

Metaframe is a thin client architecture for windows terminal services.

We can deploy and publish our application on Metaframe servers, the users can access the application through URL, the application instead of running on the User PC runs on the Metaframe server. So, what is the advantage of using Metaframes. The performance of the application will increase.


How the performance increases?

Network latency can decrease the performance of an application, for example user access the database residing on a server at India, from his Office at Japan through an application running on his PC, the time taken for the network packets to reach the server at India and back to Japan will impact the performance of the application.

One way to increase the performance of the application running on the user PC is by increasing the network packet size, but there is limitation on the size of the Packet, we cannot increase the packet size beyond a certain limit.


Whereas If we deploy our application on a Metaframe server which is located at India, this application will run on the Metaframe server instead of running on the User PC, user access the database via Metaframe servers located at India. In this scenario the network latency is very minimal, the user can get a better performance on metaframes.


Load balancing

We may have more than one Metaframe servers, if we deploy our application on all the servers, it will automatically identify and allocate the load on the server with less CPU utilization and balance the load on the servers.


Backup

We can deploy our application on more than one Metaframe servers. Unfortunately, if a server crashes, we don't need to worry, the user can access the application from other servers without any outage.


Real time challenges

  • While deploying our application on Metaframe servers we have to take care of the other applications which are already deployed on the server.
  • The shared folders, network drives, common shared files, library files, ActiveX components should not be changed, if changed or removed it may affect the co-existence of other applications.
  • If we are using batch scripts for publishing the application, it should be a common or a single script for all the servers, suppose we are having three different scripts for three different Metaframe servers, maintenance of these files would be difficult.


We faced a performance issue on one of our application and after implementing our application on Metaframes, we are getting better performance now :)

Sunday, September 14, 2008

Compare and Contrast

Famous highly crowded railway station at Chennai - Mambalam station and its passengers.




Not equally famous oimachi station at Tokyo



Video of Unmanned train (driver less train)



Why such a polarization? We have everything, IT super power, Second largest democracy, yet our citizens are suffering like this.

The sad fact is that most of the software used here for automatic ticket vending machines and the ticket checking machines are coded by Indian software professionals. The same software professional when he lands on Menambakkam airport from Tokyo, wants to reach Mambalam has to wait on the Queue to purchase the EMU ticket at Trisulam station.

I think the railways has to do something for its Passengers and for their safety. Railways should be for Passengers not the other way around.

Saturday, September 13, 2008

Tokyo Toys

All children born with same qualities but the way they brought up and the environment they grow plays a vital role in shaping their future.
Children at Tokyo are playing with Computers and Robots. In some schools children are creating small Robot toys for their summer vacation projects. At their very young age they are getting introduced to sensors, micro-controllers, flash memory etc. They are designing toys using their creativity. What a creative society it is?

Video of Kids playing with Robot Dog.

Even though our Indian children has the potential to create, design and innovate such things we are not in a position to afford them the cutting edge technology and innovation to our children of our nation.

When this situation will change in our country? At 2020 ...

Earth quake Isolation system

Last week we visited Miraikan - Science and Technology Innovation centre at Tokyo. It was an amazing experience. Its a 5 story building full of innovation. On the first floor we saw the Earth quake Isolation system designed by Japanese. Japan is prone for Earth quake, experiences Earth quake 10,000 times in a year, still we can see lot of Skyscrapers here, all this because of the Isolation system they are using on the building foundation.

Below videos simulates the Japanese Isolation system.

Common people visiting this centre are being educated about Earth quake, what happens on the ground during earth quake and how to construct buildings which can withstand the trimmers. Its really amazing.

Perfomance tuning on Sybase Stored Procedures

Recently we faced performance issue on Sybase stored procedures migrated from SQL Server.
We did the following to improve the performance.

  • Forced the index
  • Changed All page locks to Data page locks
  • Increased Stored procedure cache.
  • Substituted IN keyword on where clause using multiple expression with or clause.
  • Created additional indexes.
  • Removed * (asterisks) on select statements with required column names.

Significance of close()

objectName.close() method is a single line of code, if it is missed our job will close.

We are using a java class to open an MQ connection, get, put, SWIFT messages onto the MQ. This class was thoroughly tested and debugged. We have promoted this class for User acceptance testing (UAT), it performed well and got the sign off from the Users for Implementation.

The very first business day after the implementation this class was working fine, suddenly when a spike occurs, we have nearly four thousand messages on the Queue, we are getting MQ Exception (Exception number 2017), the description of the exception is the number of open handles exceeded its limit. We restarted the service after reading 256 messages again we are getting the number of handles exceeded error.

We debugged the code, wherever we are opening the queue we are closing it, but unable to find where the exception is from, this problem never occurred during UAT when we did Volume testing with more that ten thousand messages.

Finally we find out that we have missed localqueue.close() method on an escape route. The escape route i meant is the exception handle block (catch block of the try-catch), we are reading the messages from the Queue when some exception condition occurs, but forget to close the local queue after reading from the queue.

Since this exception never occurred during our UAT there was a potential bug unnoticed. But during production when the exception condition occurs the openned local queue handles are not closed, we missed out localqueue.close().

It took nearly ten days to simulate this condition on development environment and fix the error. This has a major impact on business as well.
Lessons learned:
We are closing the connection, recordsets, handles after their use, but we should never forget to close them on the escape route.