• Dev Notes
  • Posts
  • Evolution of Java Usage at Netflix

Evolution of Java Usage at Netflix

Good Morning! Today we’re talking about Java usage at Netflix, including their transition from the "backend for frontend" (BFF) pattern to GraphQL Federation, as well as their Java version upgrades. We also introduce ClangQL, a new open-source tool that allows developers to query and explore their C/C++ code using SQL-like syntax, and highlights Disney's latest advancements in animatronic technology for their upcoming Tiana's Bayou Adventure ride.

Evolution of Java Usage at Netflix

Netflix is predominantly a Java company, with all their backend software built using the Java programming language. However, their approach to utilizing Java has evolved significantly over time to address changing requirements.

Initially, Netflix employed the "backend for frontend" (BFF) pattern. Groovy scripts acted as mini-backends for each device's user interface, performing requests to multiple backend services (fanout). RxJava and reactive programming facilitated efficient handling of these fanouts.

More recently, Netflix has been transitioning to GraphQL Federation. They now have Java microservices called Domain Graph Services (DGSs), each with:

  • A GraphQL endpoint

  • A schema definition

A central federated gateway combines the schemas from multiple DGSs into one unified schema that any device can access.

Advantages of GraphQL Federation:

  • Eliminates API duplication across devices

  • Supports different devices flexibly via field selection

  • Removes backend work for UI developers

Java Upgrades: Netflix has also been upgrading their Java versions. They moved from Java 8 to Java 17, providing a 20% improvement in CPU utilization. Currently, they are testing Java 21 for new features like virtual threads and an updated garbage collector (ZGC).

Read More Here

Querying Your C/C++ Code with SQL

Working with large C/C++ codebases can be really tough. It's hard to get a good overview and understand what's going on. ClangQL is a new open-source tool that lets you query and explore your C/C++ code using SQL - something developers are already familiar with.

ClangQL is built on the GitQL SDK, which means you can run SQL-like queries directly on your source code files, instead of database tables. You can select info about functions, methods, their parameters, return types, and more. The queries support filtering with WHERE, doing counts/aggregations with COUNT, and even searching for text patterns using LIKE.

Here are some example ClangQL queries:

SELECT * FROM functions
SELECT DISTINCT name AS function_name FROM functions  
SELECT COUNT(name) FROM functions WHERE return_type = "int"

ClangQL is written in Rust and uses LLVM/Clang to parse your C/C++ into an abstract syntax tree that can be queried with SQL. It has nice features like pagination, outputting JSON/CSV, and analyzing queries. With its SQL-style querying, ClangQL makes it way easier to statically analyze big C/C++ codebases.

Check Out on GitHub

💻 Tech News

New Disney animatronics

Disney has unveiled its latest robots for the upcoming Tiana's Bayou Adventure ride, and they are truly incredible. These robots, which bring characters from "The Princess and the Frog" to life, are the result of over 60 years of Disney's work in creating special effects and attractions.

The robots move so smoothly and naturally that they seem almost alive. Characters like Princess Tiana, Mama Odie, and Louis the Alligator look like they've stepped right out of the movie. Their faces, including their lips and eyes, move in a very realistic way, making it easy to forget they are machines and not real people.

What's really impressive is that Disney has moved away from using screens and projections, which can look a bit odd, and has instead created physical robots that are much more immersive and convincing. This shows how much progress has been made in robotics and engineering, especially for theme parks.

Read More Here

🔥 More Notes

Youtube Spotlight

But what is a GPT? Visual intro to transformers | Chapter 5, Deep Learning

Was this forwarded to you? Sign Up Here

Join the conversation

or to participate.