Overcoming the Challenges of Building a Real-time Architecture for Audience Engagement

PinIt

To provide the real-time experiences that users crave today, companies need to implement an event-driven architecture (EDA) system.

Organizations are beginning to realize the value of live audience engagement. In particular, live streaming — broadcasting video content to many users simultaneously over the internet in real time — is taking off. The live streaming industry is expected to increase from $70.5 billion in 2022 to $330.5 billion by 2030.

Live streaming offers a great way to connect with audiences authentically through shared, live experiences. Organizations have primarily used blogs and social media to deliver their messages. With live streaming, they get closer to their customers and receive instant feedback, helping to lift brand affinity. Meanwhile, customers enjoy communicating with organizations during live streams — through interactive features like chat, emoji reactions, polls, Q&A, quizzes, and gamification — as they appreciate the chance to share their opinions with the company. More than 80% of individuals would rather watch a live video than read a blog post.

As more organizations attempt to engage with their audience in real time, it’s important to implement the right technology architecture. To satisfy audience demands, engagement has to be immediate and predicated on low-latency real-time communication. Engineering teams should consider event-driven architecture (EDA) to build such features.

See also: How Events and APIs Enable Modern Real-Time Applications

EDA: Foundation for Audience Engagement

EDA is designed to handle data that needs to be quickly processed to help deliver a positive user experience, meeting the demands of today’s audience engagement. With EDA, a system doesn’t have to constantly poll for event changes, as it notifies the application code when an event of interest occurs.

EDA is often based on a publish and subscribe (pub/sub) model that supports popular audience engagement features. An event publisher sends messages when a state change occurs, such as the delivery of chat messages, and a subscriber receives them. Typically, a dedicated broker rests between a publisher and subscribers, and the broker sends notifications at high volume to consumers across many different devices. A broker also records events. Consumers can access the event stream at any time, where they can read the most recent message or process a series of messages from the last time they checked the stream.

Technical Challenges of Building a Real-time Architecture

Building a real-time EDA is complex as there are challenges to overcome with message integrity, performance, availability, and reliability. Let’s discuss these challenges and what needs to be considered to succeed.

Message integrity

In an EDA, lost, duplicated, or out-of-order messages can lead to a bad user experience. While users will encounter unstable connections, they don’t believe losing messages while their connection drops is acceptable. Once they reconnect, they expect the app to send any missed messages without duplicating those already processed. EDA needs to use at-least-once delivery. This is when a broker requires a consumer to acknowledge the message received. It will send the message again if it doesn’t receive a response from the consumer.

However, if the consumer received the message but the acknowledgment got lost, any recent messages are now duplicates of the original. To make message duplication acceptable, an EDA needs to use idempotent messages that can be processed multiple times without changing the system after the first time. An EDA can also use an exactly-once processing guarantee to identify and trash duplicate messages. To handle out-of-order messages, a typical approach is for an EDA to use unique identifications to order messages.

Performance

Network performance is essential to achieving successful audience engagement. The quality of a live stream will be below standard if there is high latency, which is the time it takes for data to reach its destination. And it’s increasingly important to consider performance if an organization has a global audience or if it hosts users in areas with poor internet infrastructure.

Organizations should keep data as near to the users as possible to attain low latency when building an EDA via managed data centers and edge acceleration points. However, it’s not enough to just reduce latency. Latency variance or lag also needs to be low to ensure predictability. There’s also a correlation between server performance (processing speed, hardware used, available RAM) and latency. Organizations need to increase server layer capacity and reassign load to avoid a congested network and server overrun.

Availability

A real-time EDA must be highly available to handle the influx of data from a flood of high-volume engagements across the network. When engaging an audience through live streaming, it’s hard to plan, and provision ample system capacity as audience size is unpredictable. If the system lacks capacity, there will be queuing delays, bottlenecks, network congestion, and instability.

Under a significant load, organizations need to do more than set up a failover situation to meet uptime requirements. They need to manage capacity. They need to scale out to quickly handle millions of connections without pre-provisioning. To ensure a network can meet this demand, organizations should monitor the following metrics: the global percentage of operating load, the elasticity and distribution of that load, and the maximum number of connections and throughput.

If a load exceeds thresholds, organizations need to have steps in place to automatically add more capacity. Organizations can also optimize network load by minimizing the amount of data transferred. They can reduce message size by sending only the changes to data instead of entire payloads.

Reliability

Reliability is critical. An organization will suffer reputational damage if its live stream stops working. A real-time EDA for audience engagement has to continue to operate even if a component fails.

To be fault-tolerant, organizations should have multiple components capable of maintaining the system in case some components are lost. When one or more components fail, the remaining components must support the service independently. Organizations need to understand how many regional failures can be tolerated. If one region goes offline with a failover to another, there must be sufficient capacity to absorb the additional traffic, even under peak loads. Redundancy ensures continuity of service amid infrastructure failures.

Meet the demand for real-time audience engagement

Live audience engagement is exploding as organizations attract users to events at an unprecedented scale. To provide these real-time experiences that users crave, companies need to implement an EDA system. While they can build a custom EDA system to initially launch a service, as they scale, they’ll be burdened with the technical challenges of message integrity, performance, availability, and reliability. To avoid these issues, they should turn to a third party to build a foundational EDA system, allowing them to focus their time on developing audience engagement features that will delight their users.

Matthew O’Riordan

About Matthew O’Riordan

Matthew O’Riordan is CEO and co-founder of Ably, a Realtime Experience Infrastructure provider. He has been a software engineer for over 20 years, many of those as a CTO. He first started working on commercial internet projects in the mid-1990s, when Internet Explorer 3 and Netscape were still battling it out. While he enjoys coding, the challenges he faces as an entrepreneur starting and scaling businesses are what drive him. Matthew has previously started and successfully exited from two tech businesses.

Leave a Reply

Your email address will not be published. Required fields are marked *