Best of RailsAugust 2024

  1. 1
    Article
    Avatar of systemdesigncodexSystem Design Codex·2y

    Airbnb's Migration from Monolith to Services

    Airbnb transitioned from a monolithic Ruby on Rails application, known internally as the 'monorail', to a Service-Oriented Architecture (SOA). Initially suitable for agile development, the monolith became difficult to manage as the company grew. The new architecture consists of data services, derived services, middle-tier services, and presentation services, each with specific functionalities. The migration of reads involved dual reads and response comparison, while writes used a shadow database. Key lessons from the migration include investing in common infrastructure, simplifying service dependencies, and recognizing that moving to services involves cultural as well as technical changes.

  2. 2
    Article
    Avatar of rubyflowRuby Flow·2y

    Terminalwire

    Terminalwire allows developers to ship command-line applications for web apps without needing APIs by streaming terminal commands over WebSockets. It simplifies infrastructure, reduces workload, and is compatible with existing web frameworks. Integrating with Terminalwire involves straightforward setup, and updates are seamlessly deployed to the server without requiring client-side changes.

  3. 3
    Article
    Avatar of communityCommunity Picks·2y

    Rails is Good Enough

    Rails, despite not being the most popular framework, remains a solid choice for building SaaS applications. The post highlights Rails' monolithic nature, maturity, and productivity, arguing that its convention over configuration approach simplifies development. The author shares a personal journey of choosing Rails over fragmented JS frameworks, citing its long-standing reliability and community support as key advantages.

  4. 4
    Article
    Avatar of rubyflowRuby Flow·2y

    Database Partitioning by Example

    Database partitioning involves dividing a large table into smaller, more manageable pieces called partitions, improving query performance and maintenance operations. The post provides an example of partitioning a large 'product_views' table in PostgreSQL based on the 'created_at' column using Ruby on Rails. It explains how to create partitions, insert data, and run queries efficiently, showcasing significant performance improvements after indexing partitions.

  5. 5
    Article
    Avatar of thoughbotthoughbot·2y

    Wrap your dependencies

    Using third-party libraries and tools can speed up development, but wrapping them in functions, modules, or classes can make your code more maintainable and flexible. Wrapping allows for easier updates, consistent interfaces, and effective error handling. Examples include sanitizing HTML across different environments and using HTTP clients with consistent error handling.

  6. 6
    Article
    Avatar of thoughbotthoughbot·2y

    Ruby on Rails is great for AI

    Many AI projects today utilize third-party or open-source services through HTTP API calls, a task Ruby excels at with its wide range of available gems. Developers might mistakenly use Python for AI tasks in their Rails apps, adding unnecessary complexity and cost. While Python is better suited for creating custom machine learning models, Ruby's capabilities can often meet the needs more efficiently.

  7. 7
    Article
    Avatar of thoughbotthoughbot·2y

    Why CTOs are choosing Hotwire and Ruby on Rails

    Clara is a pre-seed stage marketplace for in-home senior care, currently going through the YCombinator accelerator. They chose Ruby on Rails and Hotwire for their project due to the ability to minimize context switching and use a single codebase for both the web and mobile platforms. The CTO, Ian Gillis, highlighted the efficiency and adaptability of these technologies, especially important for early-stage companies needing to pivot quickly. Additionally, he noted a rising trend towards single codebases driven by economic considerations and new frameworks like HTMX and Hotwire exceeding user expectations without multiple codebases.