Giovanni Barillari discusses his Rust-based web server, Granian, offering better performance and consistency. He explores transitioning from Ruby on Rails to Python, the evolution of Emmett from Granian, benefits of Neo4j, integrating Beanie and Mongo engine for web development, and the unique features of Granny. The conversation covers HTTP handling with Rust, enhancing Python's capabilities, and future plans for server enhancements.
Read more
AI Summary
AI Chapters
Episode notes
auto_awesome
Podcast summary created with Snipd AI
Quick takeaways
Grannian server offers superior performance and consistency compared to existing options, powered by Rust and supporting synchronous/asynchronous apps with RSJI protocol.
Emmet web framework simplifies development with all-in-one solution, customized template syntax, and standard features like ORM and authentication.
RSJI protocol provides flexibility for asynchronous web apps over ASGI, optimizing thread usage and adapting to specific needs like content streaming.
Deep dives
Grannian, the production-ready web server for Python applications
Grannian is a relatively new server that offers better performance and consistency than many existing options. Powered by Rust, it supports both synchronous and asynchronous applications, including a new protocol named RSJI. Grannian aims to optimize the performance of Python applications and provides unique features such as controlling the HTTP interface level and specifying thread modes for efficient processing.
Emmet, the powerful web framework designed for inventors
Emmet is a versatile web framework inspired by Ruby on Rails, with a focus on simplicity and flexibility in web development. Initially released under a different name and now set for its 10th anniversary, Emmet streamlines web application development by offering an all-in-one solution, integrating standard features like ORM, templating, authentication, and sessions. Emmet's unique template syntax based on plain Python code, devoid of a specific template language, allows for extensive customization and ease of development.
Comparing ASGI and RSJI protocols for Python applications
The ASGI and RSJI protocols offer different approaches to handling asynchronous web applications. While ASGI relies on dictionaries and awaits message sending and receiving, RSJI focuses on synchronous and asynchronous methods depending on the underlying task. RSJI provides more flexibility by adapting to specific needs like streaming content and optimizing thread usage. The choice between ASGI and RSJI depends on factors like IO boundness and desired performance.
Enhanced performance and scalability with Grannian's thoughtful features
By offering advanced functionalities like specifying SSL certificates, process names, threading modes, and loop optimizations, Grannian aims to tailor diverse deployment scenarios for optimal performance. Additional capabilities such as lifetime management and access log enhancements are in the pipeline to provide granular control and monitoring for Python applications using Grannian.
Future directions for Grannian and potential broadcast messaging capabilities
Upcoming developments for Grannian include the implementation of broadcast messaging features within the RSJI protocol, fostering seamless communication between processes and Granian servers. With a continued focus on innovation and optimization, Grannian aims to empower Python applications with cutting-edge functionalities while maintaining simplicity and efficiency in web server operations.
So you've created a web app with Python using Flask, Django, FastAPI, or even Emmett. It works great on your machine. How do you get it out to the world? You'll need a production-ready web server. On this episode, we have Giovanni Barillari to tell us about his relatively-new server named Granian. It promises better performance and much better consistency than many of the more well known ones today.