{"id":18141539,"url":"https://github.com/skjolber/substratevm-netty-hello-world","last_synced_at":"2025-04-06T18:32:49.735Z","repository":{"id":145132913,"uuid":"131696225","full_name":"skjolber/substratevm-netty-hello-world","owner":"skjolber","description":"Hello World HTTP Netty server running on SubstrateVM","archived":false,"fork":false,"pushed_at":"2019-10-14T21:42:06.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T00:29:40.636Z","etag":null,"topics":["graalvm","substratevm","substratevm-netty"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skjolber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-01T09:28:32.000Z","updated_at":"2019-10-14T21:42:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"53cd86fe-1f15-47ca-a4d2-7fec30e0f484","html_url":"https://github.com/skjolber/substratevm-netty-hello-world","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fsubstratevm-netty-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fsubstratevm-netty-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fsubstratevm-netty-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fsubstratevm-netty-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skjolber","download_url":"https://codeload.github.com/skjolber/substratevm-netty-hello-world/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247530832,"owners_count":20953855,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graalvm","substratevm","substratevm-netty"],"created_at":"2024-11-01T17:07:33.308Z","updated_at":"2025-04-06T18:32:49.704Z","avatar_url":"https://github.com/skjolber.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# substratevm-netty-hello-world\nHello World HTTP Netty server running on [SubstrateVM] from the Graal project.\n\n## License\n[Apache 2.0]\n\n# Obtain\nThe project is based on [Maven].\n\n# Usage\nBuild SubstrateVM and get the [labs JDK], then set `JAVA_HOME`\n\n\u003e export JAVA_HOME=/usr/java/labsjdk1.8.0_161-jvmci-0.42/\n\nBuild this project using\n\n\u003e mvn clean package\n\nthen compile the [SubstrateVM] native image using\n\n\u003e native-image -cp ./target/substratevm-netty-hello-world-1.0.0-SNAPSHOT.jar com.github.skjolber.graal.netty.HelloWorld -Dio.netty.noUnsafe=true -Djava.io.tmpdir=/tmp\n\nThen run\n\n\u003e ./com.github.skjolber.graal.netty.helloworld\n\nand visit\n\nhttp://localhost:8080\n\nand observe response 'Hello World'. \n\nStart a comparable 'classic' instance using the command\n\n\u003e java -XX:+UseG1GC -Dio.netty.noUnsafe=true -Djava.io.tmpdir=/tmp -jar target/substratevm-netty-hello-world-1.0.0-SNAPSHOT.jar 8081\n\n# Performance / benchmark\n## Memory use\nCompare the (approximate) memory use of the two using the command\n\n\u003e ps -eo size,pid,user,command --sort -size | awk '{ hr=$1/1024 ; printf(\"%13.2f Mb \",hr) } { for ( x=4 ; x\u003c=NF ; x++ ) { printf(\"%s \",$x) } print \"\" }' | grep 'helloworld\\|hello-world'\n\nIn this simple experiment, the SubstrateVM version seems to be using quite a lot less memory, especially before seeing any HTTP traffic.\n\n## CPU use\nThe CPU use seems to converge to approximately the same level. A more complex use-case would be better for measuring the differences, as this is mostly I/O-bound. \n\n# History\n - 1.0.0: Initial version\n\n[Apache 2.0]:          \thttp://www.apache.org/licenses/LICENSE-2.0.html\n[issue-tracker]:       \thttps://github.com/skjolber/substratevm-netty-hello-world/issues\n[Maven]:                http://maven.apache.org/\n[1.0.0]:\t\t\t\thttps://github.com/skjolber/substratevm-netty-hello-world/releases/tag/substratevm-netty-hello-world-1.0.0\n[SubstrateVM]:\t\t\thttps://github.com/oracle/graal/tree/master/substratevm\n[labs JDK]:\t\t\t\thttp://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskjolber%2Fsubstratevm-netty-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskjolber%2Fsubstratevm-netty-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskjolber%2Fsubstratevm-netty-hello-world/lists"}