[
  {
    "path": ".gitignore",
    "content": ".idea/\n.settings/\ntarget/\n*.iml\n*.log\n*.class\ndependency-reduced-pom.xml\n\n# mvn versions files\npom.xml.versionsBackup\n\n# eclipse\n.classpath\n.project\n\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Package Files #\n*.jar\n*.war\n*.ear\n\n# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml\nhs_err_pid*\n"
  },
  {
    "path": "LICENSE",
    "content": "                                 Apache License\n                           Version 2.0, January 2004\n                        http://www.apache.org/licenses/\n\n   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\n\n   1. Definitions.\n\n      \"License\" shall mean the terms and conditions for use, reproduction,\n      and distribution as defined by Sections 1 through 9 of this document.\n\n      \"Licensor\" shall mean the copyright owner or entity authorized by\n      the copyright owner that is granting the License.\n\n      \"Legal Entity\" shall mean the union of the acting entity and all\n      other entities that control, are controlled by, or are under common\n      control with that entity. For the purposes of this definition,\n      \"control\" means (i) the power, direct or indirect, to cause the\n      direction or management of such entity, whether by contract or\n      otherwise, or (ii) ownership of fifty percent (50%) or more of the\n      outstanding shares, or (iii) beneficial ownership of such entity.\n\n      \"You\" (or \"Your\") shall mean an individual or Legal Entity\n      exercising permissions granted by this License.\n\n      \"Source\" form shall mean the preferred form for making modifications,\n      including but not limited to software source code, documentation\n      source, and configuration files.\n\n      \"Object\" form shall mean any form resulting from mechanical\n      transformation or translation of a Source form, including but\n      not limited to compiled object code, generated documentation,\n      and conversions to other media types.\n\n      \"Work\" shall mean the work of authorship, whether in Source or\n      Object form, made available under the License, as indicated by a\n      copyright notice that is included in or attached to the work\n      (an example is provided in the Appendix below).\n\n      \"Derivative Works\" shall mean any work, whether in Source or Object\n      form, that is based on (or derived from) the Work and for which the\n      editorial revisions, annotations, elaborations, or other modifications\n      represent, as a whole, an original work of authorship. For the purposes\n      of this License, Derivative Works shall not include works that remain\n      separable from, or merely link (or bind by name) to the interfaces of,\n      the Work and Derivative Works thereof.\n\n      \"Contribution\" shall mean any work of authorship, including\n      the original version of the Work and any modifications or additions\n      to that Work or Derivative Works thereof, that is intentionally\n      submitted to Licensor for inclusion in the Work by the copyright owner\n      or by an individual or Legal Entity authorized to submit on behalf of\n      the copyright owner. For the purposes of this definition, \"submitted\"\n      means any form of electronic, verbal, or written communication sent\n      to the Licensor or its representatives, including but not limited to\n      communication on electronic mailing lists, source code control systems,\n      and issue tracking systems that are managed by, or on behalf of, the\n      Licensor for the purpose of discussing and improving the Work, but\n      excluding communication that is conspicuously marked or otherwise\n      designated in writing by the copyright owner as \"Not a Contribution.\"\n\n      \"Contributor\" shall mean Licensor and any individual or Legal Entity\n      on behalf of whom a Contribution has been received by Licensor and\n      subsequently incorporated within the Work.\n\n   2. Grant of Copyright License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      copyright license to reproduce, prepare Derivative Works of,\n      publicly display, publicly perform, sublicense, and distribute the\n      Work and such Derivative Works in Source or Object form.\n\n   3. Grant of Patent License. Subject to the terms and conditions of\n      this License, each Contributor hereby grants to You a perpetual,\n      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\n      (except as stated in this section) patent license to make, have made,\n      use, offer to sell, sell, import, and otherwise transfer the Work,\n      where such license applies only to those patent claims licensable\n      by such Contributor that are necessarily infringed by their\n      Contribution(s) alone or by combination of their Contribution(s)\n      with the Work to which such Contribution(s) was submitted. If You\n      institute patent litigation against any entity (including a\n      cross-claim or counterclaim in a lawsuit) alleging that the Work\n      or a Contribution incorporated within the Work constitutes direct\n      or contributory patent infringement, then any patent licenses\n      granted to You under this License for that Work shall terminate\n      as of the date such litigation is filed.\n\n   4. Redistribution. You may reproduce and distribute copies of the\n      Work or Derivative Works thereof in any medium, with or without\n      modifications, and in Source or Object form, provided that You\n      meet the following conditions:\n\n      (a) You must give any other recipients of the Work or\n          Derivative Works a copy of this License; and\n\n      (b) You must cause any modified files to carry prominent notices\n          stating that You changed the files; and\n\n      (c) You must retain, in the Source form of any Derivative Works\n          that You distribute, all copyright, patent, trademark, and\n          attribution notices from the Source form of the Work,\n          excluding those notices that do not pertain to any part of\n          the Derivative Works; and\n\n      (d) If the Work includes a \"NOTICE\" text file as part of its\n          distribution, then any Derivative Works that You distribute must\n          include a readable copy of the attribution notices contained\n          within such NOTICE file, excluding those notices that do not\n          pertain to any part of the Derivative Works, in at least one\n          of the following places: within a NOTICE text file distributed\n          as part of the Derivative Works; within the Source form or\n          documentation, if provided along with the Derivative Works; or,\n          within a display generated by the Derivative Works, if and\n          wherever such third-party notices normally appear. The contents\n          of the NOTICE file are for informational purposes only and\n          do not modify the License. You may add Your own attribution\n          notices within Derivative Works that You distribute, alongside\n          or as an addendum to the NOTICE text from the Work, provided\n          that such additional attribution notices cannot be construed\n          as modifying the License.\n\n      You may add Your own copyright statement to Your modifications and\n      may provide additional or different license terms and conditions\n      for use, reproduction, or distribution of Your modifications, or\n      for any such Derivative Works as a whole, provided Your use,\n      reproduction, and distribution of the Work otherwise complies with\n      the conditions stated in this License.\n\n   5. Submission of Contributions. Unless You explicitly state otherwise,\n      any Contribution intentionally submitted for inclusion in the Work\n      by You to the Licensor shall be under the terms and conditions of\n      this License, without any additional terms or conditions.\n      Notwithstanding the above, nothing herein shall supersede or modify\n      the terms of any separate license agreement you may have executed\n      with Licensor regarding such Contributions.\n\n   6. Trademarks. This License does not grant permission to use the trade\n      names, trademarks, service marks, or product names of the Licensor,\n      except as required for reasonable and customary use in describing the\n      origin of the Work and reproducing the content of the NOTICE file.\n\n   7. Disclaimer of Warranty. Unless required by applicable law or\n      agreed to in writing, Licensor provides the Work (and each\n      Contributor provides its Contributions) on an \"AS IS\" BASIS,\n      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\n      implied, including, without limitation, any warranties or conditions\n      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\n      PARTICULAR PURPOSE. You are solely responsible for determining the\n      appropriateness of using or redistributing the Work and assume any\n      risks associated with Your exercise of permissions under this License.\n\n   8. Limitation of Liability. In no event and under no legal theory,\n      whether in tort (including negligence), contract, or otherwise,\n      unless required by applicable law (such as deliberate and grossly\n      negligent acts) or agreed to in writing, shall any Contributor be\n      liable to You for damages, including any direct, indirect, special,\n      incidental, or consequential damages of any character arising as a\n      result of this License or out of the use or inability to use the\n      Work (including but not limited to damages for loss of goodwill,\n      work stoppage, computer failure or malfunction, or any and all\n      other commercial damages or losses), even if such Contributor\n      has been advised of the possibility of such damages.\n\n   9. Accepting Warranty or Additional Liability. While redistributing\n      the Work or Derivative Works thereof, You may choose to offer,\n      and charge a fee for, acceptance of support, warranty, indemnity,\n      or other liability obligations and/or rights consistent with this\n      License. However, in accepting such obligations, You may act only\n      on Your own behalf and on Your sole responsibility, not on behalf\n      of any other Contributor, and only if You agree to indemnify,\n      defend, and hold each Contributor harmless for any liability\n      incurred by, or claims asserted against, such Contributor by reason\n      of your accepting any such warranty or additional liability.\n\n   END OF TERMS AND CONDITIONS\n\n   APPENDIX: How to apply the Apache License to your work.\n\n      To apply the Apache License to your work, attach the following\n      boilerplate notice, with the fields enclosed by brackets \"{}\"\n      replaced with your own identifying information. (Don't include\n      the brackets!)  The text should be enclosed in the appropriate\n      comment syntax for the file format. We also recommend that a\n      file or class name and description of purpose be included on the\n      same \"printed page\" as the copyright notice for easier\n      identification within third-party archives.\n\n   Copyright {yyyy} {name of copyright owner}\n\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n"
  },
  {
    "path": "README.md",
    "content": "# Jax-RS-Performance-Comparison\nPerformance Comparison of Jax-RS implementations and embedded containers\n\n[![Build Status](https://drone.io/github.com/smallnest/Jax-RS-Performance-Comparison/status.png)](https://drone.io/github.com/smallnest/Jax-RS-Performance-Comparison/latest)\n\n[Gajotres](http://www.gajotres.net/best-available-java-restful-micro-frameworks/#author-box) have written an article: [Top 8 Java RESTful Micro Frameworks](http://www.gajotres.net/best-available-java-restful-micro-frameworks/). He listed 8 best light weight Java RESTful framework.\nPersonally, I perfer jax-rs implementations and micro frameworks for deploying applications as micro services and those micro services can be deployed in docker containers.\n\nSo I have test five Jax-RS implementations plus embedded containers despite business logics. The RESTful service is very simple and it only returns a \"hello world\" string. Remember,  tests don't contain any business logics even JSON libraries.\nThere are other articles to dicuss serialization framework. For example, [my test](http://colobu.com/2014/08/26/java-serializer-comparison/)\n\nI have added more RESTful framework besides Jax-RS implementation, which contains:\n* Spring-boot\n* RESTEasy + Netty4\n* Native Netty\n* Vert.x\n* Go\n\n\nYou can check the test result and the performancre chart.\n\n### Compile applications\nIt is a multiple-module maven project.\nYou can run \"mvn package\" in parent directory to packge each module.\nIt generates a fat-jar in target directories of modules for each module.\nIt is easy.\n\n### Test Environment\n**Server**\nAWS C3.2xlarge\n- 8 cores (E5-2666 v3 @ 2.90GHz)\n- memory: 16G (only allocate 4G for restful applications)\n\n**Java**\n1.8.0_51\n\n**Test tool**\n[wrk](https://github.com/wg/wrk)\nthe test cmd is like: `wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello `.\nI use 16 threads and 100/200/500/1000 connnections to test each case.\n\n**Starting Server**\n```\njava -Xmx4g -Xms4g -jar jersey-grizzly2-1.0-SNAPSHOT.jar\njava -Xmx4g -Xms4g -jar jersey-jetty-1.0-SNAPSHOT.jar\njava -Xmx4g -Xms4g -jar dropwizard-1.0-SNAPSHOT.jar hello.yml \njava -Xmx4g -Xms4g -jar resteasy-netty-1.0-SNAPSHOT.jar \njava -Xmx4g -Xms4g -jar resteasy-undertow-1.0-SNAPSHOT.jar\njava -Xmx4g -Xms4g -jar springboot-1.0-SNAPSHOT.jar\njava -Xmx4g -Xms4g -jar resteasy-netty4-1.0-SNAPSHOT.jar \njava -Xmx4g -Xms4g -jar nativenetty-1.0-SNAPSHOT.jar\njava -Xmx4g -Xms4g -jar vertx-1.0-SNAPSHOT.jar\njava -Xmx4g -Xms4g -jar swagger-light-java-1.0.0.jar\n```\n\n### Test Result\n\nTest data is [here](TestData.md)\n\n![](performance.png)\n\n### Conclusion\nIt looks Resteasy is better than jersey whatever jersey uses grizzly2 or jetty container.\n\nIt is predictable that performance of dropwizard is same to jersey+jetty.\n\nResteasy is excellent in undertow and netty.\n\nTo my surprise is resteasy+undertow is a little better than resteasy+netty. Maybe they are all developed by JBoss and they have done some optimization.\n\nI do not recommend you use spring boot in large projects because its performance and style.\n\nOf course native netty is number one but my test has not contains a http router so maybe you can't say it is RESTful framework. But I like its perforamnce.\n\nPerformance of RESTEasy+netty4 is lower than what i expect. but RESTEasy+netty3 is very good.\n\n~~One interesting framework is Vert.x. I like its functional programming style but its performance is not so good.~~\n\n\n\nI have not monitored the CPU usage and memory usage. You can try it. \n\n### Update\n* 2015/11/19 add native go, go-restful codes\n"
  },
  {
    "path": "TestData.md",
    "content": "### jersey-grizzly2\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     1.98ms    2.06ms  48.92ms   92.37%\n    Req/Sec     3.71k   274.18     9.93k    82.39%\n  1774190 requests in 30.10s, 191.32MB read\nRequests/sec:  58944.39\nTransfer/sec:      6.36MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     3.32ms    1.89ms  41.80ms   91.65%\n    Req/Sec     3.86k   237.06    10.04k    86.86%\n  1844871 requests in 30.10s, 198.94MB read\nRequests/sec:  61292.59\nTransfer/sec:      6.61MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     8.14ms    2.35ms 211.50ms   88.87%\n    Req/Sec     3.84k   365.89    12.98k    96.16%\n  1835462 requests in 30.10s, 197.92MB read\nRequests/sec:  60971.94\nTransfer/sec:      6.57MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    16.04ms    3.88ms 224.75ms   88.42%\n    Req/Sec     3.88k   517.01    22.61k    96.20%\n  1846019 requests in 30.09s, 199.06MB read\nRequests/sec:  61357.23\nTransfer/sec:      6.62MB\n```\n\n### jersey-jetty\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/hello\nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     4.09ms    8.88ms 163.37ms   93.57%\n    Req/Sec     3.51k   675.65     8.22k    72.92%\n  1677456 requests in 30.10s, 259.16MB read\nRequests/sec:  55721.64\nTransfer/sec:      8.61MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/hello \nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     5.66ms   11.76ms 216.25ms   94.88%\n    Req/Sec     3.72k   769.93    12.15k    78.25%\n  1777091 requests in 30.10s, 274.55MB read\nRequests/sec:  59040.40\nTransfer/sec:      9.12MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/hello \nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     8.70ms    4.85ms 221.85ms   74.93%\n    Req/Sec     3.61k   436.24    10.79k    83.47%\n  1727962 requests in 30.09s, 266.96MB read\nRequests/sec:  57420.08\nTransfer/sec:      8.87MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/hello \nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    16.38ms    7.79ms 115.97ms   77.13%\n    Req/Sec     3.80k   387.32    10.29k    75.07%\n  1817317 requests in 30.08s, 280.77MB read\nRequests/sec:  60419.20\nTransfer/sec:      9.33MB\n```\n\n### resteasy-netty https://github.com/resteasy/Resteasy/tree/master/jaxrs/server-adapters/resteasy-netty4\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     1.55ms    1.79ms  39.29ms   88.35%\n    Req/Sec     5.17k   473.68    16.08k    82.22%\n  2470498 requests in 30.10s, 235.61MB read\nRequests/sec:  82078.17\nTransfer/sec:      7.83MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     2.72ms    2.68ms 212.44ms   86.44%\n    Req/Sec     5.16k   536.58    10.62k    89.71%\n  2460323 requests in 30.10s, 234.63MB read\nRequests/sec:  81742.81\nTransfer/sec:      7.80MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     6.14ms    4.29ms 218.98ms   65.61%\n    Req/Sec     5.32k   399.82    13.75k    85.94%\n  2546559 requests in 30.10s, 242.86MB read\nRequests/sec:  84604.20\nTransfer/sec:      8.07MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    11.73ms    6.59ms 240.40ms   72.53%\n    Req/Sec     5.29k   735.57    24.29k    95.86%\n  2530059 requests in 30.09s, 241.29MB read\nRequests/sec:  84077.04\nTransfer/sec:      8.02MB\n```\n\n\n### resteasy-undertow https://github.com/resteasy/Resteasy/tree/master/jaxrs/server-adapters/resteasy-undertow\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     1.35ms    1.26ms  29.65ms   89.78%\n    Req/Sec     5.11k   482.19    13.41k    70.58%\n  2445424 requests in 30.10s, 319.50MB read\nRequests/sec:  81245.94\nTransfer/sec:     10.62MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     2.34ms    1.24ms  20.15ms   82.58%\n    Req/Sec     5.27k   402.57    10.10k    70.97%\n  2524874 requests in 30.10s, 329.88MB read\nRequests/sec:  83896.30\nTransfer/sec:     10.96MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     5.53ms    1.37ms 211.98ms   82.84%\n    Req/Sec     5.58k   468.63    12.95k    89.39%\n  2672701 requests in 30.10s, 349.20MB read\nRequests/sec:  88808.18\nTransfer/sec:     11.60MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    10.71ms    4.21ms 222.46ms   94.80%\n    Req/Sec     5.63k     1.07k   20.80k    91.21%\n  2697266 requests in 30.09s, 352.41MB read\nRequests/sec:  89646.47\nTransfer/sec:     11.71MB\n```\n\n### Dropwizard \n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    10.56ms   20.00ms 331.02ms   87.74%\n    Req/Sec     3.69k     1.02k   12.27k    70.18%\n  1764292 requests in 30.10s, 190.13MB read\nRequests/sec:  58617.07\nTransfer/sec:      6.32MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    12.31ms   24.45ms 373.46ms   89.65%\n    Req/Sec     3.73k     1.07k   11.42k    69.94%\n  1778938 requests in 30.10s, 191.71MB read\nRequests/sec:  59104.61\nTransfer/sec:      6.37MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    13.47ms   21.35ms 398.83ms   91.93%\n    Req/Sec     3.79k     1.00k   14.20k    68.85%\n  1815458 requests in 30.09s, 195.64MB read\nRequests/sec:  60338.83\nTransfer/sec:      6.50MB\n\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    33.55ms   88.33ms   1.20s    95.32%\n    Req/Sec     3.75k     1.06k   13.18k    69.77%\n  1791296 requests in 30.09s, 193.04MB read\nRequests/sec:  59534.43\nTransfer/sec:      6.42MB\n```\n\n\n### spring boot 1.3.0.RELEASE\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/hello\nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     3.39ms    4.10ms  58.23ms   90.89%\n    Req/Sec     2.31k   301.34     6.31k    70.86%\n  1107622 requests in 30.10s, 162.87MB read\nRequests/sec:  36799.74\nTransfer/sec:      5.41MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/hello \nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     6.34ms    8.62ms 125.04ms   95.44%\n    Req/Sec     2.38k   263.37     6.62k    75.76%\n  1138849 requests in 30.09s, 167.46MB read\nRequests/sec:  37847.67\nTransfer/sec:      5.57MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/hello \nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    12.99ms    5.43ms 123.32ms   82.28%\n    Req/Sec     2.43k   183.80     5.77k    76.53%\n  1161165 requests in 30.09s, 170.74MB read\nRequests/sec:  38592.82\nTransfer/sec:      5.67MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/hello \nRunning 30s test @ http://127.0.0.1:8080/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    25.73ms    4.36ms  72.17ms   78.96%\n    Req/Sec     2.42k   177.95     6.94k    80.52%\n  1156937 requests in 30.10s, 170.11MB read\nRequests/sec:  38436.42\nTransfer/sec:      5.65MB\n```\n\n### native netty\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     1.45ms    2.65ms  46.81ms   90.93%\n    Req/Sec     8.30k   787.93    12.00k    72.23%\n  3976832 requests in 30.10s, 379.26MB read\nRequests/sec: 132124.20\nTransfer/sec:     12.60MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     2.03ms    2.78ms 208.05ms   90.77%\n    Req/Sec     8.60k   749.64    13.75k    73.19%\n  4118101 requests in 30.10s, 392.73MB read\nRequests/sec: 136819.26\nTransfer/sec:     13.05MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     3.83ms    3.33ms  47.72ms   88.67%\n    Req/Sec     9.49k     1.10k   40.84k    87.81%\n  4540119 requests in 30.10s, 432.98MB read\nRequests/sec: 150848.85\nTransfer/sec:     14.39MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     6.51ms    4.04ms 223.29ms   67.61%\n    Req/Sec     9.88k     1.50k   37.86k    91.72%\n  4726224 requests in 30.10s, 450.73MB read\nRequests/sec: 157019.56\nTransfer/sec:     14.97MB\n```\n\n### resteasy-netty4\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     3.02ms    3.21ms  80.07ms   91.22%\n    Req/Sec     2.45k   253.41     7.26k    78.40%\n  1169843 requests in 30.10s, 131.65MB read\nRequests/sec:  38868.78\nTransfer/sec:      4.37MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     5.11ms    3.62ms  63.82ms   72.81%\n    Req/Sec     2.54k   231.56     8.90k    81.83%\n  1214528 requests in 30.10s, 136.68MB read\nRequests/sec:  40350.45\nTransfer/sec:      4.54MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    11.83ms    6.04ms 272.64ms   77.88%\n    Req/Sec     2.61k   532.48    10.15k    93.05%\n  1237327 requests in 30.10s, 139.24MB read\nRequests/sec:  41110.09\nTransfer/sec:      4.63MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    21.91ms    9.22ms 305.95ms   80.44%\n    Req/Sec     2.59k     0.90k   13.48k    85.05%\n  1223592 requests in 30.09s, 137.70MB read\nRequests/sec:  40663.64\nTransfer/sec:      4.58MB\n```\n\n### Vert.x 3.2.1\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     2.66ms    4.62ms  62.15ms   87.53%\n    Req/Sec     5.96k   746.59    13.79k    71.94%\n  2851265 requests in 30.10s, 222.97MB read\nRequests/sec:  94730.86\nTransfer/sec:      7.41MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     3.50ms    6.72ms 328.68ms   91.33%\n    Req/Sec     5.86k     1.25k   35.44k    89.77%\n  2765198 requests in 30.10s, 216.24MB read\nRequests/sec:  91869.80\nTransfer/sec:      7.18MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     6.01ms    5.50ms 223.97ms   86.45%\n    Req/Sec     6.18k   770.53    22.22k    91.66%\n  2946029 requests in 30.10s, 230.38MB read\nRequests/sec:  97880.51\nTransfer/sec:      7.65MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    10.59ms    6.59ms 225.84ms   62.30%\n    Req/Sec     6.04k   610.92    15.94k    89.73%\n  2891948 requests in 30.10s, 226.15MB read\nRequests/sec:  96082.80\nTransfer/sec:      7.51MB\n```\n\n### Go\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     3.12ms    7.10ms 131.22ms   90.98%\n    Req/Sec     7.25k     1.67k   15.54k    70.00%\n  3465942 requests in 30.04s, 423.09MB read\nRequests/sec: 115388.10\nTransfer/sec:     14.09MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     4.51ms    9.40ms 199.98ms   91.84%\n    Req/Sec     6.75k     1.28k   13.88k    69.83%\n  3225967 requests in 30.04s, 393.79MB read\nRequests/sec: 107394.44\nTransfer/sec:     13.11MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    13.11ms   23.94ms 394.80ms   89.51%\n    Req/Sec     7.08k     2.12k   64.25k    73.32%\n  3378959 requests in 30.09s, 412.47MB read\nRequests/sec: 112292.01\nTransfer/sec:     13.71MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    33.20ms   62.20ms 908.16ms   89.62%\n    Req/Sec     7.17k     2.88k   16.91k    68.73%\n  3417812 requests in 30.04s, 417.21MB read\nRequests/sec: 113775.80\nTransfer/sec:     13.89MB\n```\n\n### go-restful (iris)\n```\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c100 -d30s http://127.0.0.1:8080/rest/hello\nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 100 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     2.84ms    5.40ms  80.97ms   90.77%\n    Req/Sec     6.03k     1.65k   19.35k    75.03%\n  2885226 requests in 30.09s, 319.18MB read\nRequests/sec:  95899.44\nTransfer/sec:     10.61MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c200 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 200 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency     4.90ms    7.72ms 104.81ms   87.61%\n    Req/Sec     6.61k     1.01k   15.55k    70.15%\n  3162116 requests in 30.07s, 349.81MB read\nRequests/sec: 105175.35\nTransfer/sec:     11.64MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \n[root@ip-172-31-4-198 ~]# wrk -t16 -c500 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 500 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    14.58ms   23.04ms 278.81ms   86.94%\n    Req/Sec     6.90k     1.02k   12.04k    69.27%\n  3297379 requests in 30.03s, 364.78MB read\nRequests/sec: 109786.38\nTransfer/sec:     12.15MB\n\n[smallnest@ip-xxx-xxx-xxx-xxx ~]# wrk -t16 -c1000 -d30s http://127.0.0.1:8080/rest/hello \nRunning 30s test @ http://127.0.0.1:8080/rest/hello\n  16 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    35.13ms   57.20ms 553.38ms   86.80%\n    Req/Sec     6.91k     1.05k   18.11k    70.85%\n  3309745 requests in 30.10s, 366.14MB read\nRequests/sec: 109966.09\nTransfer/sec:     12.17MB\n```\n\n\n"
  },
  {
    "path": "act/.gitignore",
    "content": "*.iml\ntarget\n.idea\nclasses\n*.log\n*.DS_Store\n*all.sql\ntmp/\n**/.act*\n**/.classpath\n**/.settings\n**/.project\n**/.settings/\nstore1/\ntest.mv.db\ntest.trace.db\nact.pid\n.workspace\n*.geany\n"
  },
  {
    "path": "act/README.md",
    "content": "# Jax-RS-Performance-Comparison - ActFramework implementation\n\n[ActFramework](https://github.com/actframework/actframework) is a Java based full stack framework, could be used to quickly develop MVC or RESTful service application.\n\n## Requirements\n\nYou must have Java 7+ and maven to run this application.\n\n## Run\n\nTo run this application in PROD mode, type `./run_prod`.\n\nThis application is configured to listen on port `8080`\n\n## Test\n\nTo run end to end test, type `./run_e2e`\n"
  },
  {
    "path": "act/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n  <modelVersion>4.0.0</modelVersion>\n\n  <groupId>benchmark.act</groupId>\n  <artifactId>rest-hello</artifactId>\n  <version>1.0-SNAPSHOT</version>\n\n  <name>act</name>\n\n  <parent>\n    <groupId>org.actframework</groupId>\n    <artifactId>act-starter-parent</artifactId>\n    <version>1.8.8.4</version>\n  </parent>\n\n  <properties>\n    <!-- remove the following line if you are on Java 7-->\n    <java.version>1.8</java.version>\n    <app.entry>benchmark.act.AppEntry</app.entry>\n  </properties>\n\n  <dependencies>\n    <dependency>\n      <groupId>org.actframework</groupId>\n      <artifactId>act-e2e</artifactId>\n      <version>0.0.7</version>\n    </dependency>\n  </dependencies>\n\n</project>\n"
  },
  {
    "path": "act/run_dev",
    "content": "#!/bin/sh\necho building ...\nmvn -q compile act:run"
  },
  {
    "path": "act/run_dev.bat",
    "content": "echo building ...\nmvn -q compile act:run"
  },
  {
    "path": "act/run_e2e",
    "content": "#!/bin/sh\necho building ...\nmvn -q compile act:e2e"
  },
  {
    "path": "act/run_e2e.bat",
    "content": "echo building ...\nmvn -q compile act:e2e"
  },
  {
    "path": "act/run_prod",
    "content": "#!/bin/sh\nif [ ! -f target/dist/start ]; then\n    echo building ...\n    mvn -q clean package\n    cd target/dist\n    tar xzf *.tar.gz\nelse\n    cd target/dist\nfi\n./run $*"
  },
  {
    "path": "act/src/main/java/benchmark/act/AppEntry.java",
    "content": "package benchmark.act;\n\nimport act.Act;\n\n/**\n * A simple hello world service app entry\n *\n * Run this app, try to update some of the code, then\n * press F5 in the browser to watch the immediate change\n * in the browser!\n */\n@SuppressWarnings(\"unused\")\npublic class AppEntry {\n\n    public static void main(String[] args) throws Exception {\n        Act.start();\n    }\n\n}\n"
  },
  {
    "path": "act/src/main/resources/benchmark/act/.version",
    "content": "artifact=${project.artifactId}\nversion=${project.version}\nbuild=${buildNumber}"
  },
  {
    "path": "act/src/main/resources/conf/app.properties",
    "content": "##############################################\n# Application configuration\n# act-1.8.8-RC8\n##############################################\n\n# When `api_doc` is enabled it can navigate to\n# http://localhost:5460/~/apidoc\n# for API Document.\n# \n# API doc is enabled by default\n#\n# uncomment to disable API doc\n#api_doc=false\n\n# When `api_doc.built_in.hide` is enabled the API document \n# will not display built-in endpoints, e.g. \n# `/~/info`\n# \n# built-in endpoints is visible in API doc by default\n#\n# uncomment to hide built-in endpoints in API doc\n#api_doc.built_in.hide=true\n\n# `basic_authentication` is not used by actframework\n# core, however plugins like `act-aaa-plugin` use\n# this configuration to check if HTTP basic \n# authentication is allowed.\n# \n# basic authentication is disabled by default\n#\n# uncomment to enable basic authentication\n#basic_authentication=true\n\n# When `built_in_req_handler` is disabled it will\n# not be able to access framework built-in endpoints\n# including `/~/info`, `/~/version` etc.\n# However the following built-in endpoints is still \n# available:\n# * GET /~/job/{id}/progress - required by runtime application\n# * GET /~/api/book/** - only available in dev mode\n# \n# built-in endpoints is enabled by default\n#\n# uncomment to disable built endpoints\n#built_in_req_handler=false\n\n# Configure the cache implementation used by ActFramework.\n# The cache class specified must implement \n# `org.osgl.cache.CacheServiceProvider` interface.\n# \n# If not specified cache implementation is determined by \n# osgl-cache library automatically depending on the \n# libraries available in the following order:\n# 1. Memcached service\n# 2. EhCache service\n# 3. OSGL implemented Simple Cache service based on concurrent hash map\n#\n# uncomment to set your own cache implementation\n#cache.impl=\n\n# By default @CacheFor annotation is not effective in `dev` mode.\n# the `cacheFor.dev` configuration can be used to turn on\n# @CacheFor in `dev` mode.\n#\n# uncomment to enable @CacheFor annotation in `dev` mode\n#cacheFor.dev=true\n\n# CLI service listens to local ip addresses to provide telent \n# access for command line access to the running app.\n# \n# CLI service is enabled by default\n#\n# uncomment to disable CLI service\n#cli=false\n\n# By default CLI port is `5461`\n#\n# uncomment to set CLI port\n#cli.port=\n\n# `cli.page.size.json` specifies the number of records to display\n# per page for CLI JSON view.\n#\n# Default CLI JSON view page size is 10 records\n#\n# uncomment to set CLI JSON view page size\n#cli.page.size.json=\n\n# `cli.page.size.table` specifies the number of records to display\n# per page for CLI tabular view.\n#\n# Default CLI table view page size is 22 records\n#\n# uncomment to set CLI table view page size\n#cli.page.size.table=\n\n# `cli.session.ttl` specifies the number of seconds a CLI\n# session will be terminated without interaction.\n#\n# The default CLI session ttl is 300 seconds, i.e. 5 minutes\n#\n# uncomment to set CLI session ttl\n#cli.session.ttl\n\n# `cli.session.max.int` specifies the maximum concurrent CLI session\n#\n# The default limits is 3\n#\n# uncomment to set CLI session max\n#cli.session.max.int\n\n# `cookie.prefix` specifies the session/flash cookie prefix.\n# \n# The default cookie prefix is the `shortId` of the application.\n#\n# uncomment to customize session/flash cookie prefix.\n#cookie.prefix=\n\n# When `cors` is enabled ActFramework will automatically populate the\n# CORS relevant headers in HTTP response.\n# \n# When `cors` is disabled all other `cors` relevant settings is not effective.\n#\n# By default `CORS` is disabled\n# \n# uncomment to enable CORS support\n#cors=true\n\n\n# `cors.origin` set the `Access-Control-Allow-Origin` response header.\n#\n# Default CORS origin header value is `*`\n#cors.origin=\n\n# `cors.headers` set the `Access-Control-Expose-Headers` response header.\n#\n# Default value is `Content-Type, X-HTTP-Method-Override`\n#cors.headers=\n\n# `cors.headers.expose` set the `Access-Control-Expose-Headers` response header.\n# \n# Default value is empty.\n#cors.headers.expose=\n\n# `cors.headers.allowed` set the `Access-Control-Allow-Headers` response header.\n# \n# Default value is empty.\n#cors.headers.allowed=\n\n# `cors.max_age` set the `Access-Control-Max-Age` response header\n#\n# Default value is `30*60` i.e. 30 minutes\n#cors.max_age\n\n# `cors.allow_credentials.enabled` set the `Access-Control-Allow-Credential` response header\n#\n# By default this setting is disabled\n#\n# Uncomment the set `Access-Control-Allow-Credential` to `true`\n#cors.allow_credentials=true\n\n# If `content_suffix.aware` is enabled the framework adjust Request `Accept`\n# header based on URL suffix.\n# \n# E.g. `/customer/123/json` will match the route `/customer/123`\n# and set the `Accept` header of the incoming request to `application/json`\n#\n# By default `content_suffix.aware` is disabled.\n#\n# Uncomment to enable `content_suffix.aware.enabled`\n#content_suffix.aware.enabled=true\n\n# `csp` set the `Content-Security-Policy` response header value.\n# \n# By default `csp` is not set.\n#csp=\n\n# `csrf` turn on/off the CSRF protection.\n# See https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)\n# \n# By default `csrf` protection is disabled\n#\n# uncomment to turn on CSRF protection.\n#csrf=true\n\n# `csrf.param_name` specifies the http request param name\n# used to convey the csrf token.\n#\n# Default value: `__csrf__`\n#csrf.param_name\n\n# `csrf.header.name` specifies name of the http request header\n# used to convey the csrf token sent from AJAX client.\n#\n# Default value: `X-Xsrf-Token` \n#csrf.header_name=\n\n# `csrf.cookie_name` specify the name of the cookie used to \n# convey the csrf token generated on the server for the first GET\n# request coming from a client.\n#\n# Default value: `XSRF-TOKEN`\n#csrf.cookie_name\n\n# `csrf.protector` specifies the implementation of `act.security.CSRFProtector`.\n#\n# Default protector implementation is `HMAC`\n#\n# uncomment to set csrf protector implementation\n#csrf.protector=RANDOM|className\n\n# `db.seq_gen` specifies the implementation of `act.db.util._SequenceNumberGenerator`\n# \n# Default value is `null` or an implementation specified by db plugin\n#db.seq_gen=\n\n# `dsp.token` specifies the name of \"double submission protect token\"\n# \n# Default value: `act_dsp_token`\n#dsp.token=\n\n# `enum.resolving.exact_match` specify whether it shall resolve enum value\n# in exact matching way or Keyword based variation way.\n#\n# Keyword based variation matching explain:\n#\n# Suppose we have an enum defination: `enum TestEnum {FOO_BAR}\n# All the following string variations can be resolved to `TestEnum.FOO_BAR`:\n#\n#   * FOO_BAR\n#   * Foo-Bar\n#   * Foo.Bar\n#   * foo-bar\n#   * foo_bar\n#   * FooBar\n#   * fooBar\n#\n# Default value is `false` meaning enum type value resolving is \n# non-exact matching\n#\n# uncomment to make Enum type parameter resolving be exact matching\n#enum.resolving.exact_match=false\n\n# `fmt.date` specifies the pattern for Date type value resolving\n# \n# The setting can be any one of\n# - long\n# - medium\n# - short\n# - custom pattern, e.g. `EEE yyyy MMM dd`\n#\n# Note custom pattern shall not contain any symbol for time, e.g. `H` or `m`\n# Default value: `medium`\n#fmt.date=\n\n# `fmt.<locale>.date` specifies the pattern for Date type for specific locale\n#\n# It can specify date formats for multiple locales\n# \n# Default value: `medium`\n# see also: `fmt.date`\n#fmt.zh_cn.date=yyyy年MM月dd日\n\n\n# `fmt.data_time` specifies the pattern for DataTime type value resolving.\n# \n# The setting can be any one of\n# - long\n# - medium\n# - short\n# - custom pattern, e.g. `EEE yyyy MMM dd`\n#\n# Default value: `medium`\n#fmt.date_time=\n\n# `fmt.<locale>.date_time` specifies the pattern for DateTime type for specific locale\n#\n# It can specify date_time formats for multiple locales\n# \n# Default value: `medium`\n# see also: `fmt.date_time`\n#fmt.zh_cn.date_time=yyyy年MM月dd日 HH:mm\n\n# `fmt.time` specifies the pattern for Time type value resolving\n# \n# The setting can be any one of\n# - long\n# - medium\n# - short\n# - custom pattern, e.g. `HHmmss`\n#\n# Note custom pattern shall not contain any symbol for date, e.g. `y` or `M`\n# Default value: `medium`\n#fmt.time=\n\n# `fmt.<locale>.time` specifies the pattern for Time type for specific locale.\n#\n# It can specify time formats for multiple locales\n# \n# Default value: `medium`\n# see also: `fmt.time`\n#fmt.zh_cn.time=HH:mm\n\n# `handler.csrf_check_failure` specifies the implemetation of `MissingAuthenticationHandler`\n# to be called when CSRF checking failed.\n#\n# Default value is the setting of `handler.missing_authentication`\n#handler.csrf_check_failure=\n\n# `handler.missing_authentication` specifies the implemetation of `MissingAuthenticationHandler`\n# to be called when authentication is failed on an non-AJAX request.\n#\n# Default value is `act.util.RedirectToLoginUrl` if login URL is in the route table.\n# otherwise it is `act.util.ReturnUnauthorized`\n#handler.missing_authentication=\n\n# `handler.missing_authentication` specifies the implemetation of `MissingAuthenticationHandler`\n# to be called when authentication is failed on an AJAX request.\n#\n# Default value is the setting of `handler.missing_authentication`\n#handler.missing_authentication.ajax=\n\n# `handler.unknown_http_method` specifies the handler implementation to be called\n# when ActFramework found the HTTP method of an incoming request is not supported\n# \n# Default value is `UnknownHttpMethodProcessor.METHOD_NOT_ALLOWED`, i.e. \n# respond `405 Method Not Allowed` response.\n#handler.unknown_http_method=\n\n# `act.header.overwrite` turn on/off HTTP HEADER overwrite.\n#\n# Once this config is turned on, then it can overwrite header\n# with HTTP Query parameter or HTTP post form field. The naming\n# convention of the param/field is:\n#\n# ```\n# act_header_<header_name_in_lowercase_and_underscore>\n# ```\n#\n# For example, if it needs to overwrite `Content-Type`, use\n# `act_header_content_type` as the query parameter name.\n#\n# Default value: `false`\n#header.overwrite=true\n\n\n# `header.session.expiration` specifies name of the HTTP response header to be \n# used to convey the JWT/session cookie expiration time.\n# \n# Default value is `Act-Session-Expires`\n#header.session.expiration=\n\n# `host` specifies the hostname of the application.\n#\n# This setting is often used to concatentate full URL including host\n# in email template.\n#\n# Default value: `localhost`\n#host=\n\n# `http.external_server` specify if the app is running behind a frontend\n# http server, e.g. nginx.\n#\n# Default value: `true` when running in `prod` mode or `false` when running in `dev` mode\n#http.external_server=true|false\n\n# `http.params.max` specifies the maximum number of http parameters.\n#\n# This setting can be to prevent the hash collision DOS attack.\n#\n# Default value: 128\n#http.params.max=\n\n# `http.port` specifies the default HTTP port number\n#\n# Default value: 5460\nhttp.port=8080\n\n# `http.port.external` specifies the default HTTP port number of\n# frontend HTTP server (if exists).\n#\n# Default value: 80\n#http.port.external=\n\n# `http.port.external.secure` specifies the default HTTPS port number of\n# the frontend HTTP server (if exists)\n#\n# Default value: 443\n#http.port.external.secure=\n\n# `http.secure` specifies whether the default http port is running in\n# an secure HTTP channel\n#\n# Default value: `true` when running in `prod` mode or `false` in `dev` mode\n#http.secure=true|false\n\n# `https.port` specify the https port - only effect \n# when `ssl` is enabled.\n#\n# Default value: `5443`\n#https.port=\n\n# `i18n` turn on/off i18n support in ActFramework.\n# \n# Default value: false\n#i18n=true|false\n\n# `i18n.locale.param_name` specifies the param name to set client locale \n# in http request\n# \n# Default value: `act_locale`\n#i18n.locale.param_name=\n\n# `i18n.locale.cookie_name` specifies the name for the locale cookie\n# \n# Default value: `act_locale`\n#i18n.locale.cookie_name=\n\n# `idgen.node_id.provider` specifies the implementation of \n# `act.util.IdGenerator.NodeIdProvider` which is called when generating the \n# CUID (Custer Unique Identifier)\n# \n# Default value: `act.util.IdGenerator.NodeIdProvider.IpProvider`\n#idgen.node_id.provider=\n\n# `idgen.node_id.effective_ip_bytes.size` specifies how many bytes in the ip address\n# will be used to calculate node ID. Usually in a cluster environment, the ip address will\n# be different at only (last) one byte or (last) two bytes, in which case it could set this\n# configuration to `1` or `2`. When the configuration is set to `4` then  it means all 4 IP \n# bytes will be used to calculate the node ID\n#\n# Default value: 4\n#idgen.node_id.effective_ip_bytes.size=1|2|3|4\n\n# `idgen.start_id.provider` specifies the `act.util.IdGenerator.StartIdProvider`\n# implementation which is called when generating the CUID\n# \n# Default value: `act.util.IdGenerator.StartIdProvider.DefaultStartIdProvider`\n# which read/write the file specified by `idgen.start_id.file` setting in \n# the project dir.\n#idgen.start_id.provider=\n\n# `idgen.start_id.file` specifies the start id persistent file.\n# This setting is used by `act.util.IdGenerator.StartIdProvider.DefaultStartIdProvider`\n# \n# Default value: `.act.id-app`\n#idgen.start_id.file=\n\n# `idgen.seq_id.provider` specifies the `act.util.IdGenerator.SequenceProvider`\n# implementation which is called when generating the CUID.\n#\n# Default value: `act.util.IdGenerator.SequenceProvider.AtomicLongSeq`\n#idgen.seq_id.provider=\n\n# `idgen.encoder` specifies the `act.util.IdGenerator.LongEncoder` implementation\n# which is called when generating the CUID.\n#\n# Default value: `act.util.IdGenerator.SafeLongEncoder` which generates URL \n# safe and slighty longer string for long value encoding.\n#idgen.encoder=act.util.IdGenerator.SafeLongEncoder|act.util.IdGenerator.UnsafeLongEncoder\n\n# `job.pool.size` specifies the maximum number of threads\n# can exists in the application's job manager's thread pool\n#\n# Default value: 10\n#job.pool.size=\n\n# `jwt` enable/disable JWT support.\n# This is actually a combination of the following settings:\n# * session.codec=act.session.JsonWebTokenSessionCodec\n# * session.header.payload.prefix=\"Bearer \" # note the space after `Bearer`\n# * session.header=Authorization\n#jwt=true|false\n\n# `jwt.algo` specifies the algorithm used to encrypt/decrypt JWT.\n#\n# Default value: SHA256\n#jwt.algo=SHA256|SHA384|SHA512\n\n# `jwt.issuer` specify `iss` payload of JWT\n#\n# Default value: the setting of `cookie.prefix`\n#jwt.issuer=\n\n# `locale` specifies the application default locale\n#\n# Default value: the result of calling `java.util.Locale#getDefault()`\n#locale=\n\n# `metric` turn on/off internal metrics.\n#\n# Default value: true\n#metric=true|false\n\n# `modules` declare additional app base (for multi-module maven projects)\n#modules=\n\n# `namedPorts` specifies a list of port names this\n# application listen to. These are additional ports other than\n# the default `http.port` setting.\n#\n# Default value: null\n#namedPorts=admin:8888;ipc:8899;...\n\n# `password.spec` specify default password spec which is used to\n# validate user password.\n#\n# Default value:\n# * dev mode: `a[3,]`, meaning require lower case letter and min length is 3 characters.\n# * prod mode: `aA0[6,]`, meaning require lower case letter, uppercase letter, digit and min length is 6 characters.\n#\n# Developer can also specify a `Password.Validator` implementation\n# class for this configuration, in which case, the framework will instantiate the user\n# specified validator instead of `act.validation.PasswordSpec` as the default\n# password validator.\n#\n#password.spec=\n\n# `ping.path` specify the ping path.\n# If this setting is specified, then when session resolving, system\n# will check if the current URL matches the setting. If matched\n# then session cookie expiration time will not be changed. Otherwise\n# the expiration time will refresh\n#\n# Default value: `null`\n#ping.path=\n\n# `req.throttle` specifies the maximum number of requests\n# that can be handled per second from the same ip address\n# when `@Throttled` annotation is presented without `value`\n# specified on a request handler method.\n# \n# Default value: 2\n#req.throttle=\n\n# `req.throttle.expire.scale` turn on/off request throttle\n# expiry time increment.\n#\n# Default value: `false`\n#req.throttle.expire.scale=true|false\n\n# `render.json.content_type.ie` specify whether the content type\n# of JSON response on request initiated from an IE browser.\n#\n# Note early IE browser does not support the `application/json` content type.\n# \n# Default value: `null` \n#render.json.content_type.ie=\n\n# `resolver.template_path` specifies the class that extends\n# `TemplatePathResolver`. Application developer could use this \n# configuration to add some flexibility to\n# template path resolving logic, e.g. different home \n# for different locale or different home for different device \n# type etc\n#\n# Defautl value: `TemplatePathResolver`\n#resolver.template_path\n\n# `resource.preload.size.limit` Specifies the maximum number of bytes of \n# a resource that can be preload into memory. Specify the setting to\n# `0` or negative value disable resource preload feature.\n# \n# Default value: `1024 * 10`, i.e. 10KB\n#resource.preload.size.limit=\n\n# `scan_package` specify the app package in which all classes is subject\n# to bytecode processing, e.g enhancement and injection.\n# \n# By default ActFramework will infer the scan package\n# from the app entry class which contains the main method\n# starting act.\n#\n#scan_package=\n\n# `act.secret` Specifies the secret key the application used to do general\n# encrypt/decrypt/sign etc\n#\n# Note application must set this configuration to secure the communication\nact.secret=7cCKNhrzENbuyPtUIHaiYny2UmAwY00ww5l2yHC2K1AS8m06gJ97NjyREl27joUn\n\n# `secret.rotate` turn on app secret rotation for session/flash\n# token signing and encrypt. This feature makes it even harder\n# to crack as secret changes regularly.\n#\n# Default value: false\n#secret.rotate=true|false\n\n# `secret.rotate.period` set the secret rotate period in terms of minute.\n#\n# **Note** the number of minute must be a factor of 60. Any number that\n# is not the factor of 60 then it will be up rounded:\n#\n# * 1 -> 1\n# * 2 -> 2\n# * 3 -> 4\n# * 4 -> 4\n# * 5 -> 5\n# * 6 -> 6\n# * 7 -> 10\n# * 8 -> 10\n# * 33 -> 30\n# * 50 -> 60\n#\n# the rotation period less than hour will be count from the beginning of\n# the current hour.\n#\n# If the number minutes exceeds 60, then it must be a factor of 60 * 24. Any\n# number if not will be rounded:\n#\n# * 65 -> 60\n# * 60 * 3 -> 60 * 3\n# * 60 * 5 -> 60 * 6\n# * 60 * 7 -> 60 * 6\n# * 60 * 10 -> 60 * 12 (half day)\n#\n# if the number of minutes equals of exceeds 120, the rotation period will\n# be counted from the beginning of the day.\n#\n# The maximum period is `60 * 24`, i.e. 24 hours. Any setting exceed that number\n# will be cut off down to 24 hours.\n#\n# Default value: `30` minutes, ie. half an hour\n#secret.rotate.period=\n\n# `server.header` specifies the server header to be output to the response\n#\n# Default value: `act/${act-version}`\n#server.header=\n\n#`session.outputExpiration.enabled` turn on/off expiration output to\n# response header.\n#\n# This setting only effective when it is using token to\n# map session payload.\n#\n# Default value: `true`\n#session.outputExpiration=true|false\n\n# `session.ttl` specifies the session duration in seconds.\n# If user failed to interact with server for amount of time that\n# exceeds the setting then the session will be destroyed\n#\n# Default value: `60 * 30` i.e half an hour\n#session.ttl=\n\n# `session.persistent` specify whether the system\n# should treat session cookie as persistent cookie. If this setting\n# is enabled, then the user's session will not be destroyed after\n# browser closed.\n#\n# Refer to http://en.wikipedia.org/wiki/HTTP_cookie#Persistent_cookie\n#\n# Default value: `false`\n#session.persistent=true|false\n\n# `session.encrypted` specify whether the system should\n# encrypt the key/value pairs in the session cookie. Enable session\n# encryption will greatly improve the security but with the cost\n# of additional CPU usage and a little bit longer time on request\n# processing.\n#\n# Default value: `false`\n#session.encrypted=true|false\n\n# `session.key.username` specifies the session key for username\n# \n# Default value: `username`\n#session.key.username=\n\n# `session.mapper` specifies the implementation of `act.session.SessionMapper`\n# Predefined session mappers:\n# * `act.session.CookieSessionMapper` - map session data to session cookie\n# * `act.session.HeaderTokenSessionMapper` - map session data to header token\n# * `act.session.CookieAndHeaderSessionMapper` - map session data to both cookie and header\n# \n# Default value:`act.session.CookieSessionMapper`\n#session.mapper=\n\n# `session.codec` specifies the implementation of `act.session.SessionCodec`\n# Predefined session codec:\n# * `act.session.DefaultSessionCodec`\n# * `act.session.JsonWebTokenSessionCodec`\n#\n# Default value: `act.session.DefaultSessionCodec` when `jwt` is `false`\n# or `act.session.JsonWebTokenSessionCodec` when `jwt` is `true`\n#session.codec=\n\n# `session.header` - specify the session header name.\n# \n# Effective only when `act.session.SessionMapper` is `act.session.HeaderTokenSessionMapper`\n# \n# Default value: X-Act-Session when `jwt` is `false`\n# or `Authorization` when `jwt` is `true`\n#session.header=\n\n# `session.header.payload.prefix` set the session payload prefix, e.g. `Bearer `\n#\n# Default value: `null` when `jwt` is `false`\n# or `Bearer ` when `jwt` is `true`\n#session.header.payload.prefix=\n\n# `session.secure` specifies whether the session cookie should\n# be set as secure. Enable secure session will cause session cookie only\n# effective in https connection. Literally this will enforce the web site to run\n# default by https.\n#\n# Default value: `true`\n#\n# **Note** when {@link Act Act server} is running in {@link Act.Mode#DEV mode}\n# session http only will be disabled without regarding to the `session.secure.enabled`\n# setting\n#session.secure=true|false\n\n# `source.version` specifies the java version\n# of the src code. This configuration is used only\n# in dev mode.\n# \n# Default value: 1.7\n#source.version=\n\n# `ssl` turn on/off SSL support.\n# \n# Default value: `false`\n# \n# **Note** this is experimental feature\n#ssl=true|false\n\n# `target.version` specifies the java version of the compile \n# target code. This configuration is used only in dev mode.\n#\n# Default value: 1.7\n#target.version=\n\n# `template.home` specifies where the view templates resides.\n# If not specified then will use the {@link View#name() view name\n# in lower case} as the template home if that view is used.\n#\n# Default value: the result of `View.name()`\n#template.home=\n\n# `threadlocal_buf.limit` set the maximum buffer size of thread local instance\n# of `org.osgl.util.S.Buffer` and `org.osgl.util.ByteArrayBuffer`. If the buffer\n# size exceeds the limit, the thread local instance will be dropped and new \n# instance will be created as the thread local instance.\n#\n# Default value: 1024 * 8 (i.e. 8k)\n#threadlocal_buf.limit=\n\n# `trace.handler` turn on/off handle invocation calls.\n#\n# When this configuration is turned on, every call to the\n# action handler/job handler/mail sender method will be logged.\n#\n# Default value: `false`\n#trace.handler=true|false\n\n# `trace.request` turn on/off incoming request log\n#\n# When this configuration is turned on, every incoming request\n# will be logged\n#\n# default value: `false`\n#trace.request=true|false\n\n# `upload.in_memory.threshold`\n#\n# If file upload content length is less than this configuration then\n# the file will not get written into disk, instead it will get cached\n# into a in memory byte array\n#\n# Default value: `1024 * 10`\n#upload.in_memory.threshold\n\n# `url.context` specifies the app global URL context.\n#\n# If this configuration is specified then all route configured will\n# be attached to the configured context path.\n#\n# Default value: `null`\n#url.context=\n\n# `url.login` specifies the login URL which is used\n# by {@link act.util.RedirectToLoginUrl}\n# \n# Default value: `/login`\n#url.login=\n\n# `url.login.ajax` specifies the login URL which is used\n# by {@link act.util.RedirectToLoginUrl} when request is AJAX\n# \n# Default value: the value of `url.login` setting\n#url.login.ajax\n\n# `view.default` specifies the default view solution. If there\n# are multiple views registered and default view are available, then\n# it will be used at priority to load the templates\n#\n# Default value: `rythm`\n#view.default=\n"
  },
  {
    "path": "act/src/main/resources/conf/prod/app.properties",
    "content": "##############################################\n# Application configuration for prod profile\n# act-1.8.8-RC8\n##############################################\nact.secret=mHklV2nkYwkWAVuWRulJfkNnncZ4j3yvFoFzi9hfH94kmg0HM0ZcJxQoxM26vg3t"
  },
  {
    "path": "act/src/main/resources/conf/uat/app.properties",
    "content": "##############################################\n# Application configuration for uat profile\n# act-1.8.8-RC8\n##############################################\nact.secret=bHn8o3k7r9tKuCFgRFjKVUwVVxxUcZXRynuMWgzK0zBJUBeh6q9UQJh0cIXz0NUu"
  },
  {
    "path": "act/src/main/resources/e2e/scenarios.yml",
    "content": "Scenario(REST Hello Service):\n  description: a service says hello\n  interactions:\n    - description: send request to hello service without parameter\n      request:\n        method: GET\n        url: /rest/hello\n      response:\n        text: Hello world # response text must be \"Hello world\"\n"
  },
  {
    "path": "act/src/main/resources/logback.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<configuration>\n\n  <statusListener class=\"ch.qos.logback.core.status.NopStatusListener\" />\n\n  <!-- Send debug messages to System.out -->\n  <appender name=\"STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n    <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->\n    <withJansi>true</withJansi>\n    <encoder>\n      <pattern>%date %highlight(%-5level) %cyan(%logger{5}@[%-4.30thread]) - %msg%n</pattern>\n    </encoder>\n  </appender>\n\n  <!-- Console output for act-e2e test log -->\n  <appender name=\"E2E_STDOUT\" class=\"ch.qos.logback.core.ConsoleAppender\">\n    <!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->\n    <withJansi>true</withJansi>\n    <encoder>\n      <pattern>%msg%n</pattern>\n    </encoder>\n  </appender>\n\n  <!-- main log file -->\n  <appender name=\"FILE\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\n    <file>act.log</file>\n    <encoder class=\"ch.qos.logback.classic.encoder.PatternLayoutEncoder\">\n      <Pattern>%d{yyyy-MM-dd_HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>\n    </encoder>\n\n    <rollingPolicy class=\"ch.qos.logback.core.rolling.FixedWindowRollingPolicy\">\n      <FileNamePattern>/act.%i.log.zip</FileNamePattern>\n      <MinIndex>1</MinIndex>\n      <MaxIndex>10</MaxIndex>\n    </rollingPolicy>\n\n    <triggeringPolicy class=\"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy\">\n      <MaxFileSize>2MB</MaxFileSize>\n    </triggeringPolicy>\n  </appender>\n\n  <!-- act-e2e test log file -->\n  <appender name=\"E2E_FILE\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\n    <file>e2e.log</file>\n    <encoder class=\"ch.qos.logback.classic.encoder.PatternLayoutEncoder\">\n      <Pattern>%msg%n</Pattern>\n    </encoder>\n  </appender>\n\n  <appender name=\"DB_FILE\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\n    <file>act-db.log</file>\n    <encoder class=\"ch.qos.logback.classic.encoder.PatternLayoutEncoder\">\n      <Pattern>%d{yyyy-MM-dd_HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>\n    </encoder>\n\n    <rollingPolicy class=\"ch.qos.logback.core.rolling.FixedWindowRollingPolicy\">\n      <FileNamePattern>/act-db.%i.log.zip</FileNamePattern>\n      <MinIndex>1</MinIndex>\n      <MaxIndex>10</MaxIndex>\n    </rollingPolicy>\n\n    <triggeringPolicy class=\"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy\">\n      <MaxFileSize>2MB</MaxFileSize>\n    </triggeringPolicy>\n  </appender>\n\n  <appender name=\"METRIC_FILE\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\n    <file>act-metric.log</file>\n    <encoder class=\"ch.qos.logback.classic.encoder.PatternLayoutEncoder\">\n      <Pattern>%d{yyyy-MM-dd_HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>\n    </encoder>\n\n    <rollingPolicy class=\"ch.qos.logback.core.rolling.FixedWindowRollingPolicy\">\n      <FileNamePattern>/act-metric.%i.log.zip</FileNamePattern>\n      <MinIndex>1</MinIndex>\n      <MaxIndex>10</MaxIndex>\n    </rollingPolicy>\n\n    <triggeringPolicy class=\"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy\">\n      <MaxFileSize>2MB</MaxFileSize>\n    </triggeringPolicy>\n  </appender>\n\n  <logger name=\"act\" level=\"INFO\" additivity=\"false\">\n    <appender-ref ref=\"FILE\" />\n    <appender-ref ref=\"STDOUT\" />\n  </logger>\n\n  <logger name=\"act.mail\" level=\"DEBUG\" additivity=\"false\">\n    <appender-ref ref=\"STDOUT\"/>\n  </logger>\n\n  <logger name=\"act.db\" level=\"INFO\" additivity=\"false\">\n    <appender-ref ref=\"DB_FILE\" />\n  </logger>\n\n  <logger name=\"act.e2e\" level=\"INFO\" additivity=\"false\">\n    <appender-ref ref=\"E2E_STDOUT\"/>\n    <appender-ref ref=\"E2E_FILE\"/>\n  </logger>\n\n  <logger name=\"act.metric\" level=\"TRACE\">\n    <appender-ref ref=\"METRIC_FILE\" />\n  </logger>\n\n  <logger name=\"benchmark.act\" level=\"DEBUG\" additivity=\"false\">\n    <appender-ref ref=\"FILE\" />\n    <appender-ref ref=\"STDOUT\" />\n  </logger>\n\n  <!-- By default, the level of the root level is set to INFO -->\n  <root level=\"INFO\">\n    <appender-ref ref=\"STDOUT\" />\n  </root>\n</configuration>\n"
  },
  {
    "path": "act/src/main/resources/routes.conf",
    "content": "GET /rest/hello echo:Hello world\n"
  },
  {
    "path": "armeria/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.colobu</groupId>\n    <artifactId>armeria</artifactId>\n    <version>1.0-SNAPSHOT</version>\n    <properties>\n        <netty.version>4.1.0.CR7</netty.version>\n        <armeria.version>0.97.0</armeria.version>\n        <thrift.version>0.9.3</thrift.version>\n    </properties>\n\n    <dependencies>\n        <dependency>\n            <groupId>com.linecorp.armeria</groupId>\n            <artifactId>armeria</artifactId>\n            <version>${armeria.version}</version>\n        </dependency>\n        <!--<dependency>-->\n            <!--<groupId>org.apache.thrift</groupId>-->\n            <!--<artifactId>libthrift</artifactId>-->\n            <!--<version>${thrift.version}</version>-->\n        <!--</dependency>-->\n    </dependencies>\n\n    <pluginRepositories>\n        <pluginRepository>\n            <id>dtrott</id>\n            <url>https://maven.davidtrott.com/repository</url>\n        </pluginRepository>\n    </pluginRepositories>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.armeria.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.armeria.Main</mainClass>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.thrift.tools</groupId>\n                <artifactId>maven-thrift-plugin</artifactId>\n                <version>0.1.10</version>\n                <!--<configuration>-->\n                    <!--<thriftExecutable>/usr/local/bin/thrift</thriftExecutable>-->\n                <!--</configuration>-->\n                <executions>\n                    <execution>\n                        <id>thrift-sources</id>\n                        <phase>generate-sources</phase>\n                        <goals>\n                            <goal>compile</goal>\n                        </goals>\n                    </execution>\n                    <execution>\n                        <id>thrift-test-sources</id>\n                        <phase>generate-test-sources</phase>\n                        <goals>\n                            <goal>testCompile</goal>\n                        </goals>\n                    </execution>\n                </executions>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "armeria/src/main/java/com/colobu/armeria/Main.java",
    "content": "package com.colobu.armeria;\n\nimport com.colobu.armeria.service.thrift.v1.HelloService;\nimport com.linecorp.armeria.common.SerializationFormat;\nimport com.linecorp.armeria.common.SessionProtocol;\nimport com.linecorp.armeria.server.Server;\nimport com.linecorp.armeria.server.ServerBuilder;\nimport com.linecorp.armeria.server.docs.DocService;\nimport com.linecorp.armeria.server.thrift.ThriftService;\nimport org.apache.thrift.TException;\nimport org.apache.thrift.async.AsyncMethodCallback;\n\npublic class Main {\n    public static void main(String[] args) {\n        HelloService.AsyncIface helloHandler = new HelloService.AsyncIface(){\n            @Override\n            public void hello(AsyncMethodCallback resultHandler) throws TException {\n                resultHandler.onComplete(\"Hello world\");\n            }\n        };\n\n        ServerBuilder sb = new ServerBuilder();\n        sb.port(8080, SessionProtocol.HTTP);\n        sb.serviceAt(\"/hello\", ThriftService.of(helloHandler, SerializationFormat.THRIFT_BINARY))\n                .serviceUnder(\"/docs/\", new DocService());\n\n        Server server= sb.build();\n        server.start();\n    }\n}\n"
  },
  {
    "path": "armeria/src/main/thrift/v1/main.thrift",
    "content": "namespace java com.colobu.armeria.service.thrift.v1\n\nservice HelloService {\n    string hello()\n}"
  },
  {
    "path": "dropwizard/hello.yml",
    "content": "server:\n  type: default\n  rootPath: /rest/*\n  applicationConnectors:\n    - type: http\n      bindHost: 0.0.0.0\n      port: 8080\n  adminConnectors:\n    - type: http\n      bindHost: 127.0.0.1\n      port: 8081\nlogging:\n  level: INFO\n  loggers:\n    \"com.colobu.rest.dropwizard\": DEBUG"
  },
  {
    "path": "dropwizard/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n\n    <artifactId>dropwizard</artifactId>\n\n\n    <dependencies>\n        <dependency>\n            <artifactId>jaxrs-common</artifactId>\n            <groupId>com.colobu</groupId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.dropwizard</groupId>\n            <artifactId>dropwizard-core</artifactId>\n            <version>${dropwizard.version}</version>\n        </dependency>\n    </dependencies>\n\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.rest.dropwizard.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>2.4</version>\n                <configuration>\n                    <archive>\n                        <manifest>\n                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>\n                        </manifest>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.dropwizard.Main</mainClass>\n                    <arguments>\n                        <argument>server</argument>\n                        <argument>${project.basedir}/hello.yml</argument>\n                    </arguments>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "dropwizard/src/main/java/com/colobu/rest/dropwizard/Main.java",
    "content": "package com.colobu.rest.dropwizard;\n\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        new MyApplication().run(args);\n    }\n}\n"
  },
  {
    "path": "dropwizard/src/main/java/com/colobu/rest/dropwizard/MyApplication.java",
    "content": "package com.colobu.rest.dropwizard;\n\nimport com.colobu.rest.jaxrs.HelloResource;\nimport com.colobu.rest.jaxrs.HelloResourceAsync;\n\nimport io.dropwizard.Application;\nimport io.dropwizard.setup.Bootstrap;\nimport io.dropwizard.setup.Environment;\n\npublic class MyApplication extends Application<MyConfiguration> {\n\n    @Override\n    public String getName() {\n        return \"rest\";\n    }\n\n    @Override\n    public void initialize(Bootstrap<MyConfiguration> bootstrap) {\n        // nothing to do yet\n    }\n\n    @Override\n    public void run(MyConfiguration myConfiguration, Environment environment) throws Exception {\n        environment.healthChecks().register(\"healthcheck\", new MyHealthCheck());\n        environment.jersey().register(new HelloResource());\n        environment.jersey().register(new HelloResourceAsync());\n    }\n}\n"
  },
  {
    "path": "dropwizard/src/main/java/com/colobu/rest/dropwizard/MyConfiguration.java",
    "content": "package com.colobu.rest.dropwizard;\n\n\nimport io.dropwizard.Configuration;\n\n// add configuration if necessary.\npublic class MyConfiguration extends Configuration {\n}\n"
  },
  {
    "path": "dropwizard/src/main/java/com/colobu/rest/dropwizard/MyHealthCheck.java",
    "content": "package com.colobu.rest.dropwizard;\n\nimport com.codahale.metrics.health.HealthCheck;\n\npublic class MyHealthCheck extends HealthCheck {\n    @Override\n    protected Result check() throws Exception {\n        //Result.unhealthy\n        return Result.healthy();\n    }\n}"
  },
  {
    "path": "go/main.go",
    "content": "package main\n\nimport (\n\t\"log\"\n\t\"net/http\"\n)\n\n// There are some golang RESTful libraries and mux libraries but i use the simplest to test.\nfunc main() {\n\thttp.HandleFunc(\"/rest/hello\", func(w http.ResponseWriter, r *http.Request) {\n\t\tw.Write([]byte(\"Hello world\"))\n\t})\n\n\terr := http.ListenAndServe(\":8080\", nil)\n\tif err != nil {\n\t\tlog.Fatal(\"ListenAndServe: \", err)\n\t}\n}\n"
  },
  {
    "path": "go-fasthttp/main.go",
    "content": "package main\n\nimport (\n\t\"log\"\n\n\t\"github.com/valyala/fasthttp\"\n)\n\nfunc main() {\n\terr := fasthttp.ListenAndServe(\":8080\", fastHTTPHandler)\n\tif err != nil {\n\t\tlog.Fatal(\"ListenAndServe: \", err)\n\t}\n}\n\nfunc fastHTTPHandler(ctx *fasthttp.RequestCtx) {\n\tif string(ctx.Method()) == \"GET\" {\n\t\tswitch string(ctx.Path()) {\n\t\tcase \"/rest/hello\":\n\t\t\tctx.Write([]byte(\"Hello world\"))\n\t\tdefault:\n\t\t\tctx.Error(\"Unsupported path\", fasthttp.StatusNotFound)\n\t\t}\n\t\treturn\n\t}\n}\n"
  },
  {
    "path": "jaxrs-common/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>jaxrs-common</artifactId>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.jboss.spec.javax.ws.rs</groupId>\n            <artifactId>jboss-jaxrs-api_2.0_spec</artifactId>\n            <version>1.0.0.Final</version>\n            <scope>provided</scope>\n        </dependency>\n    </dependencies>\n</project>"
  },
  {
    "path": "jaxrs-common/src/main/java/com/colobu/rest/jaxrs/HelloResource.java",
    "content": "package com.colobu.rest.jaxrs;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"/rest/hello\")\npublic class HelloResource {\n    public HelloResource() {\n        System.out.println(\"HelloResource()\");\n    }\n    \n    @GET\n    @Produces(MediaType.TEXT_PLAIN)\n    public String helloAsync() {\n        return \"Hello world\";\n    }\n\n}\n"
  },
  {
    "path": "jaxrs-common/src/main/java/com/colobu/rest/jaxrs/HelloResourceAsync.java",
    "content": "package com.colobu.rest.jaxrs;\n\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\n\nimport javax.ws.rs.GET;\nimport javax.ws.rs.Path;\nimport javax.ws.rs.Produces;\nimport javax.ws.rs.container.AsyncResponse;\nimport javax.ws.rs.container.Suspended;\nimport javax.ws.rs.core.MediaType;\n\n@Path(\"/rest/helloAsync\")\npublic class HelloResourceAsync {\n    private ExecutorService executor = Executors\n            .newFixedThreadPool(Integer.getInteger(\"com.colobu.rest.jaxrs.concurrency\", 16));\n\n    public HelloResourceAsync() {\n        System.out.println(\"HelloResourceAsync()\");\n    }\n\n    @GET\n    @Produces(MediaType.TEXT_PLAIN)\n    public void helloAsync(@Suspended final AsyncResponse response) {\n        executor.execute(() -> {\n            response.resume(\"Hello world\");\n        });\n    }\n\n}\n"
  },
  {
    "path": "jaxrs-common/src/main/java/com/colobu/rest/jaxrs/MyApplication.java",
    "content": "package com.colobu.rest.jaxrs;\n\nimport java.util.Collections;\nimport java.util.HashSet;\nimport java.util.Set;\n\nimport javax.ws.rs.ApplicationPath;\nimport javax.ws.rs.core.Application;\n\n@ApplicationPath(\"\")\npublic class MyApplication extends Application {\n    @Override\n    public Set<Class<?>> getClasses() {\n        return Collections.emptySet();\n    }\n\n    @Override\n    public Set<Object> getSingletons() {\n        HashSet<Object> classes = new HashSet<>();\n        classes.add(new HelloResource());\n        classes.add(new HelloResourceAsync());\n        return classes;\n    }\n\n}\n"
  },
  {
    "path": "jersey-grizzly2/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\t<parent>\n\t\t<artifactId>restful-services</artifactId>\n\t\t<groupId>com.colobu</groupId>\n\t\t<version>1.0-SNAPSHOT</version>\n\t</parent>\n\t<modelVersion>4.0.0</modelVersion>\n\n\t<artifactId>jersey-grizzly2</artifactId>\n\n\t<dependencies>\n\t\t<dependency>\n\t\t\t<artifactId>jaxrs-common</artifactId>\n\t\t\t<groupId>com.colobu</groupId>\n\t\t\t<version>${project.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.glassfish.jersey.inject</groupId>\n\t\t\t<artifactId>jersey-hk2</artifactId>\n\t\t\t<version>2.27</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.glassfish.jersey.containers</groupId>\n\t\t\t<artifactId>jersey-container-grizzly2-http</artifactId>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>junit</groupId>\n\t\t\t<artifactId>junit</artifactId>\n\t\t\t<version>4.13.1</version>\n\t\t\t<scope>test</scope>\n\t\t</dependency>\n\t</dependencies>\n\n\t<build>\n\t\t<plugins>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.apache.maven.plugins</groupId>\n\t\t\t\t<artifactId>maven-shade-plugin</artifactId>\n\t\t\t\t<version>2.4.2</version>\n\t\t\t\t<configuration>\n\t\t\t\t\t<createDependencyReducedPom>true</createDependencyReducedPom>\n\t\t\t\t\t<filters>\n\t\t\t\t\t\t<filter>\n\t\t\t\t\t\t\t<artifact>*:*</artifact>\n\t\t\t\t\t\t\t<excludes>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.SF</exclude>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.DSA</exclude>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.RSA</exclude>\n\t\t\t\t\t\t\t</excludes>\n\t\t\t\t\t\t</filter>\n\t\t\t\t\t</filters>\n\t\t\t\t</configuration>\n\t\t\t\t<executions>\n\t\t\t\t\t<execution>\n\t\t\t\t\t\t<phase>package</phase>\n\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t<goal>shade</goal>\n\t\t\t\t\t\t</goals>\n\t\t\t\t\t\t<configuration>\n\t\t\t\t\t\t\t<transformers>\n\t\t\t\t\t\t\t\t<transformer\n\t\t\t\t\t\t\t\t\timplementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\" />\n\t\t\t\t\t\t\t\t<transformer\n\t\t\t\t\t\t\t\t\timplementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n\t\t\t\t\t\t\t\t\t<mainClass>com.colobu.rest.jerseygrizzly2.Main</mainClass>\n\t\t\t\t\t\t\t\t</transformer>\n\t\t\t\t\t\t\t</transformers>\n\t\t\t\t\t\t</configuration>\n\t\t\t\t\t</execution>\n\t\t\t\t</executions>\n\t\t\t</plugin>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.codehaus.mojo</groupId>\n\t\t\t\t<artifactId>exec-maven-plugin</artifactId>\n\t\t\t\t<version>1.2.1</version>\n\t\t\t\t<executions>\n\t\t\t\t\t<execution>\n\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t<goal>java</goal>\n\t\t\t\t\t\t</goals>\n\t\t\t\t\t</execution>\n\t\t\t\t</executions>\n\t\t\t\t<configuration>\n\t\t\t\t\t<mainClass>com.colobu.rest.jerseygrizzly2.Main</mainClass>\n\t\t\t\t</configuration>\n\t\t\t</plugin>\n\t\t</plugins>\n\t</build>\n</project>\n"
  },
  {
    "path": "jersey-grizzly2/src/main/java/com/colobu/rest/jerseygrizzly2/Main.java",
    "content": "package com.colobu.rest.jerseygrizzly2;\n\nimport java.io.IOException;\nimport java.net.URI;\n\nimport javax.ws.rs.core.UriBuilder;\n\nimport org.glassfish.grizzly.http.server.HttpServer;\nimport org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;\nimport org.glassfish.jersey.server.ResourceConfig;\n\nimport com.colobu.rest.jaxrs.MyApplication;\n\n\npublic class Main {\n    public static final String BASE_URI = \"http://localhost:8080/\";\n\n    public static HttpServer startServer(String host, int port) {\n        final ResourceConfig rc = ResourceConfig.forApplicationClass(MyApplication.class);\n        URI baseUri = UriBuilder.fromUri(BASE_URI).host(host).port(port).build();\n        return GrizzlyHttpServerFactory.createHttpServer(baseUri, rc);\n    }\n\n    public static void main(String[] args) throws IOException {\n        String host = \"0.0.0.0\";\n        int port = 8080;\n        if (args.length > 0) {\n            host = args[0];\n        }\n        if (args.length > 1) {\n            port = Integer.parseInt(args[1]);\n        }\n\n        final HttpServer server = startServer(host,port);\n        System.in.read();\n        server.shutdown();\n    }\n}\n\n"
  },
  {
    "path": "jersey-jetty/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\t<parent>\n\t\t<artifactId>restful-services</artifactId>\n\t\t<groupId>com.colobu</groupId>\n\t\t<version>1.0-SNAPSHOT</version>\n\t\t<relativePath>../pom.xml</relativePath>\n\t</parent>\n\t<modelVersion>4.0.0</modelVersion>\n\t<artifactId>jersey-jetty</artifactId>\n\n\n\t<dependencies>\n\t\t<dependency>\n\t\t\t<artifactId>jaxrs-common</artifactId>\n\t\t\t<groupId>com.colobu</groupId>\n\t\t\t<version>${project.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.glassfish.jersey.containers</groupId>\n\t\t\t<artifactId>jersey-container-jetty-http</artifactId>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.eclipse.jetty</groupId>\n\t\t\t<artifactId>jetty-server</artifactId>\n\t\t\t<version>${jetty.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.eclipse.jetty</groupId>\n\t\t\t<artifactId>jetty-util</artifactId>\n\t\t\t<version>${jetty.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.glassfish.jersey.inject</groupId>\n\t\t\t<artifactId>jersey-hk2</artifactId>\n\t\t\t<version>2.27</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>junit</groupId>\n\t\t\t<artifactId>junit</artifactId>\n\t\t\t<version>4.12</version>\n\t\t\t<scope>test</scope>\n\t\t</dependency>\n\t</dependencies>\n\n\t<build>\n\t\t<plugins>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.apache.maven.plugins</groupId>\n\t\t\t\t<artifactId>maven-shade-plugin</artifactId>\n\t\t\t\t<version>2.4.2</version>\n\t\t\t\t<configuration>\n\t\t\t\t\t<createDependencyReducedPom>true</createDependencyReducedPom>\n\t\t\t\t\t<filters>\n\t\t\t\t\t\t<filter>\n\t\t\t\t\t\t\t<artifact>*:*</artifact>\n\t\t\t\t\t\t\t<excludes>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.SF</exclude>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.DSA</exclude>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.RSA</exclude>\n\t\t\t\t\t\t\t</excludes>\n\t\t\t\t\t\t</filter>\n\t\t\t\t\t</filters>\n\t\t\t\t</configuration>\n\t\t\t\t<executions>\n\t\t\t\t\t<execution>\n\t\t\t\t\t\t<phase>package</phase>\n\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t<goal>shade</goal>\n\t\t\t\t\t\t</goals>\n\t\t\t\t\t\t<configuration>\n\t\t\t\t\t\t\t<transformers>\n\t\t\t\t\t\t\t\t<transformer\n\t\t\t\t\t\t\t\t\timplementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\" />\n\t\t\t\t\t\t\t\t<transformer\n\t\t\t\t\t\t\t\t\timplementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n\t\t\t\t\t\t\t\t\t<mainClass>com.colobu.rest.jerseyjetty.Main</mainClass>\n\t\t\t\t\t\t\t\t</transformer>\n\t\t\t\t\t\t\t</transformers>\n\t\t\t\t\t\t</configuration>\n\t\t\t\t\t</execution>\n\t\t\t\t</executions>\n\t\t\t</plugin>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.codehaus.mojo</groupId>\n\t\t\t\t<artifactId>exec-maven-plugin</artifactId>\n\t\t\t\t<version>1.2.1</version>\n\t\t\t\t<executions>\n\t\t\t\t\t<execution>\n\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t<goal>java</goal>\n\t\t\t\t\t\t</goals>\n\t\t\t\t\t</execution>\n\t\t\t\t</executions>\n\t\t\t\t<configuration>\n\t\t\t\t\t<mainClass>com.colobu.rest.jerseyjetty.Main</mainClass>\n\t\t\t\t</configuration>\n\t\t\t</plugin>\n\t\t</plugins>\n\t</build>\n\n</project>\n"
  },
  {
    "path": "jersey-jetty/src/main/java/com/colobu/rest/jerseyjetty/Main.java",
    "content": "package com.colobu.rest.jerseyjetty;\n\nimport org.eclipse.jetty.server.Server;\nimport org.glassfish.jersey.jetty.JettyHttpContainerFactory;\nimport org.glassfish.jersey.server.ResourceConfig;\n\nimport com.colobu.rest.jaxrs.MyApplication;\n\nimport javax.ws.rs.core.UriBuilder;\nimport java.net.URI;\n\n\npublic class Main {\n    public static final String BASE_URI = \"http://localhost:8080\";\n\n    public static Server startServer(String host, int port) {\n        final ResourceConfig rc = ResourceConfig.forApplicationClass(MyApplication.class);\n        URI baseUri = UriBuilder.fromUri(BASE_URI).host(host).port(port).build();\n        return JettyHttpContainerFactory.createServer(baseUri, rc);\n    }\n\n    public static void main(String[] args) throws Exception {\n        String host = \"0.0.0.0\";\n        int port = 8080;\n        if (args.length > 0) {\n            host = args[0];\n        }\n        if (args.length > 1) {\n            port = Integer.parseInt(args[1]);\n        }\n\n        final Server server = startServer(host, port);\n        System.in.read();\n        server.stop();\n    }\n}\n\n"
  },
  {
    "path": "light-java/pom.xml",
    "content": "<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd\">\n    <parent>\n        <groupId>org.sonatype.oss</groupId>\n        <artifactId>oss-parent</artifactId>\n        <version>5</version>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <groupId>io.swagger</groupId>\n    <artifactId>swagger-light-java</artifactId>\n    <packaging>jar</packaging>\n    <name>swagger-light-java</name>\n    <version>1.0.0</version>\n    <prerequisites>\n        <maven>2.2.0</maven>\n    </prerequisites>\n\n    <properties>\n        <java.version>1.8</java.version>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n        <version.framework>1.1.0</version.framework>\n        <version.jackson>2.12.6.1</version.jackson>\n        <version.slf4j>1.7.21</version.slf4j>\n        <version.jose4j>0.5.2</version.jose4j>\n        <version.antlr4>4.5.3</version.antlr4>\n        <version.commons-lang>2.6</version.commons-lang>\n        <version.commons.io>2.5</version.commons.io>\n        <version.commons.codec>1.10</version.commons.codec>\n        <version.encoder>1.2</version.encoder>\n        <version.metrics>3.1.2</version.metrics>\n        <version.logback>1.2.0</version.logback>\n        <version.junit>4.13.1</version.junit>\n        <version.mockito>2.1.0-beta.124</version.mockito>\n        <version.undertow>2.2.24.Final</version.undertow>\n        <version.jsonpath>2.2.0</version.jsonpath>\n        <version.httpclient>4.5.13</version.httpclient>\n        <version.httpasyncclient>4.1.2</version.httpasyncclient>\n        <version.swagger>1.5.10</version.swagger>\n    </properties>\n\n    <dependencies>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>config</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>utility</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>security</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>client</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>audit</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>info</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>validator</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>status</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>exception</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>body</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>mask</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>swagger</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>metrics</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>handler</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.networknt</groupId>\n            <artifactId>server</artifactId>\n            <version>${version.framework}</version>\n        </dependency>\n\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-databind</artifactId>\n            <version>${version.jackson}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.fasterxml.jackson.core</groupId>\n            <artifactId>jackson-core</artifactId>\n            <version>${version.jackson}</version>\n        </dependency>\n        <dependency>\n            <groupId>com.jayway.jsonpath</groupId>\n            <artifactId>json-path</artifactId>\n            <version>${version.jsonpath}</version>\n        </dependency>\n        <dependency>\n            <groupId>ch.qos.logback</groupId>\n            <artifactId>logback-classic</artifactId>\n            <version>${version.logback}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.undertow</groupId>\n            <artifactId>undertow-core</artifactId>\n            <version>${version.undertow}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.swagger</groupId>\n            <artifactId>swagger-annotations</artifactId>\n            <version>${version.swagger}</version>\n        </dependency>\n\n        <!-- Test Dependencies -->\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>${version.junit}</version>\n            <scope>test</scope>\n        </dependency>\n        <dependency>\n            <groupId>org.apache.httpcomponents</groupId>\n            <artifactId>httpclient</artifactId>\n            <version>${version.httpclient}</version>\n            <scope>test</scope>\n        </dependency>\n\n    </dependencies>\n\n\n    <build>\n        <defaultGoal>install</defaultGoal>\n        <directory>target</directory>\n        <finalName>${project.artifactId}-${project.version}</finalName>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-compiler-plugin</artifactId>\n                <version>2.5.1</version>\n                <configuration>\n                    <source>${java.version}</source>\n                    <target>${java.version}</target>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.3</version>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-jar-plugin</artifactId>\n                <version>2.6</version>\n                <configuration>\n                    <archive>\n                        <manifest>\n                            <mainClass>com.networknt.server.Server</mainClass>\n                        </manifest>\n                    </archive>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.4.0</version>\n                <configuration>\n                    <executable>java</executable>\n                    <arguments>\n                        <argument>-jar</argument>\n                        <argument>target/${project.build.finalName}.jar</argument>\n                    </arguments>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n\n    <repositories>\n        <repository>\n            <id>sonatype-snapshots</id>\n            <url>https://oss.sonatype.org/content/repositories/snapshots</url>\n            <snapshots>\n                <enabled>true</enabled>\n            </snapshots>\n        </repository>\n    </repositories>\n</project>\n"
  },
  {
    "path": "light-java/src/main/java/Example.java",
    "content": "import com.networknt.server.HandlerProvider;\nimport io.undertow.Handlers;\nimport io.undertow.server.HttpHandler;\nimport io.undertow.server.HttpServerExchange;\n\n\npublic class Example implements HandlerProvider {\n\n    public HttpHandler getHandler() {\n        return Handlers.path()\n        .addPrefixPath(\"/rest/hello\", new HttpHandler() {\n                public void handleRequest(HttpServerExchange exchange) {\n                    exchange.getResponseSender().send(\"Hello World\");\n            \t}\n            }\n        );\n    }\n}\n"
  },
  {
    "path": "light-java/src/main/resources/META-INF/services/com.networknt.server.HandlerProvider",
    "content": "Example"
  },
  {
    "path": "light-java/src/main/resources/logback.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<!--\r\n  ~ Copyright (c) 2016 Network New Technologies Inc.\r\n  ~\r\n  ~ Licensed under the Apache License, Version 2.0 (the \"License\");\r\n  ~ You may not use this file except in compliance with the License.\r\n  ~ You may obtain a copy of the License at\r\n  ~\r\n  ~      http://www.apache.org/licenses/LICENSE-2.0\r\n  ~\r\n  ~ Unless required by applicable law or agreed to in writing, software\r\n  ~ distributed under the License is distributed on an \"AS IS\" BASIS,\r\n  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n  ~ See the License for the specific language governing permissions and\r\n  ~ limitations under the License.\r\n  -->\r\n\r\n<configuration>\r\n    TODO create logger for audit only.\r\n    http://stackoverflow.com/questions/2488558/logback-to-log-different-messages-to-two-files\r\n    <turboFilter class=\"ch.qos.logback.classic.turbo.MarkerFilter\">\r\n        <Marker>PROFILER</Marker>\r\n        <!--<OnMatch>DENY</OnMatch>-->\r\n        <OnMatch>NEUTRAL</OnMatch>\r\n    </turboFilter>\r\n\r\n    <appender name=\"stdout\" class=\"ch.qos.logback.core.ConsoleAppender\">\r\n        <!-- encoders are assigned the type\r\n             ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->\r\n        <encoder>\r\n            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5marker %-5level %logger{36} - %msg%n</pattern>\r\n        </encoder>\r\n    </appender>\r\n\r\n    <appender name=\"log\" class=\"ch.qos.logback.core.FileAppender\">\r\n        <File>target/test.log</File>\r\n        <Append>false</Append>\r\n        <layout class=\"ch.qos.logback.classic.PatternLayout\">\r\n            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %class{36}:%L %M - %msg%n</Pattern>\r\n        </layout>\r\n    </appender>\r\n\r\n    <!--audit log-->\r\n    <appender name=\"audit\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\r\n        <file>target/audit.log</file> <!-- logfile location -->\r\n        <encoder>\r\n            <pattern>%-5level [%thread] %date{ISO8601} %F:%L - %msg%n\r\n            </pattern> <!-- the layout pattern used to format log entries -->\r\n            <immediateFlush>true</immediateFlush>\r\n        </encoder>\r\n        <rollingPolicy class=\"ch.qos.logback.core.rolling.FixedWindowRollingPolicy\">\r\n            <fileNamePattern>target/audit.log.%i.zip</fileNamePattern>\r\n            <minIndex>1</minIndex>\r\n            <maxIndex>5</maxIndex> <!-- max number of archived logs that are kept -->\r\n        </rollingPolicy>\r\n        <triggeringPolicy class=\"ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy\">\r\n            <maxFileSize>200MB\r\n            </maxFileSize> <!-- The size of the logfile that triggers a switch to a new logfile, and the current one archived -->\r\n        </triggeringPolicy>\r\n    </appender>\r\n\r\n    <root level=\"error\">\r\n        <appender-ref ref=\"stdout\"/>\r\n    </root>\r\n\r\n    <logger name=\"com.networknt\" level=\"error\">\r\n        <appender-ref ref=\"log\"/>\r\n    </logger>\r\n\r\n    <logger name=\"Audit\" level=\"error\" additivity=\"false\">\r\n        <appender-ref ref=\"audit\"/>\r\n    </logger>\r\n\r\n</configuration>\r\n"
  },
  {
    "path": "nativenetty/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>nativenetty</artifactId>\n\n    <dependencies>\n        <dependency>\n            <groupId>io.netty</groupId>\n            <artifactId>netty-all</artifactId>\n            <version>${netty.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.rest.nativenetty.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.nativenetty.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "nativenetty/src/main/java/com/colobu/rest/nativenetty/HelloWorldHandler.java",
    "content": "package com.colobu.rest.nativenetty;\n\nimport io.netty.buffer.Unpooled;\nimport io.netty.channel.ChannelFutureListener;\nimport io.netty.channel.ChannelHandlerContext;\nimport io.netty.channel.ChannelInboundHandlerAdapter;\nimport io.netty.handler.codec.http.*;\nimport io.netty.util.AsciiString;\nimport static io.netty.handler.codec.http.HttpResponseStatus.*;\nimport static io.netty.handler.codec.http.HttpVersion.*;\n\n\npublic class HelloWorldHandler extends ChannelInboundHandlerAdapter {\n    private static final byte[] CONTENT = { 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd' };\n\n    private static final AsciiString CONTENT_TYPE = new AsciiString(\"Content-Type\");\n    private static final AsciiString CONTENT_LENGTH = new AsciiString(\"Content-Length\");\n    private static final AsciiString CONNECTION = new AsciiString(\"Connection\");\n    private static final AsciiString KEEP_ALIVE = new AsciiString(\"keep-alive\");\n\n    @Override\n    public void channelReadComplete(ChannelHandlerContext ctx) {\n        ctx.flush();\n    }\n\n    @Override\n    public void channelRead(ChannelHandlerContext ctx, Object msg) {\n        if (msg instanceof HttpRequest) {\n            HttpRequest req = (HttpRequest) msg;\n\n            if (HttpUtil.is100ContinueExpected(req)) {\n                ctx.write(new DefaultFullHttpResponse(HTTP_1_1, CONTINUE));\n            }\n            boolean keepAlive = HttpUtil.isKeepAlive(req);\n            FullHttpResponse response = new DefaultFullHttpResponse(HTTP_1_1, OK, Unpooled.wrappedBuffer(CONTENT));\n            if (req.method() == HttpMethod.GET) {\n                response.headers().set(CONTENT_TYPE, \"text/plain\");\n                response.headers().setInt(CONTENT_LENGTH, response.content().readableBytes());\n            }\n\n            if (!keepAlive) {\n                ctx.write(response).addListener(ChannelFutureListener.CLOSE);\n            } else {\n                response.headers().set(CONNECTION, KEEP_ALIVE);\n                ctx.write(response);\n            }\n        }\n    }\n\n    @Override\n    public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {\n        cause.printStackTrace();\n        ctx.close();\n    }\n}\n"
  },
  {
    "path": "nativenetty/src/main/java/com/colobu/rest/nativenetty/Main.java",
    "content": "package com.colobu.rest.nativenetty;\n\nimport io.netty.bootstrap.ServerBootstrap;\nimport io.netty.channel.*;\nimport io.netty.channel.nio.NioEventLoopGroup;\nimport io.netty.channel.socket.SocketChannel;\nimport io.netty.channel.socket.nio.NioServerSocketChannel;\nimport io.netty.handler.codec.http.HttpServerCodec;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String host = \"0.0.0.0\";\n        int port = 8080;\n        if (args.length > 0) {\n            host = args[0];\n        }\n        if (args.length > 1) {\n            port = Integer.parseInt(args[1]);\n        }\n\n        EventLoopGroup bossGroup = new NioEventLoopGroup(1);\n        EventLoopGroup workerGroup = new NioEventLoopGroup();\n        try {\n            ServerBootstrap b = new ServerBootstrap();\n            b.option(ChannelOption.SO_BACKLOG, 1024);\n            b.group(bossGroup, workerGroup)\n                    .channel(NioServerSocketChannel.class)\n                    //.handler(new LoggingHandler(LogLevel.INFO))\n                    .childHandler(new ChannelInitializer<SocketChannel>(){\n\n                        @Override\n                        protected void initChannel(SocketChannel ch) throws Exception {\n                            ChannelPipeline p = ch.pipeline();\n                            p.addLast(new HttpServerCodec());\n                            p.addLast(new HelloWorldHandler());\n                        }\n                    });\n\n            Channel ch = b.bind(host,port).sync().channel();\n            ch.closeFuture().sync();\n        } finally {\n            bossGroup.shutdownGracefully();\n            workerGroup.shutdownGracefully();\n        }\n    }\n}\n"
  },
  {
    "path": "node.js/install.sh",
    "content": "npm install restify"
  },
  {
    "path": "node.js/server.js",
    "content": "var restify = require('restify');\n\nfunction respond(req, res, next) {\n  res.send('hello world');\n  next();\n}\n\nvar server = restify.createServer();\nserver.get('/hello', respond);\n\nserver.listen(8080, function() {\n  console.log('%s listening at %s', server.name, server.url);\n});\n"
  },
  {
    "path": "pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <modelVersion>4.0.0</modelVersion>\n\n    <groupId>com.colobu</groupId>\n    <artifactId>restful-services</artifactId>\n    <packaging>pom</packaging>\n    <version>1.0-SNAPSHOT</version>\n\n    <properties>\n        <resteasy.version>3.5.1.Final</resteasy.version>\n        <jersey.version>2.27</jersey.version>\n        <springboot.version>2.0.2.RELEASE</springboot.version>\n        <vertx.version>3.5.1</vertx.version>\n        <undertow.version>2.0.1.Final</undertow.version>\n        <netty.version>4.1.25.Final</netty.version>\n        <jetty.version>9.4.10.v20180503</jetty.version>\n        <dropwizard.version>1.2.4</dropwizard.version>\n\t    <async-http-servlet.version>3.0.19.Final</async-http-servlet.version>\n\t    <wildfly.version>13.0.0.Final</wildfly.version>\n\n        <java.version>1.8</java.version>\n        <grizzly.version>2.4.3</grizzly.version>\n\n        <maven.compiler.source>1.8</maven.compiler.source>\n        <maven.compiler.target>1.8</maven.compiler.target>\n        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\n    </properties>\n\n    <modules>\n        <module>jaxrs-common</module>\n        <module>jersey-jetty</module>\n        <module>jersey-grizzly2</module>\n        <module>resteasy-undertow</module>\n        <module>resteasy-netty</module>\n        <module>dropwizard</module>\n        <module>springboot</module>\n        <module>springboot-undertow</module>\n        <module>nativenetty</module>\n        <module>resteasy-netty4</module>\n\t    <module>resteasy-jetty</module>\n\t    <!-- <module>resteasy-wildfly</module> -->\n        <!-- <module>resteasy-grizzly</module>  -->\n        <module>vertx</module>\n        <module>vertx-verticles</module>\n        <!--<module>armeria</module>-->\n        <module>act</module>\n  </modules>\n\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.glassfish.jersey</groupId>\n                <artifactId>jersey-bom</artifactId>\n                <version>${jersey.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n    <build>\n        <pluginManagement>\n            <plugins>\n\n            </plugins>\n        </pluginManagement>\n    </build>\n</project>\n"
  },
  {
    "path": "resteasy-jetty/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n\txmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n\t<parent>\n\t\t<artifactId>restful-services</artifactId>\n\t\t<groupId>com.colobu</groupId>\n\t\t<version>1.0-SNAPSHOT</version>\n\t\t<relativePath>../pom.xml</relativePath>\n\t</parent>\n\t<modelVersion>4.0.0</modelVersion>\n\t<artifactId>resteasy-jetty</artifactId>\n\n\t<dependencies>\n\t\t<dependency>\n\t\t\t<artifactId>jaxrs-common</artifactId>\n\t\t\t<groupId>com.colobu</groupId>\n\t\t\t<version>${project.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.jboss.resteasy</groupId>\n\t\t\t<artifactId>resteasy-jaxrs</artifactId>\n\t\t\t<version>${resteasy.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.jboss.resteasy</groupId>\n\t\t\t<artifactId>async-http-servlet-3.0</artifactId>\n\t\t\t<version>${async-http-servlet.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.jboss.resteasy</groupId>\n\t\t\t<artifactId>resteasy-servlet-initializer</artifactId>\n\t\t\t<version>${resteasy.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.eclipse.jetty</groupId>\n\t\t\t<artifactId>jetty-server</artifactId>\n\t\t\t<version>${jetty.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.eclipse.jetty</groupId>\n\t\t\t<artifactId>jetty-servlet</artifactId>\n\t\t\t<version>${jetty.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.eclipse.jetty</groupId>\n\t\t\t<artifactId>jetty-util</artifactId>\n\t\t\t<version>${jetty.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>org.eclipse.jetty</groupId>\n\t\t\t<artifactId>jetty-webapp</artifactId>\n\t\t\t<version>${jetty.version}</version>\n\t\t</dependency>\n\t\t<dependency>\n\t\t\t<groupId>junit</groupId>\n\t\t\t<artifactId>junit</artifactId>\n\t\t\t<version>4.12</version>\n\t\t\t<scope>test</scope>\n\t\t</dependency>\n\t</dependencies>\n\t<build>\n\t\t<plugins>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.apache.maven.plugins</groupId>\n\t\t\t\t<artifactId>maven-shade-plugin</artifactId>\n\t\t\t\t<version>2.4.2</version>\n\t\t\t\t<configuration>\n\t\t\t\t\t<createDependencyReducedPom>true</createDependencyReducedPom>\n\t\t\t\t\t<filters>\n\t\t\t\t\t\t<filter>\n\t\t\t\t\t\t\t<artifact>*:*</artifact>\n\t\t\t\t\t\t\t<excludes>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.SF</exclude>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.DSA</exclude>\n\t\t\t\t\t\t\t\t<exclude>META-INF/*.RSA</exclude>\n\t\t\t\t\t\t\t</excludes>\n\t\t\t\t\t\t</filter>\n\t\t\t\t\t</filters>\n\t\t\t\t</configuration>\n\t\t\t\t<executions>\n\t\t\t\t\t<execution>\n\t\t\t\t\t\t<phase>package</phase>\n\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t<goal>shade</goal>\n\t\t\t\t\t\t</goals>\n\t\t\t\t\t\t<configuration>\n\t\t\t\t\t\t\t<transformers>\n\t\t\t\t\t\t\t\t<transformer\n\t\t\t\t\t\t\t\t\timplementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\" />\n\t\t\t\t\t\t\t\t<transformer\n\t\t\t\t\t\t\t\t\timplementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n\t\t\t\t\t\t\t\t\t<mainClass>com.colobu.rest.resteasyjetty.Main</mainClass>\n\t\t\t\t\t\t\t\t</transformer>\n\t\t\t\t\t\t\t</transformers>\n\t\t\t\t\t\t</configuration>\n\t\t\t\t\t</execution>\n\t\t\t\t</executions>\n\t\t\t</plugin>\n\t\t\t<plugin>\n\t\t\t\t<groupId>org.codehaus.mojo</groupId>\n\t\t\t\t<artifactId>exec-maven-plugin</artifactId>\n\t\t\t\t<version>1.2.1</version>\n\t\t\t\t<executions>\n\t\t\t\t\t<execution>\n\t\t\t\t\t\t<goals>\n\t\t\t\t\t\t\t<goal>java</goal>\n\t\t\t\t\t\t</goals>\n\t\t\t\t\t</execution>\n\t\t\t\t</executions>\n\t\t\t\t<configuration>\n\t\t\t\t\t<mainClass>com.colobu.rest.resteasyjetty.Main</mainClass>\n\t\t\t\t</configuration>\n\t\t\t</plugin>\n\t\t</plugins>\n\t</build>\n</project>\n"
  },
  {
    "path": "resteasy-jetty/src/main/java/com/colobu/rest/resteasyjetty/Main.java",
    "content": "package com.colobu.rest.resteasyjetty;\n\nimport org.eclipse.jetty.server.Server;\nimport org.eclipse.jetty.servlet.DefaultServlet;\nimport org.eclipse.jetty.servlet.ServletContextHandler;\nimport org.eclipse.jetty.servlet.ServletHolder;\n\nimport org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher;\n\npublic class Main {\n\tstatic final String CONTEXT_ROOT = \"/\";\n\tString host = \"0.0.0.0\";\n\tint port = 8080;\n\t\n\tpublic Main(String host, int port) {\n\t\tthis.host = host;\n\t\tthis.port = port;\n\t}\n\n\tpublic void run() throws Exception {\n\t\tfinal Server server = new Server(port);\n\n\t\t// Setup the basic Application \"context\" at \"/\".\n\t\t// This is also known as the handler tree (in Jetty speak).\n\t\tfinal ServletContextHandler context = new ServletContextHandler(server, CONTEXT_ROOT);\n\n\t\t// Setup RESTEasy's HttpServletDispatcher at \"/api/*\".\n\t\tfinal ServletHolder restEasyServlet = new ServletHolder(new HttpServletDispatcher());\n\t\trestEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\", \"/\");\n\t\trestEasyServlet.setInitParameter(\"javax.ws.rs.Application\", \"com.colobu.rest.jaxrs.MyApplication\");\n\t\tcontext.addServlet(restEasyServlet, \"/rest/*\");\n\n\t\t// Setup the DefaultServlet at \"/\".\n\t\tfinal ServletHolder defaultServlet = new ServletHolder(new DefaultServlet());\n\t\tcontext.addServlet(defaultServlet, CONTEXT_ROOT);\n\t\tserver.setHandler(context);\n\t\tserver.start();\n\t\tserver.join();\n\t}\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tString host = \"0.0.0.0\";\n\t\tint port = 8080;\n\t\tif (args.length > 0) {\n\t\t\thost = args[0];\n\t\t}\n\t\tif (args.length > 1) {\n\t\t\tport = Integer.parseInt(args[1]);\n\t\t}\n\n\t\ttry {\n\t\t\tnew Main(host, port).run();\n\t\t} catch (Throwable t) {\n\t\t\tt.printStackTrace();\n\t\t}\n\t}\n}\n"
  },
  {
    "path": "resteasy-netty/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>resteasy-netty</artifactId>\n\n    <dependencies>\n        <dependency>\n            <artifactId>jaxrs-common</artifactId>\n            <groupId>com.colobu</groupId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>resteasy-jaxrs</artifactId>\n            <version>${resteasy.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>async-http-servlet-3.0</artifactId>\n            <version>${async-http-servlet.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>resteasy-netty</artifactId>\n            <version>${resteasy.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.rest.resteasynetty.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.resteasynetty.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "resteasy-netty/src/main/java/com/colobu/rest/resteasynetty/Main.java",
    "content": "package com.colobu.rest.resteasynetty;\n\n\nimport org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer;\nimport org.jboss.resteasy.spi.ResteasyDeployment;\n\nimport com.colobu.rest.jaxrs.MyApplication;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String host = \"0.0.0.0\";\n        int port = 8080;\n        if (args.length > 0) {\n            host = args[0];\n        }\n        if (args.length > 1) {\n            port = Integer.parseInt(args[1]);\n        }\n\n\n        NettyJaxrsServer netty = new NettyJaxrsServer();\n        ResteasyDeployment deployment = new ResteasyDeployment();\n        deployment.setApplication(new MyApplication());\n        netty.setDeployment(deployment);\n        netty.setHostname(host);\n        netty.setPort(port);\n        netty.setRootResourcePath(\"/\");\n        netty.setSecurityDomain(null);\n        netty.start();\n    }\n}\n"
  },
  {
    "path": "resteasy-netty4/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>resteasy-netty4</artifactId>\n\n\n    <dependencies>\n        <dependency>\n            <artifactId>jaxrs-common</artifactId>\n            <groupId>com.colobu</groupId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>resteasy-jaxrs</artifactId>\n            <version>${resteasy.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>async-http-servlet-3.0</artifactId>\n            <version>${async-http-servlet.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>resteasy-netty4</artifactId>\n            <version>${resteasy.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.netty</groupId>\n            <artifactId>netty-all</artifactId>\n            <version>${netty.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.13.1</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.rest.resteasynetty4.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.resteasynetty4.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "resteasy-netty4/src/main/java/com/colobu/rest/resteasynetty4/Main.java",
    "content": "package com.colobu.rest.resteasynetty4;\n\n\nimport org.jboss.resteasy.plugins.server.netty.NettyJaxrsServer;\nimport org.jboss.resteasy.spi.ResteasyDeployment;\n\nimport com.colobu.rest.jaxrs.MyApplication;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        String host = \"0.0.0.0\";\n        int port = 8080;\n        if (args.length > 0) {\n            host = args[0];\n        }\n        if (args.length > 1) {\n            port = Integer.parseInt(args[1]);\n        }\n\n\n        NettyJaxrsServer netty = new NettyJaxrsServer();\n        ResteasyDeployment deployment = new ResteasyDeployment();\n        deployment.setApplication(new MyApplication());\n        netty.setDeployment(deployment);\n        netty.setHostname(host);\n        netty.setPort(port);\n        netty.setRootResourcePath(\"/\");\n        netty.setSecurityDomain(null);\n        netty.start();\n    }\n}\n"
  },
  {
    "path": "resteasy-undertow/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>resteasy-undertow</artifactId>\n\n    <dependencies>\n        <dependency>\n            <artifactId>jaxrs-common</artifactId>\n            <groupId>com.colobu</groupId>\n            <version>${project.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>resteasy-jaxrs</artifactId>\n            <version>${resteasy.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>async-http-servlet-3.0</artifactId>\n            <version>${async-http-servlet.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.undertow</groupId>\n            <artifactId>undertow-servlet</artifactId>\n            <version>${undertow.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>org.jboss.resteasy</groupId>\n            <artifactId>resteasy-undertow</artifactId>\n            <version>${resteasy.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.undertow</groupId>\n            <artifactId>undertow-core</artifactId>\n            <version>${undertow.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.rest.resteasyundertow.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.resteasyundertow.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "resteasy-undertow/src/main/java/com/colobu/rest/resteasyundertow/Main.java",
    "content": "package com.colobu.rest.resteasyundertow;\n\n\nimport org.jboss.resteasy.plugins.server.undertow.UndertowJaxrsServer;\n\nimport com.colobu.rest.jaxrs.MyApplication;\n\nimport io.undertow.Undertow;\n\npublic class Main {\n    private static UndertowJaxrsServer server;\n\n    public static void main(String[] args) throws Exception {\n        String host = \"0.0.0.0\";\n        int port = 8080;\n        if (args.length > 0) {\n            host = args[0];\n        }\n        if (args.length > 1) {\n            port = Integer.parseInt(args[1]);\n        }\n\n        Undertow.Builder builder = Undertow.builder().addHttpListener(port, host);\n        server = new UndertowJaxrsServer().start(builder);\n        server.deploy(MyApplication.class, \"/\");\n\n//        DeploymentInfo di = server.undertowDeployment(MyApplication.class);\n//        di.setContextPath(\"/rest\");\n//        di.setDeploymentName(\"rest\");\n//        server.deploy(di);\n\n    }\n}\n"
  },
  {
    "path": "springboot/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>springboot</artifactId>\n\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.springframework.boot</groupId>\n                <artifactId>spring-boot-dependencies</artifactId>\n                <version>${springboot.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.springframework.boot</groupId>\n            <artifactId>spring-boot-starter-web</artifactId>\n            <version>${springboot.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.13.1</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.springframework.boot</groupId>\n                <artifactId>spring-boot-maven-plugin</artifactId>\n                <version>${springboot.version}</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>repackage</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.springboot.Main</mainClass>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.springboot.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "springboot/src/main/java/com/colobu/rest/springboot/HelloController.java",
    "content": "package com.colobu.rest.springboot;\n\nimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;\nimport org.springframework.scheduling.annotation.Async;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.ResponseBody;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\n@EnableAutoConfiguration\npublic class HelloController {\n\n    @RequestMapping(\"/rest/hello\")\n    @ResponseBody\n    String hello() {\n        return \"Hello World\";\n    }\n\n    @RequestMapping(\"/rest/helloAsync\")\n    @ResponseBody\n    @Async\n    String helloAsync() {\n        return \"Hello World\";\n    }\n}\n"
  },
  {
    "path": "springboot/src/main/java/com/colobu/rest/springboot/Main.java",
    "content": "package com.colobu.rest.springboot;\n\n\nimport org.springframework.boot.SpringApplication;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        SpringApplication.run(HelloController.class, args);\n    }\n}\n"
  },
  {
    "path": "springboot/src/main/resources/application.properties",
    "content": "server.address=0.0.0.0\nserver.port = 8080"
  },
  {
    "path": "springboot-undertow/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>springboot-undertow</artifactId>\n\n    <dependencyManagement>\n        <dependencies>\n            <dependency>\n                <groupId>org.springframework.boot</groupId>\n                <artifactId>spring-boot-dependencies</artifactId>\n                <version>${springboot.version}</version>\n                <type>pom</type>\n                <scope>import</scope>\n            </dependency>\n        </dependencies>\n    </dependencyManagement>\n\n    <dependencies>\n        <dependency>\n            <groupId>org.springframework.boot</groupId>\n            <artifactId>spring-boot-starter-web</artifactId>\n            <version>${springboot.version}</version>\n            <exclusions>\n                <exclusion>\n                    <groupId>org.springframework.boot</groupId>\n                    <artifactId>spring-boot-starter-tomcat</artifactId>\n                </exclusion>\n            </exclusions>\n        </dependency>\n        <dependency>\n            <groupId>org.springframework.boot</groupId>\n            <artifactId>spring-boot-starter-undertow</artifactId>\n            <version>${springboot.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.13.1</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.springframework.boot</groupId>\n                <artifactId>spring-boot-maven-plugin</artifactId>\n                <version>${springboot.version}</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>repackage</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.springboot.Main</mainClass>\n                </configuration>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.springboot.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "springboot-undertow/src/main/java/com/colobu/rest/springboot/HelloController.java",
    "content": "package com.colobu.rest.springboot;\n\nimport org.springframework.boot.autoconfigure.EnableAutoConfiguration;\nimport org.springframework.scheduling.annotation.Async;\nimport org.springframework.web.bind.annotation.RequestMapping;\nimport org.springframework.web.bind.annotation.ResponseBody;\nimport org.springframework.web.bind.annotation.RestController;\n\n@RestController\n@EnableAutoConfiguration\npublic class HelloController {\n\n    @RequestMapping(\"/rest/hello\")\n    @ResponseBody\n    String hello() {\n        return \"Hello World\";\n    }\n\n    @RequestMapping(\"/rest/helloAsync\")\n    @ResponseBody\n    @Async\n    String helloAsync() {\n        return \"Hello World\";\n    }\n}"
  },
  {
    "path": "springboot-undertow/src/main/java/com/colobu/rest/springboot/Main.java",
    "content": "package com.colobu.rest.springboot;\n\n\nimport org.springframework.boot.SpringApplication;\n\npublic class Main {\n    public static void main(String[] args) throws Exception {\n        SpringApplication.run(HelloController.class, args);\n    }\n}\n"
  },
  {
    "path": "springboot-undertow/src/main/resources/application.properties",
    "content": "server.address=0.0.0.0\nserver.port = 8080"
  },
  {
    "path": "vertx/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>vertx</artifactId>\n\n\n    <dependencies>\n        <dependency>\n            <groupId>io.vertx</groupId>\n            <artifactId>vertx-core</artifactId>\n            <version>${vertx.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.vertx</groupId>\n            <artifactId>vertx-web</artifactId>\n            <version>${vertx.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ServicesResourceTransformer\"/>\n                                <transformer\n                                        implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <mainClass>com.colobu.rest.vertx.Main</mainClass>\n                                </transformer>\n                            </transformers>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.vertx.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "vertx/src/main/java/com/colobu/rest/vertx/Main.java",
    "content": "package com.colobu.rest.vertx;\n\n\nimport io.vertx.core.Vertx;\nimport io.vertx.core.VertxOptions;\nimport io.vertx.core.http.HttpServerResponse;\nimport io.vertx.ext.web.Router;\nimport io.vertx.ext.web.RoutingContext;\nimport io.vertx.ext.web.handler.BodyHandler;\n\npublic class Main {\n    public static void main(String[] args) {\n        VertxOptions options = new VertxOptions();\n        Vertx vertx = Vertx.vertx(options);\n        Router router = Router.router(vertx);\n\n        router.route().handler(BodyHandler.create());\n        router.get(\"/rest/hello\").handler(Main::handleHello);\n        vertx.createHttpServer().requestHandler(router::accept).listen(8080);\n    }\n\n    private static void handleHello(RoutingContext routingContext) {\n        HttpServerResponse response = routingContext.response();\n        response.putHeader(\"content-type\", \"application/json\").end(\"Hello world\");\n    }\n}\n"
  },
  {
    "path": "vertx-verticles/pom.xml",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n         xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\n    <parent>\n        <artifactId>restful-services</artifactId>\n        <groupId>com.colobu</groupId>\n        <version>1.0-SNAPSHOT</version>\n        <relativePath>../pom.xml</relativePath>\n    </parent>\n    <modelVersion>4.0.0</modelVersion>\n    <artifactId>vertx-verticles</artifactId>\n\n\n    <dependencies>\n        <dependency>\n            <groupId>io.vertx</groupId>\n            <artifactId>vertx-core</artifactId>\n            <version>${vertx.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>io.vertx</groupId>\n            <artifactId>vertx-web</artifactId>\n            <version>${vertx.version}</version>\n        </dependency>\n        <dependency>\n            <groupId>junit</groupId>\n            <artifactId>junit</artifactId>\n            <version>4.12</version>\n            <scope>test</scope>\n        </dependency>\n    </dependencies>\n    <build>\n        <plugins>\n            <plugin>\n                <groupId>org.apache.maven.plugins</groupId>\n                <artifactId>maven-shade-plugin</artifactId>\n                <version>2.4.2</version>\n                <configuration>\n                    <createDependencyReducedPom>true</createDependencyReducedPom>\n                    <filters>\n                        <filter>\n                            <artifact>*:*</artifact>\n                            <excludes>\n                                <exclude>META-INF/*.SF</exclude>\n                                <exclude>META-INF/*.DSA</exclude>\n                                <exclude>META-INF/*.RSA</exclude>\n                            </excludes>\n                        </filter>\n                    </filters>\n                </configuration>\n                <executions>\n                    <execution>\n                        <phase>package</phase>\n                        <goals>\n                            <goal>shade</goal>\n                        </goals>\n                        <configuration>\n                            <transformers>\n                                <transformer implementation=\"org.apache.maven.plugins.shade.resource.ManifestResourceTransformer\">\n                                    <manifestEntries>\n                                        <Main-Class>io.vertx.core.Starter</Main-Class>\n                                        <Main-Verticle>com.colobu.rest.vertx.Main</Main-Verticle>\n                                    </manifestEntries>\n                                </transformer>\n                                <transformer implementation=\"org.apache.maven.plugins.shade.resource.AppendingTransformer\">\n                                    <resource>META-INF/services/io.vertx.core.spi.VerticleFactory</resource>\n                                </transformer>\n                            </transformers>\n                            <artifactSet>\n                            </artifactSet>\n                        </configuration>\n                    </execution>\n                </executions>\n            </plugin>\n            <plugin>\n                <groupId>org.codehaus.mojo</groupId>\n                <artifactId>exec-maven-plugin</artifactId>\n                <version>1.2.1</version>\n                <executions>\n                    <execution>\n                        <goals>\n                            <goal>java</goal>\n                        </goals>\n                    </execution>\n                </executions>\n                <configuration>\n                    <mainClass>com.colobu.rest.vertx.Main</mainClass>\n                </configuration>\n            </plugin>\n        </plugins>\n    </build>\n</project>"
  },
  {
    "path": "vertx-verticles/src/main/java/com/colobu/rest/vertx/Main.java",
    "content": "package com.colobu.rest.vertx;\n\n\nimport io.vertx.core.AbstractVerticle;\nimport io.vertx.core.http.HttpServerResponse;\nimport io.vertx.ext.web.Router;\nimport io.vertx.ext.web.RoutingContext;\nimport io.vertx.ext.web.handler.BodyHandler;\n\npublic class Main  extends AbstractVerticle {\n//    public static void main(String[] args) {\n//        Vertx vertx = Vertx.vertx();\n//        vertx.deployVerticle(Main.class.getName(),new DeploymentOptions().setInstances(20), e -> {\n//            System.out.println(e.succeeded());\n//            System.out.println(e.failed());\n//            System.out.println(e.cause());\n//            System.out.println(e.result());\n//        });\n//        //vertx.deployVerticle(Main.class.getName(),new DeploymentOptions().setInstances(2 * Runtime.getRuntime().availableProcessors()));\n//\n//    }\n    @Override\n    public void start() {\n        Router router = Router.router(vertx);\n\n        router.route().handler(BodyHandler.create());\n        router.get(\"/rest/hello\").handler(Main::handleHello);\n        vertx.createHttpServer().requestHandler(router::accept).listen(8080);\n    }\n    private static void handleHello(RoutingContext routingContext) {\n        HttpServerResponse response = routingContext.response();\n        response.putHeader(\"content-type\", \"application/json\").end(\"Hello world\");\n    }\n}\n"
  }
]