I’m having a debate with my colleague about the optimal way to handle version control for large text files in our web application’s backend system. I believe using distributed version control systems like Git or Mercurial would be the better choice for tracking changes and managing different versions of our text content. My friend thinks we should go with MySQL CLOBs (Character Large Objects) to store the versioned text directly in our database. Both approaches have their pros and cons, but I’m curious about what the community thinks. What method do you prefer for handling large text storage with version history? Have you worked with similar requirements before? I’d love to hear about your experiences with either approach, including any performance issues or benefits you’ve encountered. Are there other alternatives we should consider for this use case?
yeah, that makes sense! mixing both def helps. keeping the latest in a db is smart while git helps with versioning. just be super careful with backups, lost data would be a nightmare. glad to share ideas, this stuff is tricky!
I’ve tried both Git and MySQL CLOBs in production, and honestly, neither works great on its own. That hybrid approach someone mentioned earlier isn’t bad, but I’d go with MongoDB or PostgreSQL with JSONB instead. They handle large text way better and actually let you index stuff properly - something CLOBs are terrible at. For versioning, skip Git’s approach and build a custom layer that just stores the diffs. You’ll save tons of storage compared to Git’s object model, especially with frequently updated content. The real win is keeping everything transactionally consistent with your app data without juggling external Git repos. Performance stays solid under load, and you get granular access control that Git can’t match in web apps.
Interesting problem! What text sizes are you working with? How often do users actually need old versions? I think the complexity really depends on whether these documents change constantly or just get versioned here and there. Also, what about collaboration - are multiple people editing at the same time?