Sunday, August 06, 2017

My first experience with Scaling Up....

It was quite a few years back, when SMS (Short Message Service) was the only option for communicating on a mobile phone (other than voice calls).  Even, mobile phones were not so common, though it was over 5 years old in India.

And our Bank, was still working on a distributed system, albeit successfully.  We were an innovation hungry team, and wanted to deliver the best to the customers through technology.  So, we wanted to introduce SMS alerts!  (Now, looking back, it may seem anything but innovative.  But, this was, way back in 2002, when no Bank was "alerting" the customers when a transaction took place in their account.)  And, how do you do that?  One of the vendors came out with what is called "Jataayu Server" which can connect a Windows Server to a SIM card and send SMS messages.  So, the first part of the problem is solved, we thought.  Now, somehow, it was sufficient to generate message whenever a transaction happens.

The application was working using Sybase database.  So, we developed a few triggers which can get generated on any transaction being originated in an account.  This would get read by a Java application, which later gets transmitted to a central server, in turn connected to the Jataayu Server, which sends the message in the form of an SMS.

It was rather a Eureka moment!  After all it worked like wonder!!  Whenever a transaction happened in an account in a branch of the Bank, an instant alert is generated and sent to the mobile phone of the customer!!!

And we successfully launched the service and everyone was happy... until....  It started getting delayed... Beyond our expectations and imaginations...

We were into a troubleshooting mode.  With some effort on debugging we could locate the culprit.
A SIM card was designed to be used with a simple mobile phone.  And could send only 7 to 10 messages per minute.  This speed constraint is due to GSM handshake speed limit when using a SIM card to send SMS messages.

When I look back, that was my first experience with scalability or a rather the lack of it.  From that day, whenever I think about designing a system, I pose to myself three questions.   What are they?  I reserve that for a future post.

Bye for now.