Skip to content

meraki-analytics/kernel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kernel - A plug & play Riot API proxy server

Kernel is built on top of orianna, a Riot API wrapper and framework for working with API data. The API Kernel provides mirrors the Riot API, and allows users to proxy their API calls through Kernel to avoid "leaking" their Riot API key to end users.

Kernel is built using the Thorntail application server with JAX-RS and RestEasy.

Kernel is licensed under the MIT License.

Features

Kernel also includes the following built-in features:

  • Automatic rate limit handling for the Riot API
  • Configurable strategies for handling Riot API errors (retry, expontential backoff, return null, etc)
  • A configurable pipeline for automatic caching of API results
    • Plug & Play support for several common databases in the works here
  • Support for MessagePack serialization in addition to JSON

API Differences from Riot API

Kernel is intended to mirror the Riot API exactly. The Riot API, however, is distributed accross regional platform domains to split computation load and localize content distribution (e.g. na1.api.riotgames.com or euw1.api.riotgames.com). Kernel supports serving all platforms from a single server instance using the platform query parameter, which is available for every API endpoint in Kernel. All Riot API platforms are supported by this feature. A default platform can be configured to direct requests without a platform query parameter to that platform.

Example: the Riot API call https://na1.api.riotgames.com/lol/summoner/v4/summoners/by-name/FatalElement becomes http://localhost/lol/summoner/v4/summoners/by-name/FatalElement?platform=NA1 for Kernel.

How to get it

Kernel can be obtained and installed either through Docker or by building the application locally using Maven.

Docker

Kernel docker images are available on Docker Hub. If you're unfamiliar with docker, here's how to run them on your local machine:

If you want to change some configuration settings in Kernel, you can edit the kernel-config.json file from the configuration you chose, then add a volume entry to the docker-compose.yml file to load your config into the container.

Example: original compose file | compose file with custom kernel-config.json

Building Locally with Maven

  • Install JDK 8 or higher
  • Install Maven
  • Clone the Kernel source code locally & navigate to the folder
  • Run mvn clean package to build the application. Some maven profiles are available to bundle datastore dependencies in with the application. Use mvn clean package -P some,profile,names to activate them
  • From your Kernel source folder, copy target/kernel-thorntail.jar wherever you'd like to serve Kernel from
  • From your Kernel source folder, copy target/kernel-config.json wherever you'd like to serve Kernel from
  • Set your KERNEL_CONFIGURATION_PATH environment variable to point at your kernel-config.json
  • Set your RIOT_API_KEY environment variable to your Riot API Key
  • Run java -D"swarm.http.port=8080" -D"java.net.preferIPv4Stack=true" -D"java.net.preferIPv6Stack=true" -D"java.awt.headless=true" -jar kernel-thorntail.jar to launch Kernel.

Questions & Contributions

Feel free to send pull requests or to contact us via GitHub or Discord.

Disclaimer

Kernel isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends. League of Legends and Riot Games are trademarks or registered trademarks of Riot Games, Inc. League of Legends © Riot Games, Inc.

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •