Zipfiles on the Fly with Micronaut
summary
Shows how to stream ZIPs without materializing them by using Micronaut with an RxJava 2 Flowable that emits 4KB chunks into a ZipOutputStream in stored mode. Precompute CRC and file size per image, read files on demand, and use backpressure so memory stays bounded. Original naive approach OOMs with eight slow clients; this solution runs under 100 MB heap with thirty parallel downloads and successfully serves real image ZIPs.
AI-written summary · about
chapters (20)
- 0:00Introduction to talk
- 0:46Problem and solution overview
- 3:17First naive implementation
- 5:26Memory issues with naive approach
- 6:30Back pressure and reactive programming
- 8:18Micronaut and Netty handling
- 9:03Hot vs cold observables
- 10:51Flowable and back pressure
- 11:52State and generator setup
- 12:37Zip files in Java explained
- 14:24Deflated vs stored mode
- 16:11Micronaut reactive solution
- 17:57Flowable implementation details
- 19:02Producer state class
- 20:28Chunk output handling
- 23:39Testing the reactive solution
- 24:24Key learnings summary
- 26:11Live demo setup
- 27:13Demo results and observations
- 28:04Q&A session
related talks
02h 48mCloud Native apps with Micronaut 4 and GraalVM
52mSkyrocketing Development Of Your Microservices With Micronaut
47mIntroduction to Micronaut Lightweight Microservices with Ahead of Time Compilation
22mMicronaut, the ultra-light JVM framework of the future
45mIntruduction to Micronaut 2.0
53mBuilding High Performance Microservices for Java with Micronaut & GraalVM
02h 54mMicronaut Deep Dive
48mMicronaut Deep Dive
