Friday, November 7, 2008

Whoz more territorial

Many of recent incidences inspire me to write this article. Just a couple of days back I saw my room mate in hunt of something. He resembled like a lioness looking for a prey; that might be an exaggeration but something close to that. And when I asked him what was he doing, I came to know that he was hunting for roaches. The only reply I had was....Dude..!!!
However later I realised, it was not only him. Many do that. Even I did that. We find roaches, ants and other easy to kill insects, so kill dem. What is it that triggers us to do that. Is it the fear..not all times actually. Not everyone are afraid of a Roach, even though they kill it. Is it the superiority that I am bigger and you are smaller that leds us to kill it and feed our ego or is it just being territorial..this is my place, u made the mistake of entering it and now pay the price by getting killed for it.
This led me to think who is more territorial. They say crocks, hippos are the most territorial animals. But even the animals with no 'brain' at least give you a warning when you are about to surpass and try to drive you out when you do that. Killing is also what they do if you don't understand their warning. And humans having 'brain' normally do understand that it doesn't want us to go close. Taking this warning we back off.
The point is since we got brains we can understand that the animal doesn't want us to enter its territory. Should we expect the same from animals. But they don't have brains. How will it understand that it should not surpass our territory. Ultimately cock-roach is something that gets attracted to stale food. Its not its fault if we don't do dishes regularly. It is bound to come. And its not its fault that it reproduces very fast.
I know we are not going change so easily. However, cock roaches are one of the world's oldest citizens and we should show them some respect for their survival skills at least.

Thursday, November 6, 2008

Basic TCP/IP Layering Concept-2

The previous post dealt with the issue of how the packets traverses the layers in TCP/IP stack protocol. In this post, let us look into the reason of layering.

Why do we require layering. To reason this out let us consider what would we have if we didn't have layers. I can think of an alternative where in we have a single header and the payload. We could send this from source across the intermediate nodes to the destination. However, the issue then would be of disorganization. When the sender sent a packet on the path, the intermediate node will have to go through the entire header and then decide where to send the packet. Instead of layered concept where it strips only link layer header and checks the network layer header and sends it ahead.

Again at transport layer, the processing entity strips of link layer and network layer header and just goes through transport header. Thus we can see that layering has kind of divided the work amongst various processing entities.

The major advantage of this division of processing is that it gives rise to layers which are independent of each other. Consider we want to make some changes to the routing protocol ie. we want to modify the procedure of forming forwarding tables. Without layering, when we have a single header, we will have to deal with the whole header and accordingly the entire method of processing the header will also get modified. Notice that routing protocol should not change anything within Transport protocol, even then while modifying routing protocol it is getting affected.

This is where layering becomes helpful. With layering, we just have to modify the network layer protocol without worrying about the transport. This division gets us this independence amongst protocols and organization.

To illustrate the layering we can consider assembly line. Every machine performs its task without worrying about the machine ahead of it. Similarly in layering every layer will perform its assigned task without worrying about other layers.

I hope I was able to clear the layering concept.

Wednesday, November 5, 2008

Basic TCP/IP Layering Concept-1

After two heavy human tendency interpretation posts, I wanted to continue with a light one based on TCP/IP stack. This is the way I interpret TCP/IP.

NOTE: This article is intended for newbeis in Computer Networks with basic understanding of protocols used at various layers. This might help you understand the physical significance of TCP/IP.


Although there are various articles available on net, the reason I decided to write about it is none actually explain the layering and its need. I try to reason out layering here.

I have been studying it for almost 2-3 years now. However, I wasn't sure about significance of layering in TCP unless I worked on a full-fledged project which was a couple of years back. Still on with another one within same field.

The layering concept in TCP/IP is inspired from ISO-OSI model. Though OSI reference stack was never actually implemented per se, it definetly had laid a basic structure for other stacks to develop. TCP/IP is one of those.

TCP/IP basically consists of following layers:

Application Layer (equivalent to Application, Presentation, Session in OSI)
Transport Layer
Internet Layer (equivalent to Network Layer in OSI)
Link Layer

TCP/IP is called so because because it uses Transmission Control Protocol(TCP) at Transport Layer and uses Internet Protocol(IP) at Internet Layer. Note that Internet and IP are different. IP is the protocol which is used to connect various internetworks. Internet is World Wide Web(WWW).

Getting to the layering. This is how the process works: Starting from the application layer down, every layer will attach its own header to the payload. When it reaches lowest layer the data would be sent in form of bits on the path towards destination. Lets say it reaches some intermediate node (router) in the way. This router will strip the link layer header and will have network layer header to deal with. It will look at the destination address in the header and decide where to forward the packet next. It will then again attach the link layer header and forward the packet on the path to its destination. Evry other router in the way will do the same to identify where the packet should be forwarded until it gets to its destination. Once in the destination TCP layer will perform its function and hand it over to appropriate application.
Thus the packet on its journey from source to destination passes through these layers several times.

The reason people went for layering is explained in part 2.

Sunday, November 2, 2008

I have Y but I want -Y

Why is it that we always long for something which is opposite to what we have. Why are we not satisfied with what we have. I experience this a lot. When I have a fight with my sister or mom for remote control of TV I wish man…I shud have had a separate TV but now when I have my laptop with access to loads of entertainment, I use it less frequently. When I have got lot of free time I think of getting busy and get exhausted and when im actually busy I feel that now I need a break.

If we plot it on a graph where X is actual state and Y is state that we long for then I find that I am at point (-x, -y) wishing to make transition from -y to y. And as soon as I do that transition, the whole graph gets inverted and I again find myself in the same quadrant with same point (-x, -y). Thus i never find myself with a positive X value. The trick is to be in the first quadrant at some point (x,y) where both X and Yare positive.

Mabbe this illustrates relativity. We always long for something we don’t have presently and as soon as we get it, we might long for something else which we might or might not have had it in past.

However, I noticed that when I make a transition from actual state to state which I want to be in ie. from -Y to +Y I kind of like it in the beginning. Everything is new, fresh experiences are easy to come across. It is only once it starts getting monotonous that I start disliking it. Newer experiences are difficult to find. Naturally,, first part of a task is basic and therefore contains lot of easy concepts. But as we go ahead amount to be learnt gets lesser rather difficult to encounter at the first place and once you encounter it its difficult to analyze.

I would like to narrate a recent example. When I was asked to develop a new application. I first started with the basics which often are understood with some effort but as I delved into actually developing it more hitches are encountered. First question is what is to be done and then how it is to be done. This is the most vulnerable phase. When you are not sure what to do you are most susceptible to boredom. I might just try variations of same thing and it starts getting monotonous.

But how do we avoid this monotonicity. Mabbe by doing something new and reaching checkpoints of the new task as quickly as possible instead of dragging it for a while.
So the key is to get a head on start on any new thing and then maintain the momentum of that start by trying to get to checkpoints as fast as we can. Head start will encourage to go in deeper enabling to explore different angles.

However it might not always be possible to get a head start and get over with things quickly. In that case we might just have to hold our nerves and have the determination to do the job at hand. This is the difficult part though. As impatient as I am, this is really the difficult part. But practice makes man perfect. So only thing we can do is try and practice.