Building a Scalable Odoo Recommendation Engine

Built a recommendation engine for a large-scale Odoo setup recently, and the hardest part wasn’t the math, it was making it survive production. A few choices that mattered: * Used PostgreSQL advisory locks so heavy ALS training jobs don’t collide with each other. Because nothing says “fun” like two background workers trying to do the same expensive thing at once. * Used ALS collaborative filtering with sparse CSR matrices so the model could scale without treating memory like an unlimited resource. * Skipped slow ORM writes for bulk upserts with "execute_values", because millions of rows and "create()" are not friends. * Added an embeddings + cosine similarity fallback for new products, so the system can still recommend items even when sales history is basically nonexistent. The model matters, but production-readiness mattered more here: concurrency control, fast writes, low memory usage, and a fallback for cold-start cases. #Odoo #PostgreSQL #Python #RecommendationSystems #BackendEngineering

To view or add a comment, sign in

Explore content categories