From Modules to Microservices: Luca Lusso on Scaling Drupal for the Modern Web

by Akanksha Mishra on

A conversation on leveraging Symfony, Go, and AI to push Drupal's boundaries in cloud-native environments

Image
Luca_Lusso

Luca Lusso is a seasoned Drupal developer and the Lead Developer at SparkFabrik, where he specializes in creating cloud-native applications on platforms like Kubernetes and AWS. With over 15 years of experience in the Drupal ecosystem, Luca's journey began in the mid-2000s when he discovered the flexibility and power of Drupal as a content management system. Since then, he has become an integral part of the Drupal community, contributing as a module maintainer and speaker at international conferences.

Luca is the maintainer of the WebProfiler module, a tool that enhances developer efficiency by providing critical insights into Drupal site performance. He also co-maintains the Monolog and XHProf modules, further solidifying his reputation as a key contributor to the Drupal project. At SparkFabrik, Luca leverages his deep knowledge of Symfony and Go to build robust, scalable applications, integrating cutting-edge technologies with Drupal to meet the demands of modern web development.

A passionate advocate for open-source software, Luca is always exploring new ways to push the boundaries of what Drupal can achieve. His recent work includes pioneering efforts in integrating AI tools with Drupal, a topic he frequently discusses at DrupalCon and other industry events. Luca’s expertise and innovative approach make him a thought leader in the Drupal community and a driving force behind the evolution of the platform.

Introduction

Few platforms have remained as influential and adaptable as Drupal in the world of web development today. At the heart of this dynamic ecosystem are the dedicated developers who continuously push the boundaries of what Drupal can achieve. One such individual is Luca Lusso, Lead Developer at SparkFabrik and a pivotal figure in the Drupal community. With over 15 years of experience, Luca has not only witnessed the transformation of Drupal but has actively contributed to its growth through his work on key modules and his commitment to open-source innovation.

In this exclusive interview, Luca shares his journey from discovering Drupal in the mid-2000s to becoming a leading voice in the community. He discusses the challenges and triumphs of maintaining widely-used modules like WebProfiler, Monolog, and XHProf, and offers insights into the future of Drupal, especially as it intersects with emerging technologies like AI. Whether you’re a seasoned developer or new to the world of Drupal, Luca’s perspective offers a wealth of knowledge and inspiration.

Join us as we delve into the mind of a developer who is not only shaping the present of Drupal but also helping to define its future.

Luca Lusso

Q: Luca, could you please share your journey with Drupal? How did you discover it, and how has your engagement evolved over time?

Luca Lusso: My journey with Drupal started around 2006 or 2007 when a friend and I were working on a project for our university. We were tasked with developing a website for a course and needed a CMS. Having tried other systems before, we decided to give Drupal a shot, specifically Drupal 5. From that point on, I was hooked. I joined a Drupal agency in Italy, where I worked for about 12 to 14 years, using Drupal for every website I developed. I transitioned through Drupal 6 and 7, and when Drupal 8 was released, I began contributing to the community by developing custom modules and attending conferences.

My first talk at a DrupalCon was in Barcelona in 2017, and I'll be speaking again at the upcoming DrupalCon in Barcelona this year. My journey with Drupal has been a continuous evolution, and I’ve never felt the need to switch to another CMS because Drupal has always provided everything I needed.

In 2023, I also published a book with Packt Publishing about Drupal theming. It’s called “Modernizing Drupal 10 Theme Development”, and its primary focus is to dive deep into how Drupal builds an HTML page, starting from the building components of a page up to how to use the new SDC framework or completely decouple a front-end using NextJs.


Q: What made you stick with Drupal and not switch to any other content management system?

Luca Lusso: There are several reasons why I’ve stayed with Drupal. First and foremost, it’s open-source, which is important to me. Drupal also offers the flexibility to write custom modules, extending its functionalities to meet specific needs. The modular system, which has been a part of Drupal since the beginning, was particularly intriguing and useful. While I haven’t used other CMSs extensively, I find that Drupal’s extensibility suits my needs perfectly as a developer. I prefer working with code to extend features rather than relying on a web UI or interface, and Drupal’s framework allows me to do just that.

Q: As the maintainer of the WebProfiler module, could you explain how this tool helps developers improve the performance of their Drupal sites?


Luca Lusso: I developed WebProfiler when Drupal 8 was released, building on the Symfony framework, which is the foundation of Drupal 8. Symfony has a useful toolbar that displays various performance metrics at the bottom of web pages, such as the number of database queries and request details. I saw the potential for Drupal developers to benefit from similar insights, so I started adapting the Symfony profiler for Drupal.

WebProfiler collects extensive data specific to Drupal, such as information on views, forms, cache hits or misses, and more. Initially, WebProfiler was part of the Devel module but later became a standalone module due to the complexities introduced by different Symfony versions across Drupal versions. WebProfiler is strictly a development tool, not meant for production environments, as it can impact performance. However, it’s invaluable for developers to understand how Drupal works internally by providing a graphical interface for various metrics.

Luca Lusso


Q: You also maintain the Monolog module. How does integrating Monolog improve logging in Drupal compared to the default logging system?

Luca Lusso: Drupal’s default logging capabilities are limited to storing logs in a database or sending them to a system like Syslog. Monolog, on the other hand, is a powerful PHP library developed by Jordi Boggiano, the creator of Composer. Monolog allows you to send logs to various destinations, such as Slack channels, file systems, or even format logs in JSON. 

The Monolog module for Drupal essentially replaces the standard logging system, delegating all logging tasks to the Monolog library. This is particularly useful in complex infrastructures like Docker or Kubernetes environments, where logs need to be routed to standard outputs for collection by log aggregators like CloudWatch. Monolog provides the flexibility that Drupal’s core logging system lacks, making it an essential tool for modern web development.


Q: Given your experience with XHProf, what advice would you give to Drupal developers looking to optimize the performance of their websites?

Luca Lusso: XHProf was once a crucial tool for profiling Drupal websites to identify performance bottlenecks. I contributed to moving the XHProf module from Drupal 7 to Drupal 8. However, the PHP library that XHProf relies on was deprecated for a while, although there are now newer versions compatible with PHP 7 and 8. 

Nowadays, there are more advanced tools available, like Blackfire.io, which offers similar profiling capabilities in a more robust way. While I no longer contribute to the XHProf project due to time constraints, I believe that modern tools like Blackfire.io provide a more comprehensive solution for performance analysis in Drupal.


Q: As a lead developer at SparkFabrik, how do you see Drupal fitting into the landscape of cloud-native applications?

Luca Lusso: At SparkFabrik, we specialize in cloud-native applications, with every Drupal instance running on a Kubernetes cluster across various cloud providers like AWS, Google Cloud, and Alibaba Cloud. Drupal’s flexibility makes it particularly well-suited for cloud-native environments. For example, we can easily replace Drupal’s internal services with cloud-native alternatives, such as routing Drupal assets to an AWS S3 bucket or logging to a cloud-based system using Monolog.

Drupal’s architecture allows for seamless integration with cloud services, making it easy to deploy and manage in a cloud-native infrastructure. This flexibility is one of the key advantages of using Drupal in a modern, cloud-based environment.

Luca Lusso


Q: You’ve worked with technologies like Drupal, Symfony, and Go. How do you see these technologies complementing each other in modern web development?

Luca Lusso: Symfony is essentially a part of the Drupal ecosystem since Drupal 8, which allowed us to replace a lot of legacy code with Symfony components. At SparkFabrik, we use Go for microservices, particularly for specific functions that are deployed as AWS Lambda functions or similar. 

In the context of a Drupal website, Go can be used to delegate certain tasks to microservices. For example, in a talk I gave at a DrupalCon, I demonstrated how to use Go for price calculation in a Drupal Commerce setup, showcasing how Drupal and Go can work together in a microservices architecture.


Q: What trends or innovations in the Drupal ecosystem are you most excited about?

Luca Lusso: I’m particularly excited about the Starshot project and the concept of "recipes" in Drupal. These are emerging topics that I look forward to learning more about at the upcoming DrupalCon in Barcelona. 

In my work at SparkFabrik, we often deal with clients in industries like education and pharmaceuticals, where they need to spin off multiple similar websites that require personalization. The idea of recipes, where you can install multiple pre-configured setups on a single Drupal site, is very appealing for these scenarios. Additionally, I’m excited about the potential of integrating AI with Drupal, particularly in the context of search and semantic analysis.


Q: Looking ahead, what skills or technologies do you think will be crucial for Drupal developers to learn in the next few years? Do you think AI will replace coding?

Luca Lusso: I don’t think AI will replace coding entirely, but it will certainly change how we code. Tools like GitHub Copilot are already assisting developers by generating code snippets, and the integration of AI into development workflows will only increase. 

For Drupal developers, it’s crucial to understand how to integrate with AI systems, especially as more projects emerge that bring AI capabilities to the Drupal ecosystem. There’s an ongoing project called AI on Drupal.org that’s working on this integration. As AI becomes more embedded in the development process, understanding how to work with these technologies will be a key skill for the future.