|Quote 1 : “There is no problem in computer science that cannot be solved by an extra level of indirection.”
Quote 2 : “Any performance problem can be solved by removing a level of indirection”
Software engineers do not need quotes to apply concepts. Many of us would have been following them already.
Was familiar with the first quote for a long time now, came upon the second quote yesterday.
For those who are not very sure what indirection means,
In computer programming, indirection is the ability to reference something using a name, reference, or container instead of the value itself.
Thinking about it, it seems both quotes are right.
Q1. Is performance problem not a computer science problem ?
Q2. If yes, should not a level of indirection solve it too ?
Q3. If yes (tell me how), will this solution in-turn end up being a performance problem ?
Q4. When will this looping between Q2 and Q3 end ?
I do have my answers. I will post them later.
Care to give it a thought ?!
(Originally posted on Tue Dec 13, 2005 8:10 pm, in my personal blogs in blogs.adventnet.com. Currently those blogs have been moved to archive and many links do not work already. So, making a copy here. )
Posted: Thu Dec 15, 2005 1:09 am
Seems some were not able to interpret the meaning of indirection, though (as I had said earlier) most of us would have used it for sure.
I will try to speak in terms of how we use it often…
|Executing a piece of code which conforms to some interface, before or after a point in execution, is indirection.
This piece of indirection code can change the values in execution context and also redirect the execution path.
An interceptor in JBoss / NMS-NG or a filter in WebNMS 4 is an example of indirection.
Now for some scenarios of performance problems as mentioned by friends during a chat…
a. Packets from network processed and inserted into database.
b. High volume of data received (from server) in the client, painted onto the client application screen.
c. Server thread processing requests from multiple client’s.
d. Querying database containing a lot of data.
Now let me know how you would normally solve each of these problems ?!
posted by rraj