All Projects → ichiban → jesi

ichiban / jesi

Licence: MIT license
Hypermedia API Accelerator

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to jesi

halfred
A parser for application/hal+json
Stars: ✭ 44 (+131.58%)
Mutual labels:  hypermedia, hal
akka-http-hal
HAL (Hypermedia Application Language) specification support for akka-http
Stars: ✭ 18 (-5.26%)
Mutual labels:  hypermedia, hal
Core
The server component of API Platform: hypermedia and GraphQL APIs in minutes
Stars: ✭ 2,004 (+10447.37%)
Mutual labels:  hypermedia, hal
Mercure
Server-sent live updates: protocol and reference implementation
Stars: ✭ 2,608 (+13626.32%)
Mutual labels:  web-api, hypermedia
docker-nginx-http3
Docker image for Nginx + HTTP/3 powered by Quiche
Stars: ✭ 19 (+0%)
Mutual labels:  reverse-proxy
cdn
🚀 ✈️ 🚄 free CDN for everyone who wants to speed his website freely!😄
Stars: ✭ 16 (-15.79%)
Mutual labels:  web-api
hal stm32
No description or website provided.
Stars: ✭ 56 (+194.74%)
Mutual labels:  hal
http-problem
Create problem+json documents with Node.js
Stars: ✭ 18 (-5.26%)
Mutual labels:  hypermedia
MessengerBot-WebAPI
Asp.net WebAPI Template of Facebook Messenger Bot
Stars: ✭ 22 (+15.79%)
Mutual labels:  web-api
docker-varnish
Docker image for Varnish Cache (caching HTTP reverse proxy)
Stars: ✭ 46 (+142.11%)
Mutual labels:  reverse-proxy
wsp
HTTP tunnel over Websocket
Stars: ✭ 85 (+347.37%)
Mutual labels:  reverse-proxy
hyperbole
GNU Hyperbole: The Everyday, Hypertextual Information Manager
Stars: ✭ 111 (+484.21%)
Mutual labels:  hypermedia
InternalSteamWebAPI
Documenting the unofficial and internal Steam Web API
Stars: ✭ 126 (+563.16%)
Mutual labels:  web-api
medium-go-nginx-docker
Use Nginx with Docker to serve a Golang app.
Stars: ✭ 45 (+136.84%)
Mutual labels:  reverse-proxy
arcus.templates
Collection of .NET templates & tooling to get started very easily.
Stars: ✭ 16 (-15.79%)
Mutual labels:  web-api
nginx-proxy
Docker container for automatically creating nginx configuration based on active services in docker host.
Stars: ✭ 28 (+47.37%)
Mutual labels:  reverse-proxy
bowman
A Java library for accessing a JSON+HAL REST API
Stars: ✭ 45 (+136.84%)
Mutual labels:  hal
revp
Reverse HTTP proxy that works on Linux, Windows, and macOS. Made with C++ and Boost.
Stars: ✭ 80 (+321.05%)
Mutual labels:  reverse-proxy
php-serializer
Serialize PHP variables, including objects, in any format. Support to unserialize it too.
Stars: ✭ 47 (+147.37%)
Mutual labels:  hal
spring-hateoas-siren
A library implementing Siren as a custom Spring HATEOAS hypermedia type. Siren is a hypermedia specification for representing entities.
Stars: ✭ 14 (-26.32%)
Mutual labels:  hypermedia

Jesi - a hypermedia API accelerator

Jesi (stands for JSON Edge Side Include) is an HTTP reverse proxy that accelerates your web API by embedding & caching JSON representations.

Getting Started

Install Jesi from GitHub Releases (pick a binary for your platform):

$ curl -L https://github.com/ichiban/jesi/releases/download/v0.2.0/jesi-darwin-amd64 > jesi
$ chmod +x jesi

Then, run it with your backend server:

$ ./jesi -backend http://localhost:3000 -port 8080

Features

Embedding

Jesi understands JSON Hypertext Application Language aka HAL+JSON and can construct complex HAL+JSON documents out of simple HAL+JSON documents from the upstream server. By supplying a query parameter ?with=<edges> with dot separated edge names, it embeds HAL+JSON documents linked by _links as _embeded. (This functionality is also known as zooming)

This will decrease the number of round trips over the Internet which is crucial for speeding up web API backed applications.

Caching

Jesi implements HTTP Caching described in RFC 7234. Every representation including but not limited to HAL+JSON documents is cached and served from the cache on behalf of the upstream server while it's fresh.

Combined with embedding, the resulting HAL+JSON representation is constructed from cached representations and representations newly fetched from the upstream server so that it can maximize cache effectiveness.

When Jesi cache reaches the memory limitation specified by -max command line option, it evicts some cached representations with LRU algorithm.

Example

Let's consider an example of a movie database app. It has resources of a movie Pulp Fiction, roles Vincent Vega and Jules Winnfield, and actors John Travolta and Samuel L. Jackson.

{
  "_links": {
    "self": {"href": "/movies/1"},
    "roles": [{"href": "/roles/1"}, {"href": "/roles/2"}]
  },
  "title": "Pulp Fiction",
  "year": 1994
}
{
  "_links": {
    "self": {"href": "/roles/1"},
    "actor": {"href": "/actors/1"},
    "movie": {"href": "/movies/1"}
  },
  "name": "Vincent Vega"
}
{
  "_links": {
    "self": {"href": "/roles/2"},
    "actor": {"href": "/actors/2"},
    "movie": {"href": "/movies/1"}
  },
  "name": "Jules Winnfield"
}
{
  "_links": {
    "self": {"href": "/actors/1"},
    "roles": [{"href": "/roles/1"}]
  },
  "name": "John Travolta"
}
{
  "_links": {
    "self": {"href": "/actors/2"},
    "roles": [{"href": "/roles/2"}]
  },
  "name": "Samuel L. Jackson"
}

They're connected by _links property - a movie has many roles and a role has exactly one actor.

Movies

To render a view for Pulp Fiction, it has to make requests for the movie /movies/1 and also /roles/1, /roles/2, /actors/1, and /actors/2 for the details. By making a request /movies/1?with=roles.actor, Jesi responds with one big HAL+JSON document with the roles and actors embedded in the movie JSON.

{
  "_links": {
    "self": {"href": "/movies/1"},
    "roles": [{"href": "/roles/1"}, {"href": "/roles/2"}]
  },
  "_embedded": {
    "roles": [
      {
        "name": "Vincent Vega",
        "_links": {
          "self": {"href": "/roles/1"},
          "actor": {"href": "/actors/1"},
          "movie": {"href": "/movies/1"}
        },
        "_embedded": {
          "actor": {
            "name": "John Travolta",
            "_links": {
              "self": {"href": "/actors/1"},
              "roles": [{"href": "/roles/1"}]
            }
          }
        }
      },
      {
        "name": "Jules Winnfield",
        "_links": {
          "self": {"href": "/roles/2"},
          "actor": {"href": "/actors/2"},
          "movie": {"href": "/movies/1"}
        },
        "_embedded": {
          "actor": {
            "name": "Samuel L. Jackson",
            "_links": {
              "self": {"href": "/actors/2"},
              "roles": [{"href": "/roles/2"}]
            }
          }
        }
      }
    ]
  },
  "title": "Pulp Fiction",
  "year": 1994
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].