Over the last two days I experimented a bit with Project Loom and built... * a folder size analyzer * an echo server (thanks for the help, @mmirwaldt) Each with and without virtual threads, which makes a huge difference (🧵👇🏾). Check it out: github.com/nipafx/loom-lab
Both experiments are implemented very naively. The size analyzer simply takes a folder and then recurses into all its children. For files, it queries their sizes with `Files::size`; for folders it sums the sizes of its children. My home directory has ~2m files with ~300GB.
@nipafx @mmirwaldt I attempted a Project Loom echo client/server experiment of my own. The slogan by @pressron "codes like sync, scales like async" is absolutely accurate, from what I can tell.
@nipafx @mmirwaldt I attempted a Project Loom echo client/server experiment of my own. The slogan by @pressron "codes like sync, scales like async" is absolutely accurate, from what I can tell.
@nipafx @mmirwaldt Besides the performance improvements I think the code is munch simpler to write and understand: you don't have to think about how to manage the underlting resources. I hope it comes soon to jdk 🙂
@nipafx @mmirwaldt Very cool! User-mode thread support in Java is such a huge leap forward! I'm very surprised to see a 10x difference with just 1k messages in the echo server experiment. Would you share the command line args used for client and server?
@nipafx @java @mmirwaldt What about memory consumption? Does loom need much more?
@nipafx @mmirwaldt I wonder how a Vert.x echo server compares, probably pretty similar i believe
@nipafx @mmirwaldt I recently did the same with GO and Goroutines, I don't have a pooled version, but with a larger Folder Structure on a hdd it does crash. Would you think a thread pool would avoid this issue?