- Rust 93.9%
- TypeScript 2%
- C 1.7%
- Go 1.1%
- JavaScript 0.6%
- Other 0.6%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
Some checks failed
Continuous Integration / Grammar Tests (push) Has been cancelled
Continuous Integration / Library Tests (Minimal Features) (push) Has been cancelled
Continuous Integration / Library Tests (Default Features) (push) Has been cancelled
Continuous Integration / Library Integration - Caddy Build (push) Has been cancelled
Continuous Integration / Library Integration - Nginx Build (push) Has been cancelled
Continuous Integration / Library Integration - Express Build (push) Has been cancelled
Continuous Integration / Library Format Tests (push) Has been cancelled
Continuous Integration / Generate Docs (push) Successful in 1m2s
Signed-off-by: Will Hawkins <hawkinsw@obs.cr> |
||
| .cargo | ||
| .github/workflows | ||
| cpp | ||
| devdocs | ||
| integrations | ||
| macros | ||
| parser | ||
| src | ||
| tests | ||
| .gitignore | ||
| build.rs | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
Brooks: An Implementation of the Metadata Expression Language
The Metadata Expression Language (MEL) is one piece of the wider puzzle being put together by the IETF's CDNI working group. The CDNI working group's goal is to
The goal of the CDNI Working Group is to allow the interconnection of separately administered CDNs in support of the end-to-end delivery of content from CSPs through multiple CDNs and ultimately to end users (via their respective User Agents). (From the IETF)
The MEL is the language by which CDN operators can specify whether, when and what metadata to apply to requests that they serve. It is used, especially, in the specification of the CDNI Processing Stages Metadata.
Try It Out
There are a few different ways to try out the library!
MEL Explorer
At the heart of Brooks is a compiler, analyzer and interpreter for MEL. In order to increase awareness about the power and utility of MEL, there is an online "compiler explorer"1 which can be used to explore how MEL expressions are parsed and analyzed:
Other Live Demos
There are several other demo deployments of the Brooks library running live and they are all documented in the peer repository that hosts the source code for tool that provides an interface between peer CDNs who want to exchange interconnection metadata. You can find it at
https://github.com/cerfcast/brooks-ics
Goals
We want Brooks to
- Be a reliable, correct library for parsing, manipulating and interpreting MEL.
- Demonstrate the utility of MEL and CDNI Processing Stages (by using Brooks in an HTTP server).
- Be a place to experiment with novel mechanisms for using commodity hardware (e.g., GPUs) for processing MEL.
Of course, those goals are all very aspirational at this point!
Features
The library has optional features that can be enabled/disabled depending on the environment being used to host the library.
Integrations
The library has built-in integrations with several popular web servers, and more are coming soon! If you would like to let us know which web servers to prioritize integrating, please open an issue!
Nginx
Brooks can be built with support for exposing the Processing Stages interpreter to nginx. Select the nginx
feature when importing this library to select that feature. When the nginx feature is enabled, the library will
configure your environment for building an Nginx module that uses brooks to handle HTTP requests/responses
according to HostMetadata. To do that, the library will
- clone the Nginx source code into the library's
nginx/nginxdirectory. - configure the Nginx build system
- to build the brooks Nginx module, and
- to install the built
nginxbinary intonginx/install.
The brooks Nginx module source code is in integrations/nginx/module.
Additional documentation for this feature is coming soon and will be located in the ./integrations/nginx/module directory.
Caddy
Brooks can be built with support for exposing the Processing Stages interpreter to Caddy. Select the caddy
feature when importing this library to select that feature. When the caddy feature is enabled, the library will
configure your environment for building a version of Caddy that contains a module so that it will use brooks to
handle HTTP requests/responses according to HostMetadata.
To do that, the library will
- build some "shim" shared libraries (to solve the chicken/egg build problem between the Caddy module and the Brooks Library).
- use go's build system (and package manager) to build a version of Caddy with the module builtin.
The brooks Caddy module source code is in integrations/caddy/module.
Additional documentation for this feature is coming soon and will be located in the ./integrations/caddy/module directory.
TypeScript/Express
Brooks can be built with support for exposing the Processing Stages interpreter to code written in TypeScript
and running in Deno. Select the express feature when importing this library to select that feature.
When the express feature is enabled, the library will have interfaces exposed to integrate
with the TypeScript libraries in integrations/express/.
Additional documentation for this feature is coming soon and will be located in the ./integrations/express directory.
Documentation
The core of Brooks is a Rust library for parsing and manipulating expressions of the MEL. The most up-to-date documentation for the library is available online at
https://cerfcast.github.io/brooks/brooks_lib/index.html
Contributing
We would love your contributions! More information on how to contribute will be coming soon!
In the meantime, if you want to get started helping immediately, please file an issue or contact Will Hawkins.
Open Source is all about community -- we can't wait to have you join the effort!!
-
Yes, we are huge fans of Matt Godbolt and the eponymous
godbolt.orgCompiler Explorer. Yes, of course we named the tool in his honor! ↩︎