Chapter 5. Case studies, part 1

 

Chapter 14 from Netty in Action by Norman Maurer and Marvin Allen Wolfthal.

This chapter covers

  • Droplr
  • Firebase
  • Urban Airship

In this chapter we’ll present the first of two sets of case studies contributed by companies that have used Netty extensively in their internal infrastructure. We hope that these examples of how others have utilized the framework to solve real-world problems will broaden your understanding of what you can accomplish with Netty.

Note

The author or authors of each study were directly involved in the project they discuss.

14.1. Droplr—building mobile services

Bruno de Carvalho, Lead Architect

At Droplr we use Netty at the heart of our infrastructure, in everything from our API servers to auxiliary services.

This is a case study on how we moved from a monolithic and sluggish LAMP[1] application to a modern, high-performance and horizontally distributed infrastructure, implemented atop Netty.

1 An acronym for a typical application technology stack; originally Linux, Apache Web Server, MySQL, and PHP.

14.1.1. How it all started

When I joined the team, we were running a LAMP application that served both as the front end for users and as an API for the client applications—among which, my reverse-engineered, third-party Windows client, windroplr.

Windroplr went on to become Droplr for Windows, and I, being mostly an infrastructure guy, eventually got a new challenge: completely rethink Droplr’s infrastructure.

14.2. Firebase—a real-time data synchronization service

Real-time updates are an integral part of the user experience in modern applications. As users come to expect this behavior, more and more applications are pushing data changes to users in real time. Real-time data synchronization is difficult to achieve with the traditional three-tiered architecture, which requires developers to manage their own ops, servers, and scaling. By maintaining real-time, bidirectional communication with the client, Firebase provides an immediately intuitive experience allowing developers to synchronize application data across diverse clients in a few minutes—all without any backend work, servers, ops, or scaling required.

Implementing this presented a difficult technical challenge, and Netty was the optimal solution in building the underlying framework for all network communications in Firebase. This study will provide an overview of Firebase’s architecture, and then examine three ways Firebase uses Netty to power its real-time synchronization service:

14.3. Urban Airship—building mobile services

As smartphone use grows across the globe at unprecedented rates, a number of service providers have emerged to assist developers and marketers toward the end of providing amazing end-user experiences. Unlike their feature phone predecessors, smartphones crave IP connectivity and seek it across a number of channels (3G, 4G, WiFi, WiMAX, and Bluetooth). As more and more of these devices access public networks via IP-based protocols, the challenges of scale, latency, and throughput become more and more daunting for back-end service providers.

Thankfully, Netty is well suited to many of the concerns faced by this thundering herd of always-connected mobile devices. This chapter will detail several practical applications of Netty in scaling a mobile developer and marketer platform, Urban Airship.

14.4. Summary

This chapter aimed at providing insight into real-world use of Netty and how it has helped companies to solve significant networking problems. It’s worth noting how in all cases Netty was leveraged not only as a code framework, but also as an essential component of development and architectural best practices.

In the next chapter we’ll present case studies contributed by Facebook and Twitter describing open source projects that evolved from Netty-based code originally developed to address internal needs.