Published Sep 3, 2019

Episode 98: Stefan Tilkov on REST

Stefan Tilkov delves into the transformative power of RESTful principles in enterprise systems, contrasting them with traditional web service standards, while emphasizing REST's alignment with scalability, integration, and efficient HTTP protocol utilization.
Episode Highlights
Software Engineering Radio - the podcast for professional software developers logo

Popular Clips

Episode Highlights

  • Core Principles

    explains that REST, or Representational State Transfer, is a set of architectural principles independent of specific technologies, which can be applied to any architecture, such as Java-based systems 1. These principles are exemplified by the web itself, where HTTP and URIs are based on REST concepts. A key aspect of REST is interacting with resources through their representations, allowing for different formats like HTML or XML 2. Tilkov emphasizes the importance of stateless communication in REST, which restricts statefulness to enhance scalability and reliability 3.

    REST is a set of principles that are independent from any particular technology.

    ---

    The discussion also highlights the flexibility of REST in modeling resources and the emerging best practices in its design.

       

    URI Design

    In RESTful design, URIs play a crucial role by emphasizing nouns over verbs, which contrasts with traditional web service interfaces that often focus on operations 4. illustrates this with an order management system, where each order and customer is identified by a unique URI, promoting a more resource-centric approach 5. This method allows for a more intuitive interaction with resources, as each entity in the system is treated as a resource with its own identifier.

    You have more nouns than verbs. So I will have orders and every particular order will have its own id.

    ---

    Tilkov warns against becoming overly focused on URI design, suggesting that while readable and hackable URIs are beneficial, they should not overshadow the primary goal of creating a functional and efficient system.

       

    Statelessness

    Stateless communication is a fundamental principle of REST, where client-specific information is not stored in sessions but rather as resource state 6. clarifies that while state can exist, it should be identifiable and shareable, such as a shopping cart link that can be bookmarked or sent to others. This approach contrasts with traditional session-based systems that often require complex state management across servers.

    Sessions are totally, totally opposed to REST's core beliefs.

    ---

    By adhering to stateless communication, RESTful systems can achieve greater scalability and simplicity, avoiding the pitfalls of session persistence and enhancing the overall user experience.

Related Episodes