Finally shipping handsets running BlackBerry 10 was an important milestone for the BlackBerry team — but if you listened carefully to what CEO Thorsten Heins said when he introduced the Z10 handset, the important phrase was "mobile computing". When a company is almost the last to the smartphone party (Jolla and the Firefox OS are still waiting in the wings), isn't it a bit rich to say "we intend to lead the move from mobile connection to mobile computing"?
Maybe not, when you think about the QNX operating system underneath BB10 and the direction that the computing market is going.
If you're frustrated by the Windows 8 interface on your desktop, it may not be much comfort to know that this is an operating system for the next decade, when a desktop PC or a touchless laptop is soon going to look as quaint as a canal boat. Surface with Windows RT, iPad, Chromebooks — they're all ways of trying to make computing truly mobile. Microsoft is trying to squeeze Windows down to run on tablets and (with the NT kernel-powered Windows Phone 8) on smartphones. Apple and Google have their own approaches. RIM, meanwhile, is going to take its BlackBerry OS and push it into a wider range of mobile computing devices.
I'm not just talking about a reprise of the PlayBook, although I'm sure that's coming (the PlayBook was a way for RIM to work out its development process for working on top of QNX one step at a time — first the core OS and the browser and the start of the user interface, then core app development, before switching to building the phone bit of the smartphone). What comes next is connecting your phone or your tablet to a lot more than email, websites, Twitter and Angry Birds.
"Soon we will give you ways to connect your mobile experience not just to other people but to the world around you," Heins promised. "You will be in the middle of things and you will be connected to the internet of things; this is what being connected will mean in the future."
"We have created a platform that's able to work with other machines, to extend you beyond mobile devices to a car, to your home, to a healthcare system, to wherever you are."
Mobile computing needs a different approach from taking a fundamentally desktop-bound operating system and dragging it around with the equivalent of a very long invisible Ethernet cable. A truly mobile OS must expect you to switch between online and offline modes on a regular basis (tube and subway carriages are a great way to tell how mobile your OS actually is today).
Apps that use async and await patterns and cache then sync data and documents are part of this. But what RIM has in QNX is an operating system that can connect to and disconnect from remote resources in a very neat way, and very responsively.
QNX and Transparent Distributed Processing
QNX has a lot of advantages, such as memory protection that runs every program in its reloadable process (including drivers, networking and the file system) with adaptive partitioning that guarantees critical processes always have enough CPU time. It also has a microkernel (called Neutrino) that's so small it can fit in the CPU's L1 cache, so the messages it passes are very fast.
The larger messages that microkernels pass to compensate for the small amount of code that's in the kernel are what usually slow them down compared to larger 'monolithic' kernels (like Windows, Linux and the Mach kernel on which Mac OS is based), which can do more in the kernel and thus pass smaller messages. And because you don't have milliseconds to spare when you're shutting down a nuclear reactor, for example, switching between processes happens in fractions of microseconds (and that can happen while another process is still sending a message, because the kernel can rearrange messages that arrive out of order).
Putting so many parts of the operating system in separate processes rather than in the kernel means QNX has to be very good at creating and managing shared memory (otherwise applications wouldn't be able to use the file system, given it's running in its own process).
Combine efficient messages, isolated processes and good shared memory management, and you get an interesting side effect: QNX doesn't care very much about where a process or a file is.
The official name is Transparent Distributed Processing. Dan Dodge, the architect of QNX, explained it like this (back in 2010 when the PlayBook was introduced): "If you put another computer say, in Paris, as long as you have a way of passing messages to the kernel, they will flow. The file system sees an open command and it doesn't need to know this computer is in Paris; all it needs to know is 'do you have the permissions to retrieve the file?' And it's not just the file system. You could have a SQL database over here, or a Bluetooth driver. In effect your system becomes entirely distributed."
This isn't like running apps that can connect to a service or relying on protocols like DLNA and UPnP: if you've got QNX at both ends, the remote device just becomes part of the operating system — so it's available to any process and any app that wants to use it, as if it was always on your device.
And what could you do with that? "You end up with an architecture that is incredibly distributed. So imagine this architecture with multiple PlayBooks, and the ability to have gaming or various types of communications in a way that's seamless. We do all this reliably, we call it plumbing — we do all the plumbing for you; you don't need to worry about it. In fact, we do discovery as well. If you have multiple PlayBooks in the home on a home network they will discover each other and you can build applications to use that."
That's how the PlayBook Confetti prototype at Mobile World Congress last year worked. You could put several PlayBooks down on the table at a meeting and have them find each other. The confetti part let you pass shapes from screen to screen to play with while you were waiting for everyone to turn up — and to check all the tablets have found each other. When the meeting kicks off, you can just swipe a document from one tablet to another to share it, or show your presentation on everyone's screen at the same time.
But this isn't limited to treating another PlayBook or BlackBerry handset as if it's part of the same file system as your device. Take your phone into the car and the music on your phone could show up in the media player on the dashboard (many car makers use QNX — it's what the OnStar system is built on, for instance). Sit down in front of a TV with a QNX-powered set-top box and you could use your standard remote control to play videos that live on your phone (or in a streaming cloud service that your phone connects to). The temperature controls on your thermostat could show up on your phone whenever you're in the house — and not be in the way when you're at work.
Incidentally, you can use the CPUs and the network connections on both connected devices to get faster processing and more bandwidth if you want. Want to run something demanding on your phone? Do it using the processor in your tablet as well. Connect to what you need, use it and then walk away and let QNX worry about what's still available and what's not.
The only limit is developers' imaginations — and the number of embedded systems that use QNX. As that includes cars, trains, industrial robots, heart monitors, guitar pedals and the camera on the ISS as well as nuclear power plant controls it's just as well QNX has excellent security. However, it definitely gives BlackBerry a head start on connecting to the Internet of Things. Thorsten Hein's boast about mobile computing might well be part of the future.