-
Notifications
You must be signed in to change notification settings - Fork 546
Home
Rest.li is a REST+JSON framework for building robust, scalable service architectures using dynamic discovery and simple asynchronous APIs.
Rest.li fills a niche for building RESTful service architectures at scale, offering a developer workflow for defining data and REST APIs that promotes uniform interfaces, consistent data modeling, type-safety, and compatibility checked API evolution.
Oh, you want to see some code, don't you?
Basically, Rest.li is a framework where you define schemas for your data:
{
"name" : "Greeting", "namespace" : "com.example.greetings", "type" : "record",
"fields" : [
{ "name" : "message", "type" : "string" }
]
}
Write servers:
@RestLiCollection(name = "greetings")
class GreetingsResource extends CollectionResourceTemplate<Long, Greeting> {
public Greeting get(Long key) {
return new Greeting().setMessage("Good morning!");
}
}
And then write clients:
Greeting response = restClient.sendRequest(new GreetingsBuilders.get().id(1L)).getResponseEntity();
System.out.println(response.getMessage());
And get all the benefits of a robust, scalable REST+JSON framework.
If you are not modifying the rest.li source code, you don't need to build rest.li. You can simply depend on the artifacts in the maven central repository
To build from source, please see this page.
Follow us @rest_li
- Promote uniform interfaces through consistent data modeling and REST conventions
- Seamlessly integrate a JSON serializable data layer including a data schema language and generated language bindings
- Provide published interface definitions, generated from server code
- Make calling services dead simple with generated type-safe client bindings
- Versioning with automated compatibility checking
- Simple asynchronous API
- Dynamic discovery with load balancing
- Java 1.6+
- Gradle 1.8+ or SBT 0.13.0+
-
Rest.li
- Getting Started
- Architecture Intro
- Server Framework
-
Client Framework
- Generated client request builders
- RestClient
- [Error Semantics] (wiki/Rest.li-User-Guide#error-semantics)
- Projections
- Projections in Java
- Partial Updates - How to create patches
- Dependency Injection incl. Guice & Spring integration
- Compression incl. snappy, deflate, gzip
- Validation
- Language Support
- Java - Native
- Scala
- Specifications
- Tools
- IDL generation
- Client binding generation
- Gradle build integration
- SBT build integration (provided in a separate github project)
- Data Schema and Templates
- Dynamic Discovery (D2)
- Request/Response (R2)
- Best Practices
- FAQs
- [Checking Out/Building] (wiki/Building-with-Rest.li)
- How to Contribute
Quick Access:
- Tutorials
- Dynamic Discovery
- Request Response API
-
Rest.li User Guide
- Rest.li Server
- Resources
- Resource Types
- Resource Methods
- Rest.li Client
- Projections
- Filters
- Wire Protocol
- Data Schemas
- Data
- Unstructured Data
- Tools
- FAQ