Wednesday, May 5, 2010

Additional GUTI and additional P-TMSI

The release 8 specifications talk about sending additional GUTI / additional P-TMSI in attach reqeusts and Tracking Area Update (TAU) or Routing Area Update (RAU) requests. So what exactly is the purpose of them?
As mentioned in the previous post, an EPS capable UE can have itself registered both in an MME and an S4-SGSN. In that case the UE's USIM will have a valid GUTI from the MME and P-TMSI and P-TMSI signature from the SGSN.
Whenever the UE does a new attach into an E-UTRAN network (or) UTRAN/GERAN network, it has two temporary identifiers. It informs one of them as an additional identifier to the MME / SGSN. Lets consider each of the cases

Attaching to MME
The UE has a valid GUTI and a valid P-TMSI. TIN = P-TMSI
In the attach request:
  • Old GUTI = GUTI mapped from P-TMSI.
  • Additional GUTI = GUTI. P-TMSI signature is also sent in this case
The UE has a valid GUTI and a valid P-TMSI. TIN = GUTI / RAT related TMSI
In the attach request:
  • Old GUTI = GUTI at UE. No additional GUTI is sent
So what is the purpose of sending the additional GUTI in the first case above?
Since the old GUTI received by the MME is a GUTI mapped from P-TMSI, ideally it has to query the UE's identity from an S4 SGSN. But why do it if is possible for the MME to locate the subscriber's context within itself? To locate the subscriber's context it needs a GUTI that it allocated to the UE. So the additional GUTI helps (provided that additional GUTI was allocated by this MME).

Attaching to S4-SGSN
The UE has a valid GUTI and a valid P-TMSI. TIN = GUTI
In attach request:
  • Old P-TMSI = P-TMSI mapped from GUTI.
  • Additional P-TMSI = P-TMSI
The UE has a valid GUTI and a valid P-TMSI. TIN = P-TMSI or RAT related TMSI
In attach request:
  • Old P-TMSI = P-TMSI.
  • Aditional P-TMSI is also = P-TMSI if TIN = P-TMSI. The P-TMSI signature is also sent.
The usage of additional P-TMSI in the first case to look up the subscriber's context locally at SGSN instead of going to MME.
The same logic applies to TAU and RAU procedures as well.

Idle Mode Signaling Reduction

For the call flows refer Annex J in TS 23.401. Also refer this spec for an introduction to some of the terminologies used here.

What is ISR?
ISR means Idle Mode Signaling Reduction. This is a feature that allows an EPS subscriber to roam between E-UTRAN and UTRAN/GERAN coverage while in IDLE state without updating Routing Area / Tracking Area to MME / SGSN.

ISR is mandatory to be supported in an EPS capable UE but can be optionally configured in the EPC core network (S4 SGSN and MME)

Why is it needed?
The deployment of E-UTRAN network will co-exist with existing UTRAN and GERAN networks. So it is possible that within the same are a subscriber moves between E-UTRAN and UTRAN/GERAN coverage. This should not generate unnecessary signalling with the core network when the UE is in IDLE state. So what is IDLE state? It means that the UE is not having a signaling connection towards the core network (SGSN / MME). When in IDLE state,
packet transfer will not happen.

When is ISR activated?
ISR is activated ONLY on the following cases:

CASE 1
  1. Subscriber is already registered in a MME (EMM-REGISTERED state at MME)
  2. Subscriber is in ECM-IDLE state in the UE.
  3. Subscriber does a RAU into UTRAN / GERAN. RAU request carries P-TMSI mapped from GUTI. SGSN checks if ISR is activated in the config. If yes, it returns the ISR active flag in RAU accept to UE
  4. UE sees that its current TIN is GUTI and hence sets its TIN to "RAT Related TMSI"
  5. SGSN sends Update Location to HSS / HLR. HLR / HSS does not send Cancel Location to MME. A release 8 HLR / HSS keeps an EPS subscriber registered at both MME and SGSN at the same time.
CASE 2
  1. Subscriber is already attached in a SGSN
  2. Subscriber is in PMM-IDLE state in the UE.
  3. Subscriber does a TAU into E-UTRAN. TAU request carries GUTI mapped from P-TMSI. MME checks if ISR is activated in the config. If yes, it returns the ISR active flag in TAU accept to UE
  4. UE sees that its current TIN is P-TMSI and hence sets its TIN to "RAT Related TMSI"
  5. MME sends Update Location to HSS / HLR. HLR / HSS does not send Cancel Location to MME.
How does the UE know that ISR is activated and hence it need not do RAU / TAU while roaming within the TAI list / RAI in IDLE mode?
If TIN is set to "RAT Related TMSI" then UE knows that ISR is activated.

When does ISR get deactivated in UE?
ISR is deactivated in following scenarios
  1. TIN = "RAT Related TMSI" and RAU / TAU into a new RA / TA outside of the stored TAI list / RAI. Upon successful completion of the new RAU, TIN will be set to P-TMSI. Upon successful completion of new TAU, TIN will be set to GUTI.
  2. TIN = "RAT Related TMSI", periodic RAU timer expires (probably lost radio coverage in UTRAN), starts deactivate ISR timer and the deactivate ISR timer also expires. TIN will be set to GUTI
  3. TIN = "RAT Related TMSI", periodic TAU timer expires (probably lost radio coverage in E-UTRAN), starts deactivate ISR timer and the deactivate ISR timer also expires. TIN will be set to P-TMSI
Will ISR be activated if current TIN is same as the temporary identifier of the RAT to which UE is doing an update procedure?
No. For example if TIN = P-TMSI, and UE does a RAU into a new RA, the SGSN returns a new P-TMSI. The context transfer is between two RAs in the same radio technology. So even if the SGSN includes the "ISR Activated" flag in RAU accept, UE should set its TIN to P-TMSI only.

How is a downlink packet delivered to the UE when it is registered with both MME and SGSN and the UE is in IDLE state?
S-GW sees that it has an active GTP-C v2 tunnel with an S4-SGSN and MME and hence it sends downlink data indication to both of them. Both SGSN and MME initiate paging. The UE responds to one of them with a service request.
Once the radio bearer establishment is completed and service request procedure is completed, the S-GW sends a stop paging request to the other RAN from which service request was not received. For example if the UE latched onto E-UTRAN,
stop paging will be sent to SGSN.

Is ISR done when roaming from MME to a Gn/Gp SGSN?
No. ISR is applicable only between MME and S4 SGSN.


Updates:

Found the book

"SAE and the Evolved Packet Core: Driving the Mobile Broadband Revolution"

covering this topic in good detail. Preview of it is available in Google books. The ISR chapter, luckily is there for preview


Back with posts on 4G to 3G/2G packet switched mobility

I have been going through the 3GPP release 8 specifications on the aspects of E-UTRAN to UTRAN/GERAN mobility. Though there are few blogs that discuss a lot about the LTE packet core (here and here), I couldnt find a blog that discusses the scenarios with respect to E-UTRAN to UTRAN/GERAN mobility.

I will start a series of blogs on the same shortly. Few interesting scenarios that are not very clear from a quick read of the specs are

  1. Idle mode signaling reduction
  2. S4-SGSN to S4-SGSN handoff of a EPS subscriber
  3. E-UTRAN to UTRAN SRNS relocation with indirect data forwarding
The upcoming blogs will discuss about each of the above and also about GTP V2. Stay tuned.

Monday, November 2, 2009

Solving the carpentry problem by dynamic programming

Last week I was discussing about dynamic programming technique with a friend. We were discussing about the carpenter problem given here (http://parasol.tamu.edu/~amato/Courses/311/exam3.review.html - problem 4). The following is an attempt to solve the problem. Comments are welcome. Note: I am not approaching this problem through a mathematical recurrence relation. I am simply trying to solve this problem by plain common sense. However let me make an attempt to write the recurrence relation at the end (atleast let me see how much I remember my B.E classes :-))

At the outset the problem is a divide and conquer problem. The solution is
  1. Make the first cut at a point that is near the half way mark. The cost of making this cut is the length of the wood (L)
  2. Then we will have two halves with lengths L1 and L2. Apply the step 1 recursively for each of these pieces till we have made the cut at all the marked points.
Now to apply dynamic programming to this problem, we have to store the result of each portion calculated. The result shall be stored in the followig way
  • A hash table mapping the length L and list of points (a1, a2, ... an) to cut on the wood, as the key, and the cost of making such cuts as the value.
So as we recursively calculate the cost of cutting each piece of wood of length L at points (a1, a2, .. an) store the result in memory. If some other half of the wood has the same length and cutting pattern, then the result is readily available in memory. It need not be cut again.

For example, consider a wood of length 10 metres to be cut at points a1 = 1 metre, a2 = 4 metre, a3 = 6 metre and a4 = 9 metre. Here are the steps.
  • Make the first cut at a point near the half way (5 metre mark). In the above example points a2 and a3 are equidistant from centre. So lets choose a2. Now we have two woods of length 4 metre and 6 metre. After this cut the hash table will have an entry.
Value(10#1#4#6#9) = 10 ; Where 10#1#4#6#9 is the key; 10 = length of the wood, 1,4,6,9 are the points at which cut has to be made .
  • Now apply the above rule for the two wooden parts we have now. Applying it on the first one, we have
Value(4#1) = 4
  • Applying the rule on the second part, we have
Value(6#2#5) = 6 + value(4#3). Note that in the key 6#2#5, 6 = length of the wood, 2 = point of first cut (Point a3 (6 metres) - 4), 5 = point of second cut. This wood of length 6 has to be cut at point closer to its centre. That is the point at 2 metres. The cost of making this cut is 6. Now we have two parts from this cut. The first part doesnt need any more cuts. The second part needs to be cut at point 3 metres (5 - 2) from its begining. The cost for making this cut will be stored in the hash table as

Value(4#3) = 4


So value of (6#2#5) = 6 + 4 = 10.

Now the total cost = 10 + 4 + 10 = 24

In the example chosen above, we didnt have any cut patterns that repeated. So that the costs stored for the cut patterns in the memory were never used.

Now consider this example, wood of length = 10 metres, points a1 = 1 metre, a2 = 3 metres, a3 = 5 metres, a4=6 metres, a5=8 metres

In this example, once we cut the wood at a3=5 metres, we have two woods of the same cut pattern. The pattern is (5#1#3). So it is enough if we calculated the cost for one part. For the other part we can straight away take the cost from the memory.

Now to the recurrence relation,

C(L, a1, a2, ... an) = C(L) + C(L1, a1, a2, ... aL1) + C({L-L1}, {aL1+1 - aL1}, {aL1+2 - aL1}, ... {an - aL1})

where C = Cost

  • L = Length of the initial piece of wood. C(L) = L
  • a1... an = Points at which the wood has to be cut
  • L1 = Point nearest to L/2 where the first cut is made.
  • aL1 = Point of cut at length L1
  • aL1+1 = The next point after aL1 that is marked for a cut.

I will try to write a C program for the above problem and post it later. Open for comments on the way the solution is explained and if there are other better solutions for this.

Tuesday, August 11, 2009

What India needs is self discipline to contain any viral outbreak

All the impractical advises that the government gives to contain Swine flu from spreading look meaningless in India. How can you contain people from going in Trains, especially in a City like Mumbai?

Swine flu in India can be contained only through self discipline. Instead of giving impractical suggestions, government can create an awareness about the problems caused by spitting and urinating in public. In India the educated and the uneducated behave the same in this regard. What India needs is a "Stop Spitting"! campaign.

Sunday, August 9, 2009

Element Management Systems Architecture

Every telecommunication equipment vendor has to supply some level of manageability for the equipment. The management software supplied with the network element can be a propreitary software interoperating with the vendor's element management system or it can be a standards based management agent so that it can interoperate with both the vendor's element management system and other third party network management systems. In this article I will cover various aspects to consider in the architecture of a management solution for network elements, especially those based on ATCA platform.

What is element management?

Managing a network element involves the following

  1. Configuration of the network element. The configurations can be initial provisioning (which remain static as long as the network element is operational) and run time configurations (which are dynamically added / modified / deleted at run time)

  2. Collection of fault notifications from the network element.

  3. Collection of statistics and call counters from the network element.

What is an element management system?

An element management system provides some mechanism, in the form of GUI or command line utilities, to manage the network element. The GUI or command line utilities will have fields / commands to configure the device, view alarms and statistics. Typical element management architectures are

  • GUI is a web based. Network element runs an HTTP server with CGI scripts which communicate with back end APIs in the network element to configure the device and collect alarms. The advantage here is that, GUI can be made extremely interactive if AJAX is employed. Since most of the browsers now support JavaScript, portability doesn't become an issue. The disadvantage is that it doesnt use any standard protocol for management. If a customer wants to integrate a third party network management system (explained later) with the network element, it is not possible unless the third party NMS understands how to invoke the CGI scripts on the network element. Figure 1 provides a conceptual view of this architecture.

Figure 1

  • GUI is a stand alone JAVA GUI which uses SNMP PDUs to communicate with the network element. Network element runs an SNMP agent which interprets the PDUs and provides configuration and fault management facilities. The advantage of this solution is that it is standards based. Any third party network management system can be integrated with the network element. The SNMP MIB serves as the contract between the NMS and the network element. The disadvantage is that, Java based GUI require separate installation and are generally less interactive (compared to AJAX based web interface). Figure 2 provides a conceptual view of this architecture.
Figure 2

  • GUI is web based. Network element runs CGI scripts which communicate with local SNMP agent using SNMP. This approach combines the best of (1) and (2) above. Figure 3 provides a conceptual view of this architecture.
Figure 3

What is a Network Management System (NMS)?

Network management systems are standards based management systems that can control and monitor a variety of network elements within a network. A network can comprise multiple devices from multiple vendors. Hence it becomes imperative for the network management system to talk the same language to all the devices it manages. Hence a standard protocol for management becomes mandatory. SNMP is used as the standard protocol to configure various network elements.

Steps to do to make a network element provide stadards compliant management interface:

The following are the steps involved in making a device standards compliant for integration with any NMS.

  1. Define an information model for managing the device. The information model should not depend on how it is going to be managed from an EMS or NMS. That is, the model should care only about what should be managed and not how it should be managed. If some attributes / fields are added in the model just to satisfy some ease of use of use from the NMS / EMS it breaks this goal. If th model takes this path, then it becomes extremely difficult to integrate the network element's instrumentation of the model (the SNMP agent part) with the NMS (the SNMP manager part).

  2. While defining the tables in the information model, normalize the tables using database normalization techniques. This calls for expertise in database design.

  3. Capture the information model as an SNMP MIB.

  4. Implement the instrumentation for the MIB as an SNMP agent at the network element. Instrumentation means, for example if a SET request is given for a particular attribute, the agent should handle propagating that information to the appropriate module in the network element that handles that attribute.

How SNMP based network management systems function?

The function of an NMS can be split into the following

  1. Setting the configuration on a network element (uses SNMP SET). These operations should follow the ACID properties (Atomicity, Consistency, Integrity and Durability). To ensure atomicity of these operations, configuration set requests from NMS are typically blocking calls.

  2. Querying the existing configuration from a network element. This happens when a new network element is added into the NMS (or) when NMS loses connectivity with the network element for sometime and then comes back. The query can be on a single attribute or it can on the complete database. Though many NMS implement both these operations as blocking calls, it makes sense to implement bulk queries as asynchronous operations. This requires the SNMP manager module in the NMS to buffer the sent request so that it can match the responses with the request.

  3. Listening for asynchronous events from the network element. These events include alarms and statistics.

Issues with Synchronous SNMP towards network elements with multiple process architecture

Most of the NMS employ synchronous (blocking call) SNMP towards the SNMP agent for configuration query and apply. This provides a simple implementation for network elements where the entire application along with management agent (SNMP agent) are compiled as a single image and loaded. This is the case with propreitary hardware based solutions.

However, next generation network elements (PDG, AAA servers, e-PDG, MME) running on standards based ATCA chassis environment are architected with multiple UNIX processes for high availability. Such network elements will have each process catering to a separate functionality. For example in a AAA server, one process could be catering to the RADIUS / DIAMETER interface towards the PDG or other NAS, while another process could be interfacing towards the traditional HLR through an SS7 interface. This SS7 process could run on a separate blade, having an SS7 card. In such an architecture, synchronous SNMP adds to lot of delay. Consider the example given in the figure below


Figure 4


As shown in the above figure, in multi cluster HA architectures some of the configuration data need to be set in every cluster. If the SNMP agent blocks for response from all of them it adds to a significant delay. Sometimes some of the clusters may be busy in data plane or control plane processing. It may process the configuration message after some delay. If the NMS which gave the configuration request is set to timeout say, 2 seconds, it may timeout while the request is still in processing at the network element. This leads to momentary data inconsistency between the configuration data available in the NMS and the configuration processed in the hardware.

There are two ways to address this problem

  1. Make the SNMP command request and response asynchronous. This means the NMS will never block once it sends out an SNMP SET request. It may receive the SET response later. But it has to maintain a window of requests sent, so that it can match the response to the request.

  2. Use synchronous SNMP from NMS to SNMP agent. The SNMP agent should return immediately after verifying the validity of the message. It should then process the configuration request in a separate thread and once it configures the data in all the clusters it should send a success / failure notification back to the NMS as an unsolicited message (TRAP or INFORM REQUEST PDU). In this approach the NMS need not maintain any window of requests. It should commit the configured value into the database, only after it receives the success notification from the agent. The notification will carry the OID of the attribute that was configured, the value set and its status.

Conclusion:

In summary, to make a network element provide a standard management interface and be interoperable with any NMS the following need to be done:

  1. The SNMP MIB, should model only what should be managed and not how it should be managed. The model should be well normalized. Make sure that the MIB defines events for notifying success or failure of configuration requests.

  2. Make the mode of operation of SNMP agent (synchronous / asynchronous) configurable (or) a compile time option. If the agent is configured to operate in asynchronous mode, then it can use the asynchronous events to signal the success or failure of operation to the NMS.

Tuesday, August 4, 2009

Facts about STL

This is an excerpt from an advanced C++ training that I gave at my office couple of months back.

Most of our text books give a feeling that the standard template library (STL) in C++ is implemented as a shared library that is linked with your code by the C++ compiler / linker automatically. Templates by declaration dont hold any memory for its definition unless a specific instance of the template needs to be expanded by the compiler. For example a List class is defined to contain elements of a templated type, then a separate class will be created by the compiler for each of the instantiation of the class. That is, if an integer list is declared, then the tempplated List class will be expanded into List class containing integer data. If a string list is declared then the compiler will expand the templated List class into another List class containing string data.

So if the STL implementation is a dynamically linked library with your code, then how is it possible for the STL library writer to have defined an instantiation for all possible data types for all the STL classes. For example if you want to declare a list of your own data structure, you declare it as

std::list yourlist;

When this piece of code is hit by the compiler, it will create a new class called yourstruct_list by expanding the templated declaration of std::list class. But if the STL were to be a predefined shared library it is not possible to have the author of std::list class to have compiled it for the symbol yourstruct_list since, the author has no way of knowing how user defined data structures will look like. If the complete STL were a pre-compiled .so library and if you simply link it then the .so will never have the class instantiations for your data types.

So how is this problem solved by STL?

In STL only the basic functionalities which are independent of templates are compiled as libstdc++.so library. All the STL templated classes like list, vector, map etc.,. are coded in the header files which we include. For example
/usr/include/c++//vector -->includes /usr/include/c++//bits/vector.tcc. The *.tcc files have the complete definition of the templated classes. When your C++ code uses STL the following is what happens

1. You define an instantiation of a templated class (eg: vector) for your data type
2. Compiler gets the blue print of the vector class from the included vector-->/usr/include/c++//bits/vector.tcc file
3. Compiler creates an instance of the vector class for your data type as per the definition of its blue print in /usr/include/c++//bits/vector.tcc

For a better understanding of the STL classes look at the source code in /usr/include/c++//bits/*.tcc files.

Sunday, November 9, 2008

Interviews!!! - God Save Me

It has been a hectic three weeks of interviewing at my office. We have been hiring a lot for design and development of some new products in Fixed Mobile Convergence. We have been looking for people who are very good programmers in C and C++ with some telecom background in the experience range of 1-8 years. To me personally, I dont stress much on what protocols people have worked. If a person is a very good programmer and has good design skills he can learn any protocol and can design scalable solutions for telecom. But sadly the industry around us in Bangalore, especially the bigger services companies, doesnt seem to think so. Here are my observations of people from big companies who claim fancy things in their resumes.

1. Almost all of the resumes that we receive have the candidate projecting himself as having worked in design, development and deployment. You ask them to design solutions for simple problems, they cant even understand the requirements. I am not talking about big system requirements here. I am talking about small programming problems with some scope for design challenge.

2. The more experienced a candidate is the worse his programming skills are. People rejoice in claiming to be "Leaders" / "Managers". Its been a nightmare for a smaller company like us to find good developers. A small company survives because of good software they write and market and not because of excellent people managers they have.

3. Almost all attach the word C++ if they know C programming. People think that C++ is just an enhanced syntax of C. Having said this I am ready to hire a person if he is excellent in programming in C and can independently develop software even if he doesnt know object oriented design principles and programming. A person who can think through programming logic can easily pick up object oriented design concepts.

4. Anyone who has seen a TCP socket program (forget about writing TCP client/servers) claims he is an expert in TCP / IP. No one cares about how a TCP server is designed for concurrency and scalability, how queue sizes can be optimally designed etc.,. What good subjects like "Operations Research" that one learns in their engineering do?

5. Designation matters to them most than how good they are at solving problems.

6. People who claim to have used a particular tool or framework are only API users. They fail to understand the internal design of those tools. For example I came across a few resumes that boasted of expertise in ACE (Adaptive Communication Environment). I am not an expert in ACE myself and neither am I an expert in design patterns. But I atleast know some of the design philosophies of ACE. But these self proclaimed ACE experts cant even understand what a factory pattern is.

7. This is especially about Java developers. Somehow our Java textbooks teach it all wrong. Almost everyone who has done only Java programming thinks "Thread" is a feature of language.

I desire to go to teaching profession one day and teach software development and design to college grads. Such fruit less interviews are driving my desire more. I know we severly lack quality teachers at undergraduate levels that teach good programming skills. But apart from that what I feel is we as a society somehow attach greater importance to status and designation rather than what effective work one actually does. I would love to teach the young grads the importance of learning and problem solving rather than how to get designations.

Thursday, October 16, 2008

Is Google the next Bell Labs?

If you had asked in the late eighties and early nineties the question "Which organization leads in research and innovation in computer science (and for that matter most of the science disciplines)?" anyone would reply back "Bell Labs". With the merger of Alcatel and Lucent last year and Alcatel-Lucent subsequently announcing that it would stop funding researches in fundamental science at Bell Labs, it is no longer the hub of innovation in computer science. The Plan-9 (Inferno) distributed OS project hasnt got the thrust in market it ought to have. So where are all the great minds that worked in Operating Systems and Distributed Systems at Bell Labs now?

Google for Robert Pike and Ken Thompson and you will know where they are :-) The list of top notch computer scientists at Google doest just stop here. Vinton Cerf is also at Google. Is Google redefining research in distributed communications and continues what was left by Bell Labs?

Sunday, August 31, 2008

Java vs Twenty-Twenty

I always have this opinion: Teaching Java as the first programming language to a Computer Science graduate even before teaching the fundamentals of computers and computing, is not going to produce any quality developers and computer science professionals. Of late I started comparing this with how 20-20 is spoiling cricket.

Why is teaching Java as the first programming language a Twenty-Twenty affair? Simply because when you throw open a gamut of libraries and ask a developer to use it to program his application without even teaching the fundamentals of algorithms, why libraries are needed, how to develop modular and object oriented systems etc., he forgets to think what happens behind the scenes and how those libraries are implemented, in what thread context a particular interface method is invoked by the run-time, how are the Java threads implemented, how are they scheduled etc.,.

Compare this with introducing Twenty-Twenty to young kids who learn to play cricket. They will start forgetting that the fundamentals of cricket lie in a solid defense, strong temperament, concentration and will power to last against the odds. Classic case is Yuvraj Singh who seems all lost when facing quality opposition in test cricket.

I don’t have anything against Java as a programming language. But when I see engineers claiming to be “expert Java programmers” lack even the basic skills it becomes very tough to manage a product with them. They increasingly struggle while trouble shooting issues. Even if they study the java documentation and go through it they don’t understand how it works. It is for this reason; I discourage recruiting the so called “Java experts” without sound fundamentals.

Saturday, August 30, 2008

Why is it still a distant dream to get more Olympic medals for India?

Everyone is happy that India, for the first time in history, got more than 2 medals in an Olympics and the media are gaga over it. They even started predicting 10+ medals for India in London 2012. Though me too is confident that one day India will reach there, I am skeptical if it would be within four years. Here are my reasons.

We keep cribbing about government not spending enough for sporting infrastructure. Where will the money come from when the taxes collected is not sufficient even for our basic needs and defense?.

Does our Indian education system impart the value in our citizens to be duty bound towards our country and pay our taxes? Does it give importance to the moral and ethical responsibilities of a citizen to be taught at school level? It all starts from the exam system by giving more importance to marks than knowledge and hence making the student get it by all means, even if unethical. A value less education produces tons of graduates and our GDP is also increasing but income to the government is still less. How can the government spend on sporting infrastructure when there are hundreds of basic necessities to be fulfilled?

The second malady of our exam based education system is it inherently discourages sports. In the mad race to secure perfect 100 in all subjects in board exams who will look at practicing sports?

Unless a change happens at this grass root level we can only dream of becoming a sporting super power. We will produce a few gems here and there but they will come up despite the system and not due to it. Miles to go .... but lets keep the hope...

Tuesday, July 29, 2008

Evaluating COTS Telecommunication Middleware

The market for Commercial Off The Shelf (COTS) middleware for high availability and management of telecommunication application along with modular compute platforms like ATCA and Carrier Grade operating systems like Carrier Grade Linux (CGL) are gaining momentum. Developers working in the teleocm industry whose expertise mainly lie in the development of protocol stacks and telecommunications applications, are often clueless as to how to evaluate these commercial off the shelf middleware. "Managers" :-) believe that a "Carrier Grade HA middleware" is a magic box which when integrated with their telecom application makes it five nines available overnight. But the fact is that the COTS middleware are just platforms over which one has to integrate their application. The onus of designing how the application needs to be deployed to achieve high availability still lies with the application developer. These COTS frameworks only provides mechanisms to incorporate those designs. Think of the COTS middleware as an "Operating System". An Operating System like Windows / Linux as such is of no use to the user. Its the applications built on top of them that the user is using. Similarly the COTS HA middleware is just a platform.

As a developer who has worked in the development of a carrier grade SAForum compliant middleware and also architected / designed some proprietary HA and management frameworks I would like to bring out my own list of questions to evaluate any commercial off the shelf middleware.

1. Does the COTS middleware provide a tool to model the application in terms of services, their redundancy policy etc.,. (prefarrably in SA Forum compliant way)? What redundancy models it supports? 1:1? N+K? N-Way active load balanced?

2. Have any legacy network element been integrated with the middleware? What was the redundancy model followed for it? What was the cycle time taken to make the legacy software into a HA product using your middleware?

3. What operating systems and hardware platforms are supported?

4. What is the measured switchover time from the active machine to the standby machine once a failure is detected by the HA middleware? How is the switchover indicated to the standby application? Does the middleware provide a configurable interface (preferably data driven / script based) for defining the actions to do on getting a switchover indication?

5. What is the replication mechanism followed by the HA middleware? Message based redundancy? Checkpointing? Distributed shared memory? Explain its performance in terms of number of messages replicated / checpointed per second with the average message size being 64 bytes.

6. Does the middleware provide a management framework? If so what is the interface provided by the framework? What is the database used for storing managed objects? Is it a proprietary database or a commercial database? What is the model follwed by the database - (i.e) Is it relational or hierarchical object oriented? How are the managed objects addressed in the database? Also does the management framework provide any IDE to model the management information (i.e) Does it provide a management information modeling tool?

7. How to integrate an existing application MIB with the management middleware? If the internal managed object database follows hiearchical object oriented model how do you map SNMP OIDs (which follow relational database model) to the managed object instances in the hiearchical database?

8. How are the events on hardware (boards, hot-swap events) mapped to state transitions on the related managed objects?

9. How can one define cross consistency check rules between MO attributes in the information model for management? Does the middleware provide any tool to define it? Also does the management framework handle the backend consistency check logic once the rule is defined through the tool without the need for writing any code?

10. Does the HA middleware provide location transparent communication between the service units defined? If a service unit A needs to send a message to service unit B will it be possible to address service unit B without knowing its physical whereabouts? What is the transport protocol used? Is the location transparent mechanism a sort of "naming service" over TCP / UDP transport or location transparency is supported at the transport protocol itself (TIPC)? If supported through "naming service" what is the messaging latency introduced by the overhead of a naming service layer over the transport?

11. Is it possible to model fault recovery policies in the HA middleware? For example if one wants to associate the continuous receipt of critical alarms from say an SS7 card to a service failover, is it possible to do it?

12. How are faults (alarms) from various service units (service unit could be a software or it could be a hardware proxied by a software) modeled and how are they associated with the MO classes in the model? At run time how is an alarm instance associated with an MO instance?

13. Does the management framework support the delivery of Attribute value change notification (AVCN), state change notification (SCN), object create notification (OCN) and object delete notification (ODN) on the managed objects to the northbound management stations?

14. How are alarms to MO state transitions mapping modeled?

15. Is it possible to define northbound interface level access permissions for each attribute while modeling? For example I would like to model certain attributes as RO to SNMP interface but RW to CLI interface. Is this possible?

16. Is management service realized as a separate process? If so, how are queries to "run time" object attributes that are owned by the call processing services handled? For example, if one defines the current active calls table as a MO class in the model (which is Read Only to the operator) the MO class can have 1000s of instances (dynamically changing) at run time. If the operator at some point does a "getbulk" on this table does the management service issue a query to Call processing service (involving an IPC)? How is the call processing application performance at this time?

17. What are the types of searches supported on the MO tree? Depth first? Breadth first?

18. Is it possible to configure delivery of critical alarms to email addresses and SMS numbers in the management framework? This is not a critical requirement for a management framework used in the network element. Many NMS (Network Management Systems) that collect management data from a cluster of network elements they manage provide this facility. But having this feature at the network element's management framework is one of my wish lists.

19. Does the alarm management service persist the current active alarm list? Is the alarm reporting compliant to ITU-T X.733 specification?

20. Has the managed object database replication in a 1:1 configuration been measured for performance? How many bytes can be replicated per second? Is the replication done synchronously or asynchrously?

21. Does the management database provide transaction semantics? (i.e) If a configuration change needs to be applied to more than one node it should happen in "all or none" fashion.

22. Does the middleware provide mechanisms to define software upgrade and firmware upgrade policies and a smooth integration path with the management model? What is the HA state transition followed while upgrading? How does it ensure minimum downtime upgrade?

Uuuuh quite a mouthful of evaluation criteria. If any COTS middleware supports atleast 60% of this let me know. I am interested in evaluating it. I am more concerned about ease of integrating, manageability and performance of message replication mechanism.

Wednesday, July 2, 2008

Such a simple life

Last weekend I had been to Munnar and visited the Chinnar wild life sanctuary on the way back to Bangalore. The forest department at Chinnar allows treks into the jungles to spot animals in their natural habitat. But the trek has to be guided by some 'adivasi' - the native people of the forest.

We were guided by an adivasi boy "Selvam". During the trek I was chatting with him asking about the kind of animals one can spot and the life style of the tribes. I was amazed at his simplicity and attitude towards life. This one sentence from him summarizes everything:

"Ungala maadhiri padichavinga sondha oora vittu veli ooruku poi pala makkala sandhichu avangala pathi therijukareenga. Enagalukku indha kaadu dhan ellam. Naanga inga kaata pathi therijukarom. Pala thara patta makkala pathi naan inga irundhe theinjukarom, yenna avanga inga varanga"

(Educated people like you leave the native place, go out where opportunity is and learn various cultures by visiting places. For us this jungle is everything. We study this jungle. We learn other's culture by sitting here because everyone comes here)





He may be illiterate but in my opinion he is "educated". Only thing is his domain is the jungle and the animals. He was quite knowledgeable about the behavior of animals and when they will cross a particular place.

When the trek finished we had just one word to say to him: Thanks !!!

Saturday, June 21, 2008

Wah!!! What a Customer Service

I want to share my experience with BSNL customer service. Last month I shifted my house to New Thippasandra and had given a letter to transfer my BSNL connection to the new address. The letter was given on 26th of April, 2008. This was given at Indiranagar BSNL office (in 80ft road). Initially they told that the transfer will be done in 3 days. One week passed and still no trace of getting the connection. On 4th May I decided to visit BSNL office and enquire about the status. The person at customer service (in 3rd floor) told that my old connection is yet to be disconnected and right in front of my eyes she was pressing commands to place that order in the system only on 4th May (and that too because I visited. God knows when they would have placed the orders if I hadnt). Then again I visited them couple of days later. This time they told that my old connection is disconnected and now to get a connection at the new address I have to contact the engineer who is dealing with Thippasandra area. I went and met that engineer and told him that I am awaiting for my connection. He noted it down on a piece of paper and told me that it will be done shortly. I also gave him my mobile number to contact and asked him to call me before coming home to give the connection. He noted down my number also in the same paper.

Now the great customer service of BSNL starts. The engineer who took down the orders went on a week long vacation. No one other than him knows that he took down the orders. There is no centralized system to log in customer requests. I visited BSNL again a couple of days later. This time another engineer took down my orders again in a piece of paper but again no follow up. This continued for another week and by that time I had visited BSNL 4 times and each time someone is taking down orders but none is executing. Finally I got fed up and decided to lodge a complaint to Bangalore East Divisional Engineer. I went to his office the next week but the time I went he was not there. So I met up one more officer sitting in the Divisional engineer office's front desk. I explained him my frustration and told him that no one is logging the complaint in a centralized system. He gives great response which is the highlight of their customer service

"NO SIR. THERE IS A CENTRALIZED SYSTEM TO LOG IN. THERE IS A TOLL FREE NUMBER YOU CAN DIAL AND LOGIN YOUR COMPLAINT. THIS NUMBER IS GIVEN IN YOUR TELEPHONE DIRECTORY."

Hearing this I was laughing my guts out. The toll free number can only be dialed if I have a connection. I need not explain beyond this.

(Note: Though I got such a bad response at least this guy was helpful. I explained him the fault in his statement and he immediately called the engineer and ordered him to give the connection. The next day I got it.)

Sunday, June 15, 2008

Operations issues to set right in a startup

It has been 3 years since I left the comforts of a big organization and started working in the startup mode firefighting every day. The learning curve for me in the past three years have been phenomenal both technically and operations wise. Here is my learning on what a startup company should address in terms of operations related issues

1. Lab and network infrastructure - Dont under estimate this. A poor network and lab infrastructure will blow in your face just when you don't want it. In my experience I had come across a unique situation where the servers in the lab were just having a hard disk wipe out just because the AC in the lab was not adequate and temperature in the lab was soaring beyond 35 degrees centigrade and the temperature near the servers was like a hot tandoori oven. Outsource your infrastructure maintenance to people who know it best rather than you fighting it daily.

2. Developers are your primary resources - Value them. Take care that developer's comfort is of utmost importance. Not every startup can provide a cozy office for the developers. But at least see to it its not a cramped space. Giving developers laptops (rather than desktops) and providing them the freedom to sit and work ( a bean bag office environment) in the place they want will save you cost and also make the developers comfortable

3. Power - And a place like Bangalore needs utmost attention in this regard. Make sure you go for a trusted vendor for UPS and also get a consultant to help you in setting up the power connections and proper earthing.

4. Wiring in conference rooms - This is the place I hate to have wires floating around here and there. If 10 people sit in the room and all have their laptops connected to network through wires imagine the mess when someone gets up and walks around. Get a Wifi connection for your conference room. Also get the connection from your projector to power socket go through a sealed cabling. This is another candidate for getting tripped.

5. Have a concierge - Developers need undisturbed time to think and design. Let them not worry about paying their utility bills or getting the weekend movie ticket. Have a concierge setup to help them out. It doesn't cost much for the company to setup a concierge.

6. Keep your hiring standards high - Never compromise on this even if you are hiring for a maintenance / support job. If you have made your first release to market and got into the support mode of it don't think you can afford to lower your recruiting standards to get support staff. After all they are the ones who are going to fix your bugs. Having a bad developer fixing your bugs is asking for disaster. They will ultimately screw up your fundamental design and the entire code will be nothing but a set of patch works.

Friday, June 13, 2008

Solaris Kernel SCTP Issue

We recently we came across an interesting issue with Solaris Kernel SCTP. We observed that if you write a SCTP server program and then initiate thousands of connections from a SCTP client program loop, the server is able to establish the SCTP associations. The point to be noted here is that to simulate thousands of connections from client, the client program loops, creates a socket, binds to the client machine's IP address and a different port number each time. With this setup we were able to create thousands of associations towards the server. But when tested in a live setup where thousands of client machines (each a different machine and hence a different IP address) try to connect to the SCTP server, the solaris kernel sctp goes into a high CPU utilization of near 100%. Interestingly all the clients were bound to the same port number. If we change the port numbers used by the client machines, the CPU utilization @ server comes down to normal.

My hunch here is that kernel SCTP's hashing mechanism to index the hash table of SCTP associations is using only the remote client's port number part to generate the hash value and not the remote port + IP address combo. So if all clients are bound to the same port number, then the hashing algo will generate the same hash value. This will lead to all the client connections colliding to the same hash value thus effectively reducing the search to O(n) or O(logn) based on the collision resolution algo being used.

Refer this for the complaint.
http://forum.java.sun.com/thread.jspa?threadID=5288890

Saturday, May 31, 2008

Startup City @ Bangalore

Wow!!! was the expression I had when I came out of the startup city event organized by SmartTechie magazine, the first of its kind in Bangalore. The event was meant to create awareness among technology enthusiasts about various successful startups in Bangalore and encourage the entrepreneurial spirit in them. The event was held at NIMHANS convention center, Diary circle, Bangalore on the 24th of May, 2008 . It was a whole day event. There were talks and sessions given by leading entrepreneurs and technology evangelists in the morning. There were also parallel sessions going on in the morning where folks who have an idea to start a company can meet VCs one on one and discuss their plans. This in my opinion was a great opportunity for many budding entrepreneurs.

Among the talks that were given in the morning session, the one that impressed me was Lead India winner R.K.Mishra’s talk on his entrepreneurial journey and his subsequent interest in community service and social work. True to his statements in the Lead India finals, “That is why my motto is ‘work more, talk less”, he really is a man of actions. For the rest visit his blog and his website.

The afternoon session was open for us to go and interact with the startups who had put up stalls there. Due to a huge crowd I was not able to spend time with all of them and discuss the technologies they work on. But a few of the stalls I visited impressed me.

OboPay’s concept of using the mobile as a virtual debit card to handle transactions was good. But I am not sure on their revenue model. As per their explanation, they dont charge the user anything for sending the SMS to Obopay’s SMS short code for transferring money from one’s account to the receiver’s account. Their revenue model at this time seems to be only entering into partnership with banks. I am not sure this is a sustainable revenue model as the banks may not see a value add after sometime unless obopay provides other value added services in the interests of the banks with which they are tied up. Also I am not clear on how secure their mode of trafer is. They have a few questions to answer. A similar service is provided by mCheck also. Check out their service here. This one looks impressive.

Soliton’s demonstration of its camera that identifies defective parts in a manufacturing pipeline was very impressive. They demonstrated it by letting the audience draw a circle by hand and let the camera detect whether it was a perfect circle or not (mathematically speaking, since there is no perfect value for “pi” there is no perfect circle yet.). Being a Coimbatorean I have a great admiration for Soliton as it is started by a Coimbatorean and has a development and support centre in Coimbatore too.

Though most of the startups were in Web 2.0 what I was interested was the startups in telecom domain. I went around and collected few materials on Sloka Telecom and Starent Networks. Sloka is working in the WiMax space and Starent is working in solutions for 3G services, IMS and thier unique ground up solution called “Inline services” which enables operators to define value added services inline with the core network elements. This approach is quite different from some of the out of the “box” (box here means the network element) mechanisms that many companies are still struggling to define for customized services.

And finally for the negatives. The ugly face of Bangalore’s infrastructure showed up here too. There were frequent power cuts during the morning sessions and the audience were left to sit in the dark auditorium way too often.