Saturday, June 26, 2021

Reuse, Modularity and Composability in Software

A recent discussion with a team member pointed me in a direction that the word API as used today seems to be squarely targeted at what I understand as Web APIs or REST APIs. Upon continuing that discussion further I understood that there is no clear demarcation in the definitions for certain terminologies.  I am compelled to write this post to clarify my understanding of this topic to myself and perhaps this may be useful to others as well. This post is necessarily very long so that all connected terms are defined in one place. I have had a few discussions around "Reuse", "Modularity" and "Composability" with my friends and team members in the past and I attempt to lay down the terminologies and the definitions from the standpoint of "Reuse", "Modularity" and "Composability". All of these are connected to decomposition.

Wednesday, April 10, 2019

Why Multithreading

Why Multithreading? My previous post was more about what is multithreading and we contrasted that with what is multitasking.

Most of the hardware in use today be it processors in servers, laptops or those in mobile phones are all equipped with multicore processors. It is only natural to expect then that software written to run on these devices make full use of the hardware and it capabilities. Shouldn’t the performance gains be double if the same tasks which was earlier running on a single core processor is now running on a dual core processor? Actually in practice this is not the case. Extracting good performance out of a dual core processor needs programmer intervention. It is not something that happens automagically. This is explored clearly in this article in Dr. Dobbs journal “The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software” by Herb Sutter that appeared in Mar 2005. I have provided a link to the republished article.

Sunday, April 7, 2019

Overview of Multithreading

Multithreading is the ability to run multiple threads in a program at the same time. A thread is the smallest unit of execution for the purposes of this discussion. A larger unit of execution than threads that one should be aware of is a task from which stems the word Multitasking. Tasks are also termed processes. We could call this multiprocessing at the OS level, but this word is also used to refer to hardware supporting multiple processors. The often confusing terms such as 'Parallel', 'Concurrent', and 'Synchronous' are related to Multithreading and Multitasking.

Knotted Threads

Photo by Francesco Ungaro from Pexels