Building Real-Time Experiences: A Developer’s Guide
Unicorn, and more recently, decacorn. We’ve all heard the term—companies valued at $1 billion and $10 billion respectively. Looking at these companies over the last decade, there’s a driving force behind them causing them to expand at a massive scale, and in a bigger picture, reshaping the way humans interact. And that driving force is delivering real-time experiences to connect people to each other and allowing them to interact instantaneously.
What’s Causing This Change in Real-Time Experiences?
There are three driving forces behind the rise of real-time experiences, across every industry and vertical.
In 2022, there were 6.6 billion smartphones spread across the globe and internet connectivity has never been more affordable. People are online, and they’re online everywhere. And that always-on, ubiquitous, and affordable connectivity, combined with a powerful smartphone, has led to a change in user expectations—the second driving force behind real-time experiences.
The Hollywood Operating System. We grew up with Hollywood movies, and for a long time, the computing we saw in those films didn’t match the computing experiences we had in real life. We had old, clunky computers with slow Internet connections and we could email one another. Meanwhile, in movies, we saw blazing-fast location tracking, powerful AI, tiny yet robust devices, and immersive gaming environments.
But today, we’ve been trained to expect a computing experience to operate on par with Hollywood. Our mobile devices, laptops, and embedded, smart devices deliver those real-time experiences we once saw as fiction. Take a look at the last few Mission Impossible films—all the cool things they do, they’re using iPads and Surface tablets. It’s no longer sci-fi, it’s real.
Users have come to expect reliable, secure, and blazing-fast connected real-time experiences. For collaborative, multi-user, or data-intensive apps, users anticipate it to mimic a real-life interaction. The location of a taxi on a map should reflect where it actually is. When a reading changes on an IoT sensor, that data should be updated the moment it happens. No matter how many users are in a chatroom, when one user sends a message, it should reach the recipients immediately. In a connected world, nobody has time to wait.
So with people online everywhere, and their expectations incredibly high, how do we deliver these real-time experiences?
Software Infrastructure for Real-Time Experiences
If software is eating the world, software infrastructure is digesting it. It’s software infrastructure that’s empowering us to build these real-time experiences at scale. And it’s growing more secure, more reliable, and high-performant.
Let’s take a quick look back into how we got here.
When the Web took off in the mid-90s, we built billions of dollars of value around connecting, protecting and scaling the Web. It was built entirely around request/response applications. An end-user presses a button, data is sent to a server, the server responds. The infrastructure under the hood delivered solitary online experiences. This was the way we did things until around 2010.
Real-time experiences don’t work this way. Request/response doesn’t satisfy the high user expectations for an always-online world. Devices are constantly emitting and consuming data. Location-streaming, chat messages, smart device readings, immersive games—it starts with an always-on connection and streams massive amounts of data across the globe. It’s critical that data is constantly streamed and consumed at all times.
Hence, a revolution in infrastructure is driving us from traditional request/response to streaming.
There are 13.1 billion devices online today, not just smartphones and laptops, but IoT sensors, smart cars, servers, and wearables as well. In moving to a streaming infrastructure, we’re looking for a way to connect these devices, deliver data bidirectionally between them, and control them. That revolution is creating a ton of new technologies, and even more acronyms: MQTT, WebSockets, long polling, CoAP, XMPP, etc.
Unfortunately for us, with all these introductions comes confusion. You start with an acronym, and soon after you have a giant core infrastructure to build, manage, and you might only be solving the problem right now, not six months from now.
How to Not Build Real-Time Experiences
The appeal of black box vendors, ie., “we provide the best chat solution,” “we provide the best mapping solution,” “we provide the best dashboard solution,” is appealing at first. You start embedding black box solutions into your app, and you’ve got the functionality up-and-running quickly. Great!
However, the more black box services you add, the more dedicated connections you have. And that number can quickly grow. With that, there are a number of considerations that come with it:
Are the services compatible with one another?
Are they draining battery or consuming bandwidth at different rates?
Are you locked into that vendor?
Can you bring your data into your backend for analysis, processing, and storage?
Now you’ve got a mishmosh of technologies powering your app. But this is how it’s always been—we find new, better ways to build software. Remember how we used to build websites? It took almost a decade to determine the components we needed to build a scalable web app—LAMP, MySQL, Angular, React, etc. The same thing happened with mobile apps. And now we’re required to deliver scalable real-time experiences. So what are the components?
Core Components of a Real-Time Experience
You need a low-cost, highly-reliable data delivery infrastructure that’s secure and compliant. It must be able to keep an open connection to any number of devices and send messages at high-speed back and forth. This lets you send things like:
On-the-fly computing saves precious time, bandwidth and resources for both the client and the server. The last thing you want to do is stick all that business logic deep in your servers, and you definitely don’t want to do it with a black box solution. You want to be able to add business logic when and where you need to.
Alerts and notifications
User/Device Presence Detection
Presence provides a real-time state of a user or device at a given time, and recognizes when users are added or removed. It’s a lesser-known, but vital part of a real-time experience. Presence powers real-time features like:
The ability to hook in other best-in-class microservices and APIs provide both the flexibility in integrations and the potential for innovation beyond black box solutions.
Mobile push notifications
Looking Forward: Building Fully-Featured, Scalable Real-Time Experiences
So how can you build the most scalable, most reliable, and most secure real-time experiences of today and tomorrow? Rather than being locked into a number of black box solutions, PubNub provides the freedom to build real-time interactivity and combine best-in-class solutions.
Outside of the real-time functionality that we provide, we also offer dedicated support and comprehensive security measures to ensure that user data is always protected. Additionally, PubNub live events customers can receive a dedicated Event Support Agent throughout the entirety of their event, plus real-time operational dashboards to ensure continuous reliability.
It took 10 years to figure out the web. We just figured out mobile. And now we’re figuring out real-time experiences. And these real-time experiences are creating compelling opportunities for new types of businesses. Having completely turned industries like taxis, exercise equipment, and meal delivery on their heads, nobody knows what real-time experiences will revolutionize next.
But one thing is clear: real-time experiences are eating the world, and tomorrow’s business leaders will be the ones embracing them and powering past the competition.
Want to learn more about how you can build interactive real-time experiences? Request a personalized demo.