{"id":26121560,"url":"https://github.com/fizzed/ninja-undertow","last_synced_at":"2025-10-29T22:46:01.937Z","repository":{"id":57719284,"uuid":"52061284","full_name":"fizzed/ninja-undertow","owner":"fizzed","description":"Undertow standalone container for NinjaFramework","archived":false,"fork":false,"pushed_at":"2018-03-13T17:23:08.000Z","size":1803,"stargazers_count":2,"open_issues_count":0,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T03:51:21.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fizzed.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-19T04:27:35.000Z","updated_at":"2023-08-17T15:08:09.000Z","dependencies_parsed_at":"2022-08-26T10:00:31.536Z","dependency_job_id":null,"html_url":"https://github.com/fizzed/ninja-undertow","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fninja-undertow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fninja-undertow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fninja-undertow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fizzed%2Fninja-undertow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fizzed","download_url":"https://codeload.github.com/fizzed/ninja-undertow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248717252,"owners_count":21150388,"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":"2025-03-10T14:23:50.936Z","updated_at":"2025-10-29T22:46:01.889Z","avatar_url":"https://github.com/fizzed.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Undertow for Ninja Framework by Fizzed\n=======================================\n\n[![Build Status](https://travis-ci.org/fizzed/ninja-undertow.svg?branch=master)](https://travis-ci.org/fizzed/ninja-undertow)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.fizzed/ninja-undertow/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.fizzed/ninja-undertow)\n\n[Fizzed, Inc.](http://fizzed.com) (Follow on Twitter: [@fizzed_inc](http://twitter.com/fizzed_inc))\n\n## Overview\n\nStandalone implementation for the [Ninja Framework](https://github.com/ninjaframework/ninja)\nusing Undertow.  Ninja-undertow does *not use servlets* under-the-hood -- therefore\nit bypasses a significant amount of code that Ninja's default Jetty-based standalone\nuses.  Ninja-undertow is a drop-in replacement for Ninja's Jetty-based standalone.\n\n## Performance\n\nBased on this [benchmark](ninja-benchmark/src/main/java/ninja/benchmark/NinjaBenchmark.java) ninja-undertow\nis 15.5% faster than ninja-jetty for standard GET requests and 7.6% faster than\nninja-jetty for POST requests w/ JSON.  Future optimizations and tuning should\ncontinue to wident the performance gap.\n\n```\nBenchmark results for ninja.undertow.NinjaUndertow\n----------------------------------------------------\n threads: 50\nrequests: 50000\nget_with_params benchmark: 2096 ms (23854.96/sec)\npost_object_as_form benchmark: 2913 ms (17164.43/sec)\npost_object_as_json benchmark: 2246 ms (22261.80/sec)\n\nBenchmark results for ninja.standalone.NinjaJetty\n----------------------------------------------------\n threads: 50\nrequests: 50000\nget_with_params benchmark: 2521 ms (19833.40/sec)\npost_object_as_form benchmark: 3098 ms (16139.44/sec)\npost_object_as_json benchmark: 2402 ms (20815.99/sec)\n```\n\n## Ninja 5 (or lower) support?\n\nPlease use `ninja-undertow` v5.7.0.undertow2 or below if you need to target\nan older version of Ninja.\n\n## Differences with ninja-standalone (jetty)?\n\nNinja-undertow passes **all** current Ninja unit tests.  As of Ninja v6, this\nlibrary supplies everything ninja-jetty (standalone) provides.\n\n## Usage\n\nNinja-undertow is on maven central.  The version will always be the Ninja\nversion it was compiled against + `undertowN` which represents the undertow\nbuild increment.  As of Ninja v5.4.0, as long as you don't have `ninja.standalone.NinjaJetty`\non your classpath, Ninja will automatically find ninja-undertow and use it\nfor everything (maven-plugin, testing, standalone). So if you previously had\na dependency on `ninja-standalone`, you'll want to make sure you are only\npulling `ninja-core` and `ninja-undertow`.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.ninjaframework\u003c/groupId\u003e\n    \u003cartifactId\u003eninja-core\u003c/artifactId\u003e\n    \u003cversion\u003e6.0.0-beta2\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.fizzed\u003c/groupId\u003e\n    \u003cartifactId\u003eninja-undertow\u003c/artifactId\u003e\n    \u003cversion\u003e6.0.0-undertow1\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Configuration\n\nThe following Ninja (conf/application.conf) properties are supported.\n\n`ninja.host = \u003caddress\u003e`\n\nHost interface to bind undertow server to.  \"0.0.0.0\" will bind to any address or\n\"localhost\" would bind to just the local interface.\n\n`ninja.port = \u003cinteger\u003e`\n\nHTTP port to bind undertow server to.  Any value greater than zero activates\nthe HTTP server.\n\n`ninja.ssl.port = \u003cinteger\u003e`\n\nHTTPS port to bind undertow server to.  Any value greater than zero activates\nthe HTTPS server.  All Ninja `ninja.ssl.*` properties are supported for setting\nup the keystore and truststore.\n\n`undertow.tracing = \u003cboolean\u003e`\n\nIf true then an undertow `RequestDumpingHandler` will be added to the request\nhandling pipeline to log all requests and responses.  Please note that this\nis an expensive feature and should only be enabled during development or in\ncases of troubleshooting in production.  False by default.\n\n`undertow.http2 = \u003cboolean\u003e`\n\nIf true then HTTP/2.0 will be activated for HTTP/HTTPS ports.  Undertow v1.4.0+\ndoes not require ALPN support like in previous versions.  Please note that most\nbrowsers (Chrome, Firefox, etc.) only try `h2` over HTTPS.  Recent versions of\n`curl` support `h2` over HTTP.\n\n## Demo and benchmark\n\nThis project uses [Blaze](https://github.com/fizzed/blaze) for assisting with\nrunning sample apps.  To run a demo:\n\n    java -jar blaze.jar demo\n\nTo run a benchmark\n\n    java -jar blaze.jar benchmark\n\nThe benchmark supports a number of system properties to run with various\nconfigurations.  To run the benchmark against jetty:\n\n    java -jar blaze.jar benchmark -Dbm.server=jetty\n\nTo benchmark ssl:\n\n    java -jar blaze.jar benchmark -Dbm.ssl=true\n\nTo activate http/2.0 for undertow and ssl:\n\n    java -jar blaze.jar benchmark -Dbm.ssl=true -Dundertow.http2=true\n\n## Testing\n\nCompile and test project by itself and install it\n\n    mvn test\n\nUse Ninja's unit tests to verify.  Install ninja-undertow followed by a [Blaze](https://github.com/fizzed/blaze)\nscript to clone Ninja's upstream git repo.\n\n    mvn install\n    java -jar blaze.jar cloneOrRebaseNinjaRepo\n\nThen edit ninja's standalone module to include ninja-undertow.  This means any\nother module in ninja that pulls in ninja-standalone will also have ninja-undertow.\n\n    nano ninja-upstream/ninja-standalone/pom.xml\n\nAdd the following as a dependency\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.fizzed\u003c/groupId\u003e\n    \u003cartifactId\u003eninja-undertow\u003c/artifactId\u003e\n    \u003cversion\u003e\u003c!-- replace with version in pom.xml --\u003e\u003c/version\u003e\n\u003c/dependency\u003e\n```\n    cd ninja-upstream\n    mvn test -Dninja.standalone.class=ninja.undertow.NinjaUndertow -DasyncMachineTests=false\n\nThat system property controls the underlying implementation that ninja creates\nfor its own standalone instance.  Results in NinjaUndertow entirely replacing\nevery occurrence where NinjaJetty is used.  Therefore, it taps into all the\nNinjaFramework unit tests :-)\n\n## License\n\nCopyright (C) 2016 Fizzed, Inc.\n\nThis work is licensed under the Apache License, Version 2.0. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzed%2Fninja-undertow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffizzed%2Fninja-undertow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffizzed%2Fninja-undertow/lists"}