We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
ElixirConf 2023 - Sam McDavid - Lessons Learned Working with Ecto.Repo.put_dynamic_repo/1
Lessons learned from working with Ecto.Repo.put_dynamic_repo/1, including managing connections, transactions, and multiple Postgres databases, with tips on prioritization, communication, and iteration.
- Don’t overthink it, keep it simple and move quickly
- Multiple services, each with own Postgres database, increases development overhead and testing complexity
- Default to valuable problems to solve and prioritize solving them
- Communicate effectively with team and stakeholders, emphasizing alignment and understanding
- Use custom mix tasks and dynamic repo for managing connections and transactions
- Leverage existing documentation and community resources, such as blog articles and tutorials
- Validate assumptions and learn from mistakes, iterating through the development process
- Prioritize working software and test locally before deploying to production
- Consider using a proxy like supervisor for managing connection pools
- Visualize data flow through the system to understand how different components interact
- Focus on solving the problem at hand, rather than trying to design a perfect solution
- Don’t be afraid to learn new things and try different approaches
- In hindsight, obvious things aren’t always obvious; be willing to adapt and change plans as needed
- Align team goals and objectives to ensure everyone is working towards the same outcome
- Prioritize customer needs and requirements, even if they are challenging or unfamiliar
- Document decisions and reasoning to maintain transparency and clarity
- Be willing to adjust plans and strategies as new information becomes available