Sunday, 25 March 2018

What's Next.. "One App"?


Yeah, I hear you! That’s a confusing name “One App”, what would that mean? Sorry I didn’t find a better title (after reading this blog, you might be able to suggest a better one). A disclaimer first, this is a debatable blog, as I am questioning the very basis of the software industry. Different people might have different opinions on this and I am open to differing views and ideas.

My vision for “One App” is the future of programming, a world where there won’t be a need to build different versions of an application, specific to a particular operating system or device. Just “one app” would work seamlessly across any OS (Unix or Win), any device (IoT or Server), any platform (on-premise or Cloud). A truly portable application. This is easier said than done! Only OS vendors know the technical difficulty in supporting such a feature. Microsoft took a very brave initiative with their vision of “One Core”, to bring the same app on all devices. Also with Microsoft's release of WSL (Windows Subsystem for Linux) this doesn't look like a far-off dream. Inspired by that, other vendors might embrace the thought and have “One Kernel” for all apps (whether they are built on Unix, Windows, Mac or any other OS). I think that's next in software development and the industry will be embracing the concept of "one app" in the future.

Today we have tens of operating systems, running on hundreds of devices (from small IoT devices, mobiles to big servers), thousands of frameworks/languages to write code, and innumerable applications built using these. When you visit the Wikipedia page on operating systems, it lists hundreds of operating systems for different devices.


Back to Basics
For a minute, let us forget about all these and flashback in time to early 1970s (when first personal computers came into existance) and rethink about 3 core questions

1.  What is the need of software?
2.  What are applications for?
3.  What is the purpose of an Operating System?

I know these are really silly questions, but sometimes rethinking about such basic questions point to the right answers.

Before getting into this debate, let me give you a background of why I landed on this topic. In last 12 years of my career, I’ve written code for 8 different operating systems. When I was in Paris, I worked for a company called Systar. They had a product which was deployed on all Windows and major Unix flavored operating systems. At least 40% of the code base was duplicated to make the app run on different operating systems. For every new feature, we had to generate and test builds on all versions of Windows, Linux distributions (Suse, Debian, Redhat), Solaris, IBM-AIX, HP-UX. Before every major release, there would always be something which worked everywhere except on one OS. Especially HP-UX and IBM-AIX. Whenever it failed on those two operating systems, it made me cry. It is a real pain!! I am sure every developer who has experienced this will agree with me. At that time I really wished there was just one operating system, it would have made my work 10 times easier.

Cut the Crap!

So back to those 3 questions...

1) What's the need of software?
To me, the basic purpose of software is to facilitate human activities. It is a way to make our work easier which might be as simple as writing a letter or as difficult as programming a robot.

2) What are applications for?
It's just a way to make a machine do that work for us. In commercial terms, it is the business logic.

3) Why do we have operating systems?
To convert human written code into machine language and run it on a piece of hardware (can be mobile or PC or anything).

It's as simple as that! Then what's the need of so many operating systems (embedded systems and RTOS will be exceptions). But most of the commercial applications which we use in day to day life need not be written with so many operating systems in mind.


Is that not an overkill for the basic purpose of a software?

In my opinion, it is. And over a period of years, people did realise this and started working around this very problem of "software sprawl". Its high time to cut the crap and concentrate on making app development simple. That's the core bit which runs the business and generates all the money.


Technical Feasibility (Common Ancestor)

From technical point of view, most of today’s general purpose operating systems forked out from the same ancestor Unix, which was developed in 1969 at Bell Laboratories. So, they adhere to POSIX standards.




So Linux, Solaris, Android, HP-UX, IBM-AIX have a common ancestor which is Unix and they all followed POSIX standards. Based on that, implementing an “OS translation layer” shouldn’t be an impossible task in these operating systems. Mac OS X and iOS also came from the common roots (of unix-type OS), so they must be having many similarities deep in the OS layers. Windows sounds like a totally different breed, but it turned out that NT Kernel was designed to support POSIX from the beginning. So, that's not totally alien either.

Considering all these facts, it looks like "OS translation layer" isn't a weird idea after all. Again, it is easier said than done. But it doesn’t seem to be an impossible task if OS geeks really want to make it happen.


Same app across different devices? May not work!

While discussing this topic with my colleague and highly reputed blogger Remko Weijnen; he rightly pointed out that generalizing software to work on all platforms might compromise its functionality. For example, if an app is written for PC platform in mind, then just to make it generic so that it runs on a mobile device as well; architects might have to miss out on few of its PC-specific features. This is very true, as a server-based app will have a totally different need when compared to a mobile type of application. So, why should business compromise on functionality just to make it run across all devices?



Same app across similar devices? Yes please!

I totally agree with Remko's view point, device specific compromize should not hinder development of an app. I think portability across different operating systems is more important than portability across different devices. Most of the general-purpose apps are written to address a particular market sector. For example, an app developed for mobile phones would have same features and functionality whether it is deployed on Android phone or iPhone or Windows phone. So in my view, the mobile OS vendors should address this issue at the OS level instead of putting the burden on app developers to develop different versions of the same app for three different mobile platforms. Would it not be great if Android had a “Windows subsystem" and an "Apple subsystem” which supports running Windows and Apple apps on Android. That would be so much efficient than thousands of apps being developed for 3 operating systems.

Similarly, an app developed for a personal computer would use same peripherals whether it is built on Linux or windows. The business logic remains the same. All major operating systems have similar drivers like graphics drivers, networking, disk access, sound dirvers, etc.). What if Linux uses EXT filesystem and Windows uses FAT; after all they are writing to the disk. Implementation nitty-gritties shouldn't matter to a high level application. Then why do developers need to release different versions of the app for various operating systems?

Who's the winner?

Whoever succeeds in building a decent enough "translation layer" to map system calls from other operating systems to their own OS calls, will reap the rewards. I termed it a "Cosmopolitan OS" (which will be in my next blog). Just like a cosmopolitan city contains people coming from other countries and cultures; these cosmopolitan operating systems would accommodate apps built (born) on other operating systems (other countries), written in different languages/frameworks (different cultures).


Cosmopolitan Operating Systems


As I mentioned earlier, MS took a great initiative by including “Windows subsystem for Linux” (WSL) in the OS itself. I’ve been experimenting with WSL recently (I know it was released a while back, but it's never late to try something new :). Again, it is easier said than done; only Microsoft guys know how difficult or practically feasible it is to add a module for “operating system translation” to support an app built for Linux; and deployed on Windows. I'll write my thoughts on "Cosmopolitan OS" once I am done with my WSL experiments. I am sure Apple and Linux guys won't be lagging behind anymore, they must be experimenting in their research labs too. In the below figures, I've highlighted my views on  the business advantage and technology benefits of "One App"; which look very promising. So this is definitely worth a shot!

In the interest of keeping this blog short, I'll write about my views on tech and business benefits in my subsequent blog posts. Below are my broad thoughts on specific areas that this concept might benefit.

Business Benefits (to OS Vendors and customers)




Technology Benefits





That's all for now. Sorry for such a lengthy blog. To summarize it all; my idea of "One App" is that one application should work seamlessly across all operating systems for a specific device/market segment (like one app for all mobiles irrespective of the OS installed on it). If operating system vendors take up the responsibility of application portability, then app developers can cut the crap and focus only on their "business logic" which is what apps are meant for after all!

Stay tuned as I continue my experiments on Cosmopolitan OS. Also please feel free to leave your comments, I would love to hear your views on this.


Priya Saxena.

No comments:

Post a comment