{"id":15352329,"url":"https://github.com/tmaret/sling-virtual-thread","last_synced_at":"2025-03-27T19:23:00.634Z","repository":{"id":87577363,"uuid":"287753366","full_name":"tmaret/sling-virtual-thread","owner":"tmaret","description":"Apache Sling model running on Jetty and unbounded virtual thread based on Early-Access builds of OpenJDK project Loom.","archived":false,"fork":false,"pushed_at":"2020-08-16T18:59:22.000Z","size":4111,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T22:15:02.309Z","etag":null,"topics":["jetty","loom","openjdk","sling"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmaret.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2020-08-15T13:37:27.000Z","updated_at":"2023-09-17T08:48:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"9b8d4d9c-c661-4571-9629-2e993460c447","html_url":"https://github.com/tmaret/sling-virtual-thread","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"94c0ae46e6ccef6af2ef35112aff235305a944a6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaret%2Fsling-virtual-thread","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaret%2Fsling-virtual-thread/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaret%2Fsling-virtual-thread/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmaret%2Fsling-virtual-thread/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmaret","download_url":"https://codeload.github.com/tmaret/sling-virtual-thread/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245907933,"owners_count":20692027,"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":["jetty","loom","openjdk","sling"],"created_at":"2024-10-01T12:09:15.231Z","updated_at":"2025-03-27T19:23:00.599Z","avatar_url":"https://github.com/tmaret.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"Sling \u0026 Loom\n============\n\nThis project runs an [Apache Sling](https://sling.apache.org) instance powered by [Jetty](https://www.eclipse.org/jetty) configured with an unbounded virtual threads pool. Virtual threads require an [early-access builds](https://jdk.java.net/loom) of the OpenJDK project [Loom](https://openjdk.java.net/projects/loom).\n\n# Setup\n\nSetup Project Loom early-access build by following the [instructions](https://jdk.java.net/loom/). Once setup, your java version should look like the following.\n\n```\n$ java -version\nopenjdk version \"16-loom\" 2021-03-16\nOpenJDK Runtime Environment (build 16-loom+4-56)\nOpenJDK 64-Bit Server VM (build 16-loom+4-56, mixed mode, sharing)\n```\n\n# Run\n\nMake sure that Apache Maven is available on your setup and if needed [install Apache Maven](https://maven.apache.org/install.html). Clone this project on your local file system, then run the following command\n\n```bash\nmvn clean install\n```\n\nThe [slingstart-maven-plugin](https://sling.apache.org/components/slingstart-maven-plugin/repository-mojo.html) will take care of starting an `author` Sling instance on port `9090`. The instance is configured with an unbounded pool of virtual threads.\n\nHave a look at the [provisioning model files](src/main/provisioning) to see what OSGi bundles and configurations are used. The virtual thread pool support is added via a custom build of the Apache Felix org.apache.felix.http.jetty [project](https://github.com/tmaret/felix-dev/tree/unbounded-virtual-thread-pool).\n\n# Play\n\nOnce your Sling instance is running, you should be able to access it on http://localhost:9090 and play with it.\n\n## Request the default page\n\n\n```bash\ncurl -u admin:admin http://localhost:9090/index.html\n```\n\n## Micro benchmark\n\n```bash\nab -A admin:admin -c 50 -n 10000 http://localhost:9090/index.html\n```\n\n## Monitor threads\n\nUsing `top` monitor the resources used by the server while serving the micro benchmark above. Note how few kernel threads are used to serve at high concurrency level.\n\n![top](./docs/top.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmaret%2Fsling-virtual-thread","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmaret%2Fsling-virtual-thread","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmaret%2Fsling-virtual-thread/lists"}