Friday, 12 May 2017

Google’s new Mobile OS Fuchsia, gonna completely replace Android in sometimes

Google’s Android platform is the most widely used mobile operating system in the world. In fact, it’s so popular right now that it’s beyond difficult to imagine a future without Android. Of course, people at one point felt the same way about early smartphone platforms like Symbian and BlackBerry OS, which have been almost completely wiped from the face of the Earth at this point. Some day, iOS and Android will be distant memories as well.

If there’s one thing companies like Nokia and BlackBerry taught us, it’s that companies at the top can only stay at the top if they’re constantly preparing for the future. So, rather than rest on its laurels and sit pretty while Android continues to dominate the smartphone market, Google is already hard at work on a fresh new mobile platform called Fuchsia, which may some day completely replace Android.

Dig Through:

I decided to dig through open source to examine the state of Google’s upcoming Fuchsia OS. For anyone unfamiliar, Fuchsia seems to be the replacement for both Android and Chrome OS. Fuchsia is the actual name of the operating system, while Magenta is the name of the kernel, or more correctly, the microkernel. Many of the architectural design decisions appear to have unsurprisingly been focused on creating a highly scalable platform. Google is unsurprisingly bringing up Fuchsia on a number of platforms, including the humble Intel NUC. ARM, x86, and MIPS bring-up is exactly what you would expect for an Android successor, and it also seems clear that this platform will run on Intel laptops. More on this later.

My best guess is that Android as an API and runtime will live on as a legacy environment within Fuchsia. That’s not to say that all development of Android would immediately stop, which seems extremely unlikely. But Google can’t push two UI APIs as equal app frameworks over the long term: Mojo is clearly the future.  Ah, but what is Mojo? Well it’s the new API for writing Fuchsia apps, and it comes from Chromium. Mojo was originally created to “extract a common platform out of Chrome's renderer and plugin processes that can support multiple types of sandboxed content.” It seems to have enabled Android apps in Chrome OS, and now it will serve an even more extensive role as the developer API for Fuchsia.

Programming Languages in role!

Mojo in Fuchsia features intriguingly extensive language support. C/C++, Dart, Go, Java, Python, and Rust all have bindings to Mojo. I am guessing that C/C++ is for native development, Go is for networking, Java is for Android(?), Python is for scripting, and Rust is for writing portions of the kernel. (Or perhaps Rust's usage is minimal, suggests a commenter on Hacker News.) Mixing and matching languages aside, the main UI API is based on, yes, Dart.  Flutter is an existing Google widget framework for apps written in Dart, and it has been repurposed to become the UI framework for Andromeda. Flutter includes a series of Material Design widgets and was engineered to render apps up to 120fps.* I imagine Andromeda’s standard UI components will look similar if not identical to those of Android. A physically based renderer, Escher, is apparently being used to render, well, material elements and shadows in a high quality manner.

I have very strong reservations about Dart as the language of the primary platform API, but it’s best to wait for the fully revealed details before forming an opinion. The reason for Dart is obvious, however: to enable a cross-platform app framework. The pitch will clearly be that developers can write a Flutter app once and have it run on Fuchsia (Google's Flutter SDK), Android, and iOS with minimal extra work, in theory. (Flutter does not target the web.) Even if Fuchsia is its full replacement, Android will be a separate developer target for many years given its gigantic installed base.

Fuchsia's actual app run-time is called Modular, “a post-API programming model that allows applications to cooperate in a shared context without the need to call each other's APIs directly." To do this it uses Mojo inter-process communication (IPC) messages, which are exchanged via low-level primitives in the form of message pipes (small amounts of data), data pipes (large amounts of data), and shared buffers.

I'm may not technically correct to explain, how the various languages interface over these IPC calls, and what exactly that enables. The IDL used is the Fuchsia Interface Description Language (FIDL), “an encoding format used to describe [Mojo] interfaces to be used on top of Magenta message pipes. They are the standard way applications talk to each other in Fuchsia.” Right now at least, only C/C++, Dart, and Go have supported bindings. Dart is thus the main platform language. (My understanding is that Go is not exactly ideal for writing UI apps.)

Courtesy: techspecs, bgr, flutter

No comments: