A look at tipsy/loomylin: 43 stars on GitHub, written primarily in Java.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Loomylin is a tech demo for Project Loom,
which brings lightweight user-mode threads (fibers/green-threads) to the JVM.
In the JDK, they refer to these threads as
Virtual Threads.
Not all operations are "Virtual Thread Friendly", you can find a list in the
OpenJDK Wiki.
There's also a nice Getting started guide in the Wiki,
but this is not required reading to understand this project.
The idea behind this project is to gain knowledge of the practical value of running Loom "in the wild",
by trying to use it with a traditional blocking HttpServlet server (in our case Jetty).
The project implements a ThreadPool
with virtual threads, passes this ThreadPool to a Jetty Server,
and passes this Jetty Server to a Javalin instance (for easy project setup).
The project has three servers:
A server with a QueuedThreadPool, 4 threads (the number of physical cores on my machine), running on port 7000
A server with a QueuedThreadPool, 32 threads, running on port 7001
A server with a custom LoomThreadPool, running on port 7002
The project contains instructions both for running with Docker
and without (using Maven Wrapper, so please, pick your poison.
The project contains two equivalent implementations, one Java and one Kotlin.
Running with Docker
The fastest way to run the project (provided you have Docker installed), is to:
After this you'll have all three servers running, and can proceed to load testing.
Running without Docker
First, you'll need to grab the latest version of OpenJDK.
The easiest way to do this is to install SDKMAN. This will also make it
easy to switch back to a stable JDK later, if you need to.
To list all the available JDKs, you do:
sdk list java
Locate an SDK with Loom (ex: 19-open), and do:
sdk install java 19-open
That's it. Now you can either run the project via Maven Wrapper by doing:
Or open the project in your favorite IDE. If you get Error: Cannot determine path to 'tools.jar' library for 16 (path/to/jdk-16) when running from IDEA, you should update to the latest version.
The main function in src/main/kotlin/loomylin/Loomylin.kt will start all three servers.
Load testing with hey
Disclaimer: I have very little experience with load testing, so take these results with a pinch of salt. Feedback to improve this section would be much appreciated!
You can load test using whatever you want, this section just outlines a quick and easy approach
with the library hey. If you want something from NPM,
autocannon seems like a pretty good alternative.
The hey tool runs requests per worker sequentially, so if each worker has 20 requests to run,
and each request takes 100ms, that worker should be done in 2s.
To warm everything up, all tests are run thrice in a for-loop.
Only the third result is included below.
Computational endpoint
This endpoint runs Math.random() 25000 times, then returns "Hello, World".
This number was chosen because it made the tests bearable to run.
When doing pure computation, having number of threads equal to the number of
physical cores should be the most efficient. Using 32 threads is almost three times as slow,
most likely because the overhead introduced by thread switching (and hyper-threading).
I expected the Loom server to be similar in performance to 4 threads, but it's almost twice as slow.
You can see that the request time is super consistent at 272ms, but there are a few
outliers in the results that ruin everything (12 requests took 2.6s to finish). These outliers
might be slow because of garbage collection, but I haven't had the time to look into that yet.
Waiting endpoint (blocking)
This endpoint is where Loom should shine. It does a simple Thread.sleep(100), before
settings the result to "Hello, World".
The 4 thread server is basically useless in this scenario. In theory it should spend
1000 * 100/min(4, 50)=25s, but it gets severely clogged and stuck switching between threads,
spending almost a full minute on servicing the 1000 requests.
The 32 thread server should spend 1000 * 100/min(32, 50)=3.1s, but
since there are more clients than threads, some thread switching and waiting does occur,
and it ends up spending 3.8s.
The infinite thread server (Loom) should spend 1000 * 100/min(infinity, 50)=2s,
and in this case the number of clients is the limiting factor (50). For once reality
is close to theory, and the server finishes in 2.1s.
These are the type of scenarios where Loom should be very useful.
If your server is spending a lot of time waiting for blocking calls, plugging in Loom to
replace a QueuedThreadPool would give you instants results, without any further need
for configuration.
BONUS: Waiting endpoint (async)
For fun, there's also an async endpoint attached to the servers. It doesn't matter which
server you test this against, as async requests are lifted out of the Jetty's request ThreadPool.
When running our async test we should get results more or less identical to the Loom test:
And we do! The downside here is of course that you have to write your code using async concepts,
so instead of a simple Thread.sleep() you have to create an executor, wrap your result in a
CompletableFuture and schedule the completion of this future on your executor.
Conclusion
Setting up Project Loom is surprisingly easy, but load testing is surprisingly hard.
Loom seems like it could give huge performance gains for virtually no effort, but it's important
to know when it's appropriate to use it. Remember that not all APIs are "Loom friendly",
so consult the OpenJDK Wiki
before getting your hopes up.
If you have any suggestions for improvements or want to expand the test cases and/or load testing sections,
please submit an issue or PR, I would greatly appreciate it.
No homepage URL was recorded for tipsy/loomylin in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
Does tipsy/loomylin have any tags?
TopGit's last sync did not record any GitHub topics for tipsy/loomylin. GitHub topics appear in the right sidebar of a repository page; that's the authoritative place to check.
How active is development on tipsy/loomylin?
The most recent commit recorded on tipsy/loomylin was 4.1 years ago, based on the GitHub push timestamp. The repository has 4 forks — one of the better signals of community interest.
How many stars does tipsy/loomylin have?
tipsy/loomylin has 43 GitHub stars — refresh the page for the live number, or check github.com/tipsy/loomylin. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
What language is tipsy/loomylin written in?
tipsy/loomylin is written primarily in Java. GitHub's language field is based on the largest share of bytes in the default branch.
What license does tipsy/loomylin use?
tipsy/loomylin is released under the Apache-2.0 license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
Where do I read more about tipsy/loomylin?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/tipsy/loomylin is the definitive source.
Read full README in the tab above.
Curious whether loomylin is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about loomylin.