aws

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.