Understanding the technicalities of "Classroom Proxy"

Classroom - Proxy

I am sure we all remember our college days very well.

While we were in your college we all would have been a part of a very interesting phenomenon called as Proxy wherein some one would have given a proxy for your in your class or you giving a proxy for someone in the class.

The talk of proxy brings a notorious smile on all our faces.

So let’s see how good were we wrt giving proxies?

Can we think “What was the technical objective behind a person giving a proxy for his friend? or in other words what was a person trying to achieve while he was giving a proxy for his friend in the class”.

Technically speaking

You as a proxy in the class was trying to make the client (your teacher) believe that the target object (Your friend who is absconding) is in the same address space (Class room) although he is not.

Or can we say that as a proxy the person was enabling location transparency.

Also let’s think about “What do we technically do to make sure that the proxy was success?”

Lets say your professor takes the roll call and calls for Roll Number 10 …

As can be seen from the figure Roll No 10 is absconding … he is somewhere … but definitely is currently not there in the class.

But still someone says “Yes Sir” for Roll Number 10…. Looks like there is a Ghost in the Class … that precisely Roll No 11.

Now we all know it was Roll No 11 who said “Yes Sir” … but why was the teacher not able to recognize the same?

Its because Roll No 11 had exactly mimicked the voice of his friend.

But why did Roll No 11 mimic the voice of this friend ?

That because he presumes that his teacher is not looking at the students and only recognizes the students by their voice or in other words while taking the roll call, the teacher identifies every student by a voice based interface.

I hope you all will agree no one will dare giving a proxy if the teacher is looking at each one of you, if that was the case the only way for your proxy to work out, roll number 11 had to wear a mask, which looks exactly the same like roll no 10 because the teacher in this case identifies every student by his physical interfaces.

So the first prerequisite for any proxy to be a success is, the proxy should have the same interface as that of the object it is trying to hide.

So in this case Roll No 11 said “Yes Sir” exactly in the same voice as his friend Roll no 10 , so the teacher is aware that roll no 10 is in the same address space (class).

Since the teacher is aware that Roll number 10 is present in the class, he says “Roll no 10 I asked you for specific question the answer of which is only known to Roll Number 10.”

So now what happens next ?

If there is no answer , the teacher will come to know that Roll Number 10 is not there in the class and he will come to know that a proxy was given previously.

So how do you make sure that proxy never fails?

So when the teacher asked a specific question to Roll Number 10, if Roll Number 11 can somehow give the answer to the teacher in the same voice as that of Roll Number 10, the teacher will continue to believe that Roll No 10 is there in the class.

In my days when I used to attend my college this was not possible, but today its very much possible.

Lets say Roll Number 10 and 11 has a Cell Phone and roll number11 knows roll number 10s number. So while the question was asked, if Roll number 11 makes a call to Roll Number 10 and gets the answer from him and passes it back to the teacher in the same voice, your proxy becomes a success.

So the second prerequisite which a proxy has to satisfy, is that the proxy should always have the fully qualified address of the hidden object.

If both these prerequisites are satisfied, your proxy will become a success.

We are discussing the Proxy Design Pattern which is a way to enable location transparency based distributed communication.

 
Hemant Jha
Founder - VPlanSolutions
Researcher, Trainer

www.VPlanSolutions.co.in