Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
by Jeremy Evans This presentation will describe an approach to routing web requests efficiently through the use of a routing tree. A routing tree usually routes requests by looking at the first segment in request path, and sending it to the routing tree branch that handles that segment, repeating until the entire path is processed. At any point while handling a request, the routing tree can operate on the request, for things like enforcing access control or object retrieval from a database, where such behavior is common for the entire branch. In addition to considering the request path, a routing tree also usually considers the request method, and may consider information from the request headers or request body when deciding how to route a request. A routing tree’s request handling is similar to how a file system processes requests for files, where it looks at the first segment of the path, sees if it is a directory, and if so, looks for the rest of the path inside that directory. This presentation will describe what makes routing requests using a routing tree faster and simpler than the routing approaches used by the popular ruby web frameworks. Help us caption & translate this video! http://amara.org/v/GWI8/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
In his presentation at MountainWest RubyConf 2015, Jeremy Evans explores an efficient approach to routing web requests called the routing tree. His discussion covers the evolution of routing techniques in Ruby, detailing the transition from basic CGI to modern frameworks like Rails and Sinatra. The key points of the presentation include: - **Historical Context**: Evans reviews the history of Ruby web frameworks, outlining early methods like CGI and static routing, and detailing how Rails and Sinatra evolved to handle routing through arrays. - **Complex Routing Techniques**: He explains how newer frameworks, such as Rack::Mount and Journey, optimize request handling but also increase complexity. The routing tree concept, derived from the Rum framework, aims to simplify routing while integrating it with request handling. - **Performance Comparison**: Evans presents benchmarking results using his r10k tool, demonstrating that performance varies significantly across implementations. He reveals that while static routing performs best, Roa, his routing tree implementation, offers a balance of speed and memory efficiency, outperforming Rails and Sinatra in larger datasets. - **Code Redundancy and Simplification**: The routing tree allows developers to eliminate redundant code shared among routes, streamlining code structure and maintenance. Evans provides an example contrasting redundant code in Sinatra with a clean routing tree structure, highlighting ease of access control implementation. - **Conclusion and Recommendations**: The adoption of the routing tree approach not only enhances performance but also reduces complexity in code management, making it beneficial for developers. He advocates for Roa as a recommended framework for those interested in leveraging routing trees. Overall, Evans' presentation emphasizes the significant advantages of implementing routing trees to improve the performance and maintainability of Ruby web applications.
Suggest modifications
Cancel