Chicago MUG Event: Migrating Spring Boot Applications from PostgreSQL to MongoDB: Real-World Challenges and Solutions
Where?
Event Type: In-Person
Location: Studio at The Franklin by Tishman Speyer - 227 West Monroe, 21st Floor, Chicago, IL 60606 Suite # 2120
About this Event
In this talk, I’ll share my hands-on experience migrating two Spring Boot applications from PostgreSQL to MongoDB. The journey involved redesigning MongoDB collections, refactoring the Java codebase, and efficiently transferring large datasets — including a table with over 25 million records.
Along the way, I encountered and resolved real-world challenges such as memory leaks caused by Hibernate and MongoDB’s “_id is immutable” errors during updates.
The session will include live demos:
- Reproducing and fixing a memory leak
- Performance comparisons showing the impact of MongoDB’s bulk operations
Agenda
Time | Topic |
---|---|
5:00 PM | Meet & Greet |
6:00 - 6:45 PM | Talk |
6:45 - 7:30 PM | Networking |
Host
Cassiano Bein
MongoDB User Group Leader and Advisory Solutions Architect
Cassiano has been part of the MongoDB team for 4+ years. He has over 20 years of experience in it and he is local to Chicago! He is passionate about all thing tech, and love gadgets, cars, and grilling!
Speaker
Daniel (Xingyue) Li
Sr. software engineer at Grainger
Daniel (Xingue) Li has been a Java developer since 2000, earning his Java 2 Programmer certification from Sun Microsystems that same year. He also holds a MongoDB Associate Developer certification (achieved in December 2023) and is an AWS Certified Solutions Architect - Associate (since September 2017).
Daniel began working with MongoDB in 2022 and quickly developed a strong passion for the technology after solving a critical production challenge during an initial data load — optimizing the process with MongoDB bulk operations to handle 28,000 categories and 2.5 million products, where the original Java code could not complete due to timeouts.
Since then, Daniel has applied MongoDB’s bulk operations to significantly improve system performance, including speeding up soft-deletion processes by more than 10 times and reducing a batch process — which handled 5.5 million records — from over 5 hours to just 20 minutes.
He has also migrated two applications from PostgreSQL to MongoDB, redesigning collections to handle large datasets (including one with over 25 million records), and successfully resolved both OutOfMemoryError and performance bottlenecks during data transfer.