Rest.li - Short Review

Developer Tools

“`

Product Overview of Rest.li

Rest.li is an open-source REST framework developed by LinkedIn, designed to facilitate the building of robust, scalable, and maintainable RESTful architectures. Here’s a detailed overview of what Rest.li does and its key features:



Purpose and Scope

Rest.li is tailored for applying RESTful principles at scale, providing an end-to-end developer workflow that promotes clean REST practices. It aims to standardize developer practices through consistent data modeling, uniform interface design, and type-safe client bindings. This framework is particularly useful for large-scale infrastructure projects where scalability, high availability, and maintainability are crucial.



Key Features

  1. End-to-End Framework: Rest.li offers a comprehensive framework for building RESTful APIs, covering all aspects from data modeling to client-server interactions.
  2. Type-Safe Development: It supports type-safe development using generated data and client bindings, which helps in reducing errors and improving code quality.
  3. Asynchronous and Non-Blocking IO: The framework leverages asynchronous, non-blocking IO through ParSeq tasks and callbacks, allowing for high-performance and efficient resource handling.
  4. JAX-RS Inspired Annotations: Rest.li uses JAX-RS inspired annotations for server-side resource development, making it easier for developers familiar with JAX-RS to adapt.
  5. Scalability and High Availability: Engineered for high scalability and high availability, Rest.li includes optional Dynamic Discovery subsystems that add client-side load balancing and fault tolerance.
  6. API Evolution and Compatibility: The framework provides backward compatibility checking to ensure that all API changes are safe and do not disrupt existing services. It also supports batch operations, partial updates, and projections.
  7. Resource Classes and Annotations: Resource classes define the RESTful endpoints, and annotations help map Java code to the REST interface protocol. Rest.li supports various resource templates for asynchronous and synchronous implementations.
  8. Client Framework: The Rest.li client framework includes `RequestBuilder` classes for creating REST requests and `RestClient` for sending requests to remote endpoints. This framework supports type-safe request builders and various action, finder, and batch finder methods.
  9. API Documentation and Service Catalog: Rest.li features a web UI for browsing and searching a catalog of REST APIs, which includes full-text search, detailed data model and interface documentation, and tools for generating sample requests.
  10. Customization and Extension: The framework provides several extension points, including a filter chain pipeline, allowing developers to customize and extend the functionality of Rest.li according to their needs.


Architecture

Rest.li’s architecture is structured into several layers:

  • Resource Layer: Includes data models and RESTful operations exposed through a uniform interface.
  • T2 Layer: Handles telemetry, coverage, and load balancing, which is optional but provides fault tolerance and scalability for large-scale services.
  • Transport Layer: Abstraction for lateral communication, providing high-performance and non-blocking IO.

In summary, Rest.li is a powerful tool for building scalable and maintainable RESTful APIs, offering a comprehensive set of features that support clean REST practices, high performance, and ease of development. However, it is worth noting that LinkedIn is currently migrating from Rest.li to gRPC due to the latter’s better performance, broader language support, and robust community.

“`

Scroll to Top