Step 41: Interprocess Communication Affects Application Response Time ~ Randy Stafford
This is the 41st Step towards gaining the Programming Enlightenment series. If you didn’t learn the 40th Step, read it.
What is Inter-process Communication?
It’s a mechanism where Operating System allows the different processes to communicate or manage shared data.
Response Time of Inter-process Communication?
Each inter-process communication contributes to some latency for the response time.
Higher the number of inter-process communication, more is the response time.
Why high response time is bad?
Response time is critical to software usability. It’s very frustrating to wait for software to respond to user interaction. Think about rendering in website, how long should it take for you to display a webpage. If it takes more than a couple of seconds, user will shy away from using the service.
How to reduce the number of remote inter-process communication?
- One strategy is to apply the principle of parsimony, optimizing the interface between processes so that exactly the right data for the purpose at hand is exchanged with the minimum amount of interaction.
- Another strategy is to parallelize the inter-process communications where possible, so that the overall response time becomes driven mainly by the longest-latency IPC.
- A third strategy is to cache the results of previous IPCs, so that future IPCs may be avoided by hitting local cache instead.
TL;DR Be mindful when designing application for the number of inter-process communications in response to each stimulus.
Go to 40th Step
Go to the 42nd path.
References:
- 97 things Every Programmer Should Know ~ Git Book
- 97 Things Every Programmer Should Know ~ Paperback
- Interprocess communication ~ wiki