{"id":13807121,"url":"https://github.com/swisspost/gateleen","last_synced_at":"2026-02-11T10:05:54.494Z","repository":{"id":4281005,"uuid":"52609528","full_name":"swisspost/gateleen","owner":"swisspost","description":"Gateleen is a RESTful middleware toolkit for building API gateways","archived":false,"fork":false,"pushed_at":"2025-05-04T10:47:06.000Z","size":5549,"stargazers_count":78,"open_issues_count":35,"forks_count":36,"subscribers_count":13,"default_branch":"develop","last_synced_at":"2025-05-04T11:29:12.777Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/swisspost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-26T14:24:58.000Z","updated_at":"2025-05-04T10:47:11.000Z","dependencies_parsed_at":"2024-02-22T12:30:20.851Z","dependency_job_id":"1400f1ee-e693-49f3-bda4-65f22e001ee9","html_url":"https://github.com/swisspost/gateleen","commit_stats":null,"previous_names":["swisspush/gateleen"],"tags_count":188,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisspost%2Fgateleen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisspost%2Fgateleen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisspost%2Fgateleen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/swisspost%2Fgateleen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/swisspost","download_url":"https://codeload.github.com/swisspost/gateleen/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254046214,"owners_count":22005556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T01:01:21.178Z","updated_at":"2026-01-16T23:26:35.102Z","avatar_url":"https://github.com/swisspost.png","language":"Java","funding_links":[],"categories":["Middleware","API网关"],"sub_categories":[],"readme":"# [\\_] Gateleen\n\n[![Build Status](https://travis-ci.com/swisspush/gateleen.svg?branch=master)](https://travis-ci.com/swisspush/gateleen)\n[![codecov](https://codecov.io/gh/swisspost/gateleen/branch/master/graph/badge.svg?token=tBKO08u1C8)](https://codecov.io/gh/swisspost/gateleen)\n[![](https://img.shields.io/github/issues-raw/swisspush/gateleen.svg)](https://github.com/swisspush/gateleen/issues?utf8=%E2%9C%93\u0026q=is%3Aissue%20is%3Aopen%20)\n[![GitHub contributors](https://img.shields.io/github/contributors/swisspush/gateleen.svg)](https://github.com/swisspush/gateleen/graphs/contributors)\n\n[![GitHub release](https://img.shields.io/github/release/swisspush/gateleen.svg)](https://github.com/swisspush/gateleen/releases/latest)\n[![Maven Central](https://img.shields.io/maven-central/v/org.swisspush.gateleen/gateleen-core.svg)](https://search.maven.org/#search|ga|1|g%3A%22org.swisspush.gateleen%22%20AND%20v%3A%221.0.4%22)\n\nGateleen is a RESTFul middleware toolkit for building API gateways.\n\n## Getting Started\n### Install\n* Clone this repository or unzip [archive](https://github.com/swisspush/gateleen/archive/master.zip)\n* Install and start Redis\n  * Debian/Ubuntu: `apt-get install redis-server`\n  * Fedora/RedHat/CentOS: `yum install redis`\n  * OS X: `brew install redis`\n  * [Windows](https://github.com/MSOpenTech/redis/releases/download/win-2.8.2400/Redis-x64-2.8.2400.zip)\n  * [Other](http://redis.io/download)\n\n### Build\nYou need Java 8 and Maven\n```\ncd gateleen\nmvn install\n```\n\nWe're using a (private) mirror where we download npm/node from. In case you've\nno access to that mirror, you can use maven profile `publicRepos` (Eg: `mvn\ninstall -PpublicRepos`).\n\n### Play\n\nA Redis is needed for this\n```\nredis-server\n```\n\nThe `gateleen-playground` module provides a server example.\n```\njava -jar gateleen-playground/target/playground.jar\n```\n\nIt starts on [http://localhost:7012/playground](http://localhost:7012/playground)\n\nThe storage is currently empty, that's why you get `404 Not Found`\n\nUpload some demo stuff using\n```\nmvn deploy -PuploadStaticFiles\n```\n\nThe playground module provides a convenient web client for manipulating resources and a basic configuration.\n\nCreate your first resource with\n```\ncurl -X PUT -d '{ \"foo\": \"bar\" }' http://localhost:7012/playground/hello/world\n```\nor any other [REST Client](https://www.google.ch/?q=rest+client)\n\nNow you can see the resource appear in [http://localhost:7012/playground](http://localhost:7012/playground)\n\n\n### Run integration tests\n\nOnce the playground is up the UI based integration tests can be executed using\n\n\n```\nmvn install -PuiIntegrationTests -Dsel_chrome_driver=/usr/local/chromedriver\n```\n\nthere are also integration tests that are not based on the playground UI.\n\nNote: Stop the playground prior to running these test:\n\n\n```\nmvn install -PnonUiIntegrationTests \n```\n\n\n## Modules\n\n| Module                                                                   | Description                              |\n|:------------------------------------------------------------------------:| ---------------------------------------- |\n| [core](gateleen-core/README_core.md)                                     | HTTP infrastructure and hierarchical resource storage that can be used as cache, intermediate storage for backend-pushed data, user and apps data |\n| [cache](gateleen-cache/README_cache.md)                                  | Cache JSON responses locally to reduce load on backends and increase performance. |\n| [delegate](gateleen-delegate/README_delegate.md)                         | With the delegate feature a client is able to delegate requests to perform prespecified tasks.  |\n| [delta](gateleen-delta/README_delta.md)                                  | Traffic optimization allowing clients to fetch only data that actually changed from the last time they fetched it  |\n| [expansion](gateleen-expansion/README_expansion.md)                      | Traffic optimization allowing clients to fetch a sub-tree of data in one request instead of many requests |\n| [hook](gateleen-hook/README_hook.md)                                     | Server push and callback support allowing backends to push data to clients and be notified when data is pushed by clients |\n| [integrationtest](gateleen-integrationtest/README_integrationtest.md)    | Test infrastructure |\n| [logging](gateleen-logging/README_logging.md)                            | Logs request with configurable filtering for later data analysis |\n| [monitoring](gateleen-monitoring/README_monitoring.md)                   | Monitor useful information like number of requests, queue sizes, etc. |\n| [packing](gateleen-packing/README_packing.md)                            | Traffic optimization gathering multiple requests in one |\n| [performancetest](gateleen-performancetest/README_performancetest.md)    | Execute load tests using Gatling.io against a running playground instance |\n| [player](gateleen-player/README_player.md)                               | Test tool to replay traffic recorded with gateleen-logging for automated tests and troubleshooting |\n| [playground](gateleen-playground/README_playground.md)                   | Server example    |\n| [qos](gateleen-qos/README_qos.md)                                        | Traffic priorization by rejecting requests to low-priority routes to keep more important features working when backends go down and load increases due to timeouts and retries |\n| [queue](gateleen-queue/README_queue.md)                                  | Request queuing to be robust to slow and available backends keeping the client connections short-lived |\n| [routing](gateleen-routing/README_routing.md)                            | Configurable URL patterns and method based routing to backends and resource storage |\n| [runconfig](gateleen-runconfig/README_runconfig.md)                      | Test infrastructure |\n| [scheduler](gateleen-scheduler/README_scheduler.md)                      | Performs planned operations like data cleaning |\n| [security](gateleen-security/README_security.md)                         | Fine grained authorization for URL patterns and methods against principal headers  |\n| [test](gateleen-test/README_test.md)                                     | Integration tests |\n| [user](gateleen-user/README_user.md)                                     | Manages user profile merges user preferences and identity information |\n| [validation](gateleen-validation/README_validation.md)                   | Validates data according to JSON schemas  |\n| [kafka](gateleen-kafka/README_kafka.md)                                  | Forward requests to Kafka topics  |\n\n## Headers\nThis is a list of the custom headers used by Gateleen.\n\n| Header               | Description                              | Link to documentation |\n|:---------------------| :--------------------------------------- | :---------------------:|\n| x-rp-unique_id       | unique id | |\n| x-request-id         | id of the request (unique?) | |\n| x-self-request       | indicates if the request is triggered by a communication server and the target is the communication server itself | |\n| x-rp-grp             | group header | [gateleen-user](gateleen-user/README_user.md) |\n| x-roles              | role header | |\n| x-delta              | used by the delta parameter to mark a delta request | [gateleen-delta](gateleen-delta/README_delta.md) |\n| x-delta-backend      | used by the delta parameter as a marker header to know that we should let the request continue to the router | [gateleen-delta](gateleen-delta/README_delta.md) |\n| x-expire-After       | indicates how long (in seconds) a request is 'valid' before it expires | |\n| x-hooked             | used by the HookHandler to indicate the original hook request as hooked | [gateleen-hook](gateleen-hook/README_hook.md) |\n| x-pack-size          | indicates if a request is packed | [gateleen-packing](gateleen-packing/README_packing.md) |\n| x-client-timestamp   | timestamp of the client while sending the request | |\n| x-server-timestamp   | timestamp of the server while sending the request | |\n| x-queue              | indicates a queued request | [gateleen-queue](gateleen-queue/README_queue.md) |\n| x-duplicate-check    | indicates if a request is a duplicate or not | |\n| x-on-behalf-of       | indicates the user the request originally was made from. This header is used when the request of a user is sent by another user because it couldn't be sent at that time (offline) | |\n| x-user-\\\u003cpattern\\\u003e   | used for the user profile | |\n| x-rp-deviceid        | used to check if device is authorized | |\n| x-rp-usr             | used to check if user is authorized | [gateleen-user](gateleen-user/README_user.md) |\n| x-rp-lang            | used to specify the language of the user profile | [gateleen-user](gateleen-user/README_user.md) |\n| x-valid              | indicates if a request is to be validated or not | [gateleen-validation](gateleen-validation/README_validation.md) |\n| x-sync               |  | |\n| x-log                |  | |\n| x-service            | contains the name of the service, which created the request | |\n| x-queue-expire-after | indicates how long (in seconds) a request is 'valid' in the queue before it expires | |\n\n## Performance Tuning\n* The amount of max open files per process should be at least 16384. You can check your max open files per process with this command `cat /proc/\u003cprocess id\u003e/limits`.\n* The amount of open files depends on the amount of open Http Requests, which are holding a tcp connection which are holding a file handle.\n* The important number to control the open HTTP requests is the pool size of the Http Client. The higher the pool size the higher the open files.\n\n## Dependencies\n* [vertx-rest-storage](https://github.com/swisspush/vertx-rest-storage) at least release [v2.0.2](https://github.com/swisspush/vertx-rest-storage/releases/tag/v2.0.2)\n* [vertx-redisques](https://github.com/swisspush/vertx-redisques) at least release [v.2.0.1](https://github.com/swisspush/vertx-redisques/releases/tag/2.0.1)\n\n# Release\nIn order to release, a PullRequest from develop branch to the master branch must be created on Github.\nPay special attention to perform a merge-commit, not a squash-commit! The squash will fail your release build.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisspost%2Fgateleen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswisspost%2Fgateleen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswisspost%2Fgateleen/lists"}